You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

16 lines
1.1 MiB

(this["webpackJsonp"]=this["webpackJsonp"]||[]).push([["app-service"],{"00e3":function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return s})),i.d(t,"a",(function(){return n}));var n={uniSection:i("ed96").default,uniForms:i("184c").default,uniFormsItem:i("2fcd").default,uniEasyinput:i("4da6").default},r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("view",{staticClass:e._$s(0,"sc","container"),attrs:{_i:0}},[i("uni-section",{attrs:{title:"GIS\u5b9a\u4f4d",type:"line",_i:1}},[i("uni-forms",{ref:"form",staticClass:e._$s(2,"sc","padding-wrap"),attrs:{modelValue:e.form,rules:e.rules,_i:2}},[i("uni-forms-item",{attrs:{label:"\u7ecf\u5ea6\uff1a",name:"longidute",required:!0,_i:3}},[i("uni-easyinput",{attrs:{_i:4},model:{value:e._$s(4,"v-model",e.form.longidute),callback:function(t){e.$set(e.form,"longidute",t)},expression:"form.longidute"}})],1),i("uni-forms-item",{attrs:{label:"\u7ef4\u5ea6\uff1a",name:"latidute",required:!0,_i:5}},[i("uni-easyinput",{attrs:{_i:6},model:{value:e._$s(6,"v-model",e.form.latidute),callback:function(t){e.$set(e.form,"latidute",t)},expression:"form.latidute"}})],1),i("uni-forms-item",{attrs:{label:"msg\uff1a",_i:7}},[i("uni-easyinput",{attrs:{type:"textarea",_i:8},model:{value:e._$s(8,"v-model",e.form.msg),callback:function(t){e.$set(e.form,"msg",t)},expression:"form.msg"}})],1),i("view",[i("button",{attrs:{_i:10},on:{click:e.GetGisPostion}}),i("button",{attrs:{_i:11},on:{click:e.UpLoadGisInfo}})])],1)],1)],1)},s=[]},"0676":function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports["default"]=e.exports},"0cc0":function(e,t,i){"use strict";i.r(t);var n=i("edb9"),r=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=r.a},"0de9":function(e,t,i){"use strict";function n(e){var t=Object.prototype.toString.call(e);return t.substring(8,t.length-1)}function r(){return"string"===typeof __channelId__&&__channelId__}function s(e,t){switch(n(t)){case"Function":return"function() { [native code] }";default:return t}}function a(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];console[e].apply(console,i)}function o(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var a=t.shift();if(r())return t.push(t.pop().replace("at ","uni-app:///")),console[a].apply(console,t);var o=t.map((function(e){var t=Object.prototype.toString.call(e).toLowerCase();if("[object object]"===t||"[object array]"===t)try{e="---BEGIN:JSON---"+JSON.stringify(e,s)+"---END:JSON---"}catch(r){e=t}else if(null===e)e="---NULL---";else if(void 0===e)e="---UNDEFINED---";else{var i=n(e).toUpperCase();e="NUMBER"===i||"BOOLEAN"===i?"---BEGIN:"+i+"---"+e+"---END:"+i+"---":String(e)}return e})),c="";if(o.length>1){var u=o.pop();c=o.join("---COMMA---"),0===u.indexOf(" at ")?c+=u:c+="---COMMA---"+u}else c=o[0];console[a](c)}i.r(t),i.d(t,"log",(function(){return a})),i.d(t,"default",(function(){return o}))},"0fa0":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i("c9a0"),r={data:function(){return{form:{longidute:"",latidute:"",msg:""},rules:{longidute:{rules:[{required:!0,errorMessage:"\u8bf7\u8f93\u5165\u4e0a\u62a5\u7ecf\u5ea6"}]},latidute:{rules:[{required:!0,errorMessage:"\u8bf7\u8f93\u5165\u4e0a\u62a5\u7ef4\u5ea6"}]}}}},onLoad:function(){var e=(0,n.isRegisted)();uni.showModal({content:e?"1":"0"})},methods:{GetGisPostion:function(e){n.client.getGisPosition(e).then((function(e){mylog("getGisPosition : "+JSON.stringify(e))}))},UpLoadGisInfo:function(){var e=this;this.$refs.form.validate().then((function(t){n.client.uploadGisInfo(e.longidute,e.latidute,e.msg)})).catch((function(e){uni.showToast({title:e})}))}}};t.default=r},"11b0":function(e,t){e.exports=function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports["default"]=e.exports},"184c":function(e,t,i){"use strict";i.r(t);var n=i("a431"),r=i("e455");for(var s in r)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(s);var a=i("f0c5"),o=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=o.exports},1852:function(e,t,i){"use strict";i.r(t);var n=i("3bc6"),r=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=r.a},"1dfe":function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return s})),i.d(t,"a",(function(){return n}));var n={uniIcons:i("9edb").default},r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("view",{staticClass:e._$s(0,"sc","uni-easyinput"),class:e._$s(0,"c",{"uni-easyinput-error":e.msg}),style:e._$s(0,"s",e.boxStyle),attrs:{_i:0}},[i("view",{staticClass:e._$s(1,"sc","uni-easyinput__content"),class:e._$s(1,"c",e.inputContentClass),style:e._$s(1,"s",e.inputContentStyle),attrs:{_i:1}},[e._$s(2,"i",e.prefixIcon)?i("uni-icons",{staticClass:e._$s(2,"sc","content-clear-icon"),attrs:{type:e.prefixIcon,color:"#c0c4cc",size:"22",_i:2},on:{click:function(t){return e.onClickIcon("prefix")}}}):e._e(),e._$s(3,"i","textarea"===e.type)?i("textarea",{staticClass:e._$s(3,"sc","uni-easyinput__content-textarea"),class:e._$s(3,"c",{"input-padding":e.inputBorder}),attrs:{name:e._$s(3,"a-name",e.name),value:e._$s(3,"a-value",e.val),placeholder:e._$s(3,"a-placeholder",e.placeholder),placeholderStyle:e._$s(3,"a-placeholderStyle",e.placeholderStyle),disabled:e._$s(3,"a-disabled",e.disabled),maxlength:e._$s(3,"a-maxlength",e.inputMaxlength),focus:e._$s(3,"a-focus",e.focused),autoHeight:e._$s(3,"a-autoHeight",e.autoHeight),"cursor-spacing":e._$s(3,"a-cursor-spacing",e.cursorSpacing),_i:3},on:{input:e.onInput,blur:e._Blur,focus:e._Focus,confirm:e.onConfirm,keyboardheightchange:e.onkeyboardheightchange}}):i("input",{staticClass:e._$s(4,"sc","uni-easyinput__content-input"),style:e._$s(4,"s",e.inputStyle),attrs:{type:e._$s(4,"a-type","password"===e.type?"text":e.type),name:e._$s(4,"a-name",e.name),value:e._$s(4,"a-value",e.val),password:e._$s(4,"a-password",!e.showPassword&&"password"===e.type),placeholder:e._$s(4,"a-placeholder",e.placeholder),placeholderStyle:e._$s(4,"a-placeholderStyle",e.placeholderStyle),disabled:e._$s(4,"a-disabled",e.disabled),maxlength:e._$s(4,"a-maxlength",e.inputMaxlength),focus:e._$s(4,"a-focus",e.focused),confirmType:e._$s(4,"a-confirmType",e.confirmType),"cursor-spacing":e._$s(4,"a-cursor-spacing",e.cursorSpacing),_i:4},on:{focus:e._Focus,blur:e._Blur,input:e.onInput,confirm:e.onConfirm,keyboardheightchange:e.onkeyboardheightchange}}),e._$s(5,"i","password"===e.type&&e.passwordIcon)?[e._$s(6,"i",e.isVal)?i("uni-icons",{staticClass:e._$s(6,"sc","content-clear-icon"),class:e._$s(6,"c",{"is-textarea-icon":"textarea"===e.type}),attrs:{type:e.showPassword?"eye-slash-filled":"eye-filled",size:22,color:e.focusShow?e.primaryColor:"#c0c4cc",_i:6},on:{click:e.onEyes}}):e._e()]:e._$s(7,"e",e.suffixIcon)?[e._$s(8,"i",e.suffixIcon)?i("uni-icons",{staticClass:e._$s(8,"sc","content-clear-icon"),attrs:{type:e.suffixIcon,color:"#c0c4cc",size:"22",_i:8},on:{click:function(t){return e.onClickIcon("suffix")}}}):e._e()]:[e._$s(10,"i",e.clearable&&e.isVal&&!e.disabled&&"textarea"!==e.type)?i("uni-icons",{staticClass:e._$s(10,"sc","content-clear-icon"),class:e._$s(10,"c",{"is-textarea-icon":"textarea"===e.type}),attrs:{type:"clear",size:e.clearSize,color:e.msg?"#dd524d":e.focusShow?e.primaryColor:"#c0c4cc",_i:10},on:{click:e.onClear}}):e._e()],e._t("right",null,{_i:11})],2)])},s=[]},2236:function(e,t,i){var n=i("5a43");e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports["default"]=e.exports},"24d1":function(e,t,i){"use strict";i.r(t);var n=i("824d"),r=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=r.a},"257f":function(e,t,i){"use strict";i.r(t);var n=i("0fa0"),r=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=r.a},"278c":function(e,t,i){var n=i("c135"),r=i("9b42"),s=i("6613"),a=i("c240");e.exports=function(e,t){return n(e)||r(e,t)||s(e,t)||a()},e.exports.__esModule=!0,e.exports["default"]=e.exports},"299c":function(e,t,i){"use strict";var n=i("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.typeFilter=t.type=t.setDataValue=t.realName=t.rawData=t.objSet=t.objGet=t.name2arr=t.isRequiredField=t.isRealName=t.isNumber=t.isEqual=t.isBoolean=t.getValue=t.getDataValueType=t.getDataValue=t.deepCopy=void 0;var r=n(i("7037"));t.deepCopy=function(e){return JSON.parse(JSON.stringify(e))};var s=function(e){return"int"===e||"double"===e||"number"===e||"timestamp"===e};t.typeFilter=s;t.getValue=function(e,t,i){var n=i.find((function(e){return e.format&&s(e.format)})),r=i.find((function(e){return e.format&&"boolean"===e.format||"bool"===e.format}));return n&&(t=t||0===t?d(Number(t))?Number(t):t:null),r&&(t=!!h(t)&&t),t};t.setDataValue=function(e,t,i){return t[e]=i,i||""};var a=function(e,t){return l(t,e)};t.getDataValue=a;t.getDataValueType=function(e,t){var i=a(e,t);return{type:f(i),value:i}};t.realName=function(e){var t=u(e);if("object"===(0,r.default)(t)&&Array.isArray(t)&&t.length>1){var i=t.reduce((function(e,t){return e+"#".concat(t)}),"_formdata_");return i}return t[0]||e};t.isRealName=function(e){return/^_formdata_#*/.test(e)};t.rawData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=JSON.parse(JSON.stringify(e)),i={};for(var n in t){var r=o(n);c(i,r,t[n])}return i};var o=function(e){var t=e.replace("_formdata_#","");return t=t.split("#").map((function(e){return d(e)?Number(e):e})),t};t.name2arr=o;var c=function(e,t,i){return"object"!==(0,r.default)(e)||u(t).reduce((function(e,t,n,r){return n===r.length-1?(e[t]=i,null):(t in e||(e[t]=/^[0-9]{1,}$/.test(r[n+1])?[]:{}),e[t])}),e),e};function u(e){return Array.isArray(e)?e:e.replace(/\[/g,".").replace(/\]/g,"").split(".")}t.objSet=c;var l=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"undefined",n=u(t),r=n.reduce((function(e,t){return(e||{})[t]}),e);return r&&void 0===r?i:r};t.objGet=l;var d=function(e){return!isNaN(Number(e))};t.isNumber=d;var h=function(e){return"boolean"===typeof e};t.isBoolean=h;t.isRequiredField=function(e){for(var t=!1,i=0;i<e.length;i++){var n=e[i];if(n.required){t=!0;break}}return t};var f=function(e){var t={};return"Boolean Number String Function Array Date RegExp Object Error".split(" ").map((function(e,i){t["[object "+e+"]"]=e.toLowerCase()})),null==e?e+"":"object"===(0,r.default)(e)||"function"===typeof e?t[Object.prototype.toString.call(e)]||"object":(0,r.default)(e)};t.type=f;t.isEqual=function(e,t){if(e===t)return 0!==e||1/e===1/t;if(null==e||null==t)return e===t;var i=toString.call(e),n=toString.call(t);if(i!==n)return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e===""+t;case"[object Number]":return+e!==+e?+t!==+t:0===+e?1/+e===1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t}if("[object Object]"==i){var r=Object.getOwnPropertyNames(e),s=Object.getOwnPropertyNames(t);if(r.length!=s.length)return!1;for(var a=0;a<r.length;a++){var o=r[a];if(e[o]!==t[o])return!1}return!0}return"[object Array]"==i?e.toString()==t.toString():void 0}},"2b53":function(e,t,i){"use strict";i.r(t);var n=i("6602"),r=i("0cc0");for(var s in r)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(s);var a=i("f0c5"),o=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=o.exports},"2e3e":function(e,t,i){if("undefined"===typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(e){var t=this.constructor;return this.then((function(i){return t.resolve(e()).then((function(){return i}))}),(function(i){return t.resolve(e()).then((function(){throw i}))}))}),"undefined"!==typeof uni&&uni&&uni.requireGlobal){var n=uni.requireGlobal();ArrayBuffer=n.ArrayBuffer,Int8Array=n.Int8Array,Uint8Array=n.Uint8Array,Uint8ClampedArray=n.Uint8ClampedArray,Int16Array=n.Int16Array,Uint16Array=n.Uint16Array,Int32Array=n.Int32Array,Uint32Array=n.Uint32Array,Float32Array=n.Float32Array,Float64Array=n.Float64Array,BigInt64Array=n.BigInt64Array,BigUint64Array=n.BigUint64Array}uni.restoreGlobal&&uni.restoreGlobal(weex,plus,setTimeout,clearTimeout,setInterval,clearInterval),__definePage("pages/index/index",(function(){return Vue.extend(i("2b53").default)})),__definePage("pages/gisUpload/gisUpload",(function(){return Vue.extend(i("75e4").default)})),__definePage("pages/form/form",(function(){return Vue.extend(i("3ff9").default)})),__definePage("pages/form1/form1",(function(){return Vue.extend(i("843b").default)}))},"2fcd":function(e,t,i){"use strict";i.r(t);var n=i("d7d9"),r=i("24d1");for(var s in r)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(s);var a=i("f0c5"),o=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=o.exports},3481:function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={data:function(){return{form:{longidute:"",latidute:"",msg:""},rules:{longidute:{rules:[{required:!0,errorMessage:"\u8bf7\u8f93\u5165\u4e0a\u62a5\u7ecf\u5ea6"}]},latidute:{rules:[{required:!0,errorMessage:"\u8bf7\u8f93\u5165\u4e0a\u62a5\u7ef4\u5ea6"}]}}}},onLoad:function(){},methods:{submit:function(){this.$refs.form.validate().then((function(e){uni.showToast({title:"\u6210\u529f"})})).catch((function(t){e("log","\u8868\u5355\u9519\u8bef\u4fe1\u606f\uff1a",t," at pages/form/form.vue:56"),uni.showToast({title:t})}))}}};t.default=i}).call(this,i("0de9")["default"])},"36c6":function(e,t){function i(t){return e.exports=i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports["default"]=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports["default"]=e.exports},"386d":function(e,t,i){"use strict";(function(e,n){var r=i("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.XYClient=void 0;var s=r(i("a34a")),a=r(i("7037")),o=r(i("448a")),c=r(i("8962")),u=r(i("3c96")),l=r(i("a128")),d=r(i("c973")),h=r(i("970b")),f=r(i("5bc3")),g=r(i("ed6d")),p=r(i("6b58")),v=r(i("36c6"));function m(e,t){var i="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"===typeof e)return y(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return y(e,t)}(e))||t&&e&&"number"===typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,o=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw s}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function _(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=(0,v.default)(e);if(t){var r=(0,v.default)(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return(0,p.default)(this,i)}}i("b0b9"),e("log",ice," at util/webrtc.js:3");var S=function(t,i){var r;function p(){}function y(){y.init.call(this)}function S(e){return void 0===e._maxListeners?y.defaultMaxListeners:e._maxListeners}function I(e,t,i){if(t)e.call(i);else for(var n=e.length,r=P(e,n),s=0;s<n;++s)r[s].call(i)}function w(e,t,i,n){if(t)e.call(i,n);else for(var r=e.length,s=P(e,r),a=0;a<r;++a)s[a].call(i,n)}function k(e,t,i,n,r){if(t)e.call(i,n,r);else for(var s=e.length,a=P(e,s),o=0;o<s;++o)a[o].call(i,n,r)}function C(e,t,i,n,r,s){if(t)e.call(i,n,r,s);else for(var a=e.length,o=P(e,a),c=0;c<a;++c)o[c].call(i,n,r,s)}function b(e,t,i,n){if(t)e.apply(i,n);else for(var r=e.length,s=P(e,r),a=0;a<r;++a)s[a].apply(i,n)}function E(t,i,n,r){var s,a,o;if("function"!==typeof n)throw new TypeError('"listener" argument must be a function');if(a=t._events,a?(a.newListener&&(t.emit("newListener",i,n.listener?n.listener:n),a=t._events),o=a[i]):(a=t._events=new p,t._eventsCount=0),o){if("function"===typeof o?o=a[i]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),!o.warned&&(s=S(t),s&&s>0&&o.length>s)){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+i+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=i,c.count=o.length,function(t){"function"===typeof console.warn?e("warn",t," at util/webrtc.js:253"):e("log",t," at util/webrtc.js:253")}(c)}}else o=a[i]=n,++t._eventsCount;return t}function T(e,t,i){var n=!1;function r(){e.removeListener(t,r),n||(n=!0,i.apply(e,arguments))}return r.listener=i,r}function x(e){var t=this._events;if(t){var i=t[e];if("function"===typeof i)return 1;if(i)return i.length}return 0}function P(e,t){var i=new Array(t);while(t--)i[t]=e[t];return i}p.prototype=Object.create(null),y.EventEmitter=y,y.usingDomains=!1,y.prototype.domain=void 0,y.prototype._events=void 0,y.prototype._maxListeners=void 0,y.defaultMaxListeners=10,y.init=function(){this.domain=null,y.usingDomains&&(void 0).active&&(void 0).Domain,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new p,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},y.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},y.prototype.getMaxListeners=function(){return S(this)},y.prototype.emit=function(e){var t,i,n,r,s,a,o,c="error"===e;if(a=this._events,a)c=c&&null==a.error;else if(!c)return!1;if(o=this.domain,c){if(t=arguments[1],!o){if(t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=o,t.domainThrown=!1,o.emit("error",t),!1}if(i=a[e],!i)return!1;var l="function"===typeof i;switch(n=arguments.length,n){case 1:I(i,l,this);break;case 2:w(i,l,this,arguments[1]);break;case 3:k(i,l,this,arguments[1],arguments[2]);break;case 4:C(i,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(r=new Array(n-1),s=1;s<n;s++)r[s-1]=arguments[s];b(i,l,this,r)}return!0},y.prototype.addListener=function(e,t){return E(this,e,t,!1)},y.prototype.on=y.prototype.addListener,y.prototype.prependListener=function(e,t){return E(this,e,t,!0)},y.prototype.once=function(e,t){if("function"!==typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,T(this,e,t)),this},y.prototype.prependOnceListener=function(e,t){if("function"!==typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,T(this,e,t)),this},y.prototype.removeListener=function(e,t){var i,n,r,s,a;if("function"!==typeof t)throw new TypeError('"listener" argument must be a function');if(n=this._events,!n)return this;if(i=n[e],!i)return this;if(i===t||i.listener&&i.listener===t)0===--this._eventsCount?this._events=new p:(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!==typeof i){for(r=-1,s=i.length;s-- >0;)if(i[s]===t||i[s].listener&&i[s].listener===t){a=i[s].listener,r=s;break}if(r<0)return this;if(1===i.length){if(i[0]=void 0,0===--this._eventsCount)return this._events=new p,this;delete n[e]}else(function(e,t){for(var i=t,n=i+1,r=e.length;n<r;i+=1,n+=1)e[i]=e[n];e.pop()})(i,r);n.removeListener&&this.emit("removeListener",e,a||t)}return this},y.prototype.removeAllListeners=function(e){var t,i;if(i=this._events,!i)return this;if(!i.removeListener)return 0===arguments.length?(this._events=new p,this._eventsCount=0):i[e]&&(0===--this._eventsCount?this._events=new p:delete i[e]),this;if(0===arguments.length){for(var n,r=Object.keys(i),s=0;s<r.length;++s)n=r[s],"removeListener"!==n&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=new p,this._eventsCount=0,this}if(t=i[e],"function"===typeof t)this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},y.prototype.listeners=function(e){var t,i,n=this._events;return n?(t=n[e],i=t?"function"===typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(t):[]):i=[],i},y.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):x.call(e,t)},y.prototype.listenerCount=x,y.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]},function(e){e[e["None"]=0]="None",e[e["Init"]=1]="Init",e[e["Normal"]=2]="Normal",e[e["Callout"]=3]="Callout",e[e["Incoming"]=4]="Incoming",e[e["Ringing"]=5]="Ringing",e[e["Connect"]=6]="Connect",e[e["Release"]=7]="Release",e[e["Hold"]=8]="Hold",e[e["Unhold"]=9]="Unhold"}(r||(r={}));var R=i.Ice._ModuleRegistry,M=i.Ice.Slice,D=R.module("Dispatcher");D.ECode=M.defineEnum([["ECodeNone",0],["ECodeRegister",1e3],["ECodeRegisterKickout",1001],["ECodeRegisterTimeout",1002],["ECodeRegisterNotRegister",1003],["ECodeRegisterDisConnect",1004],["ECodeRegisterUserIsLogin",1005],["ECodeRegisterErrorPwd",1006],["ECodeRegisterLicenseOut",1007],["ECodeRegisterNotExist",1008],["ECodeCalling",1100],["ECodeCallingCaller",1101],["ECodeCallingCallee",1102],["ECodeCallingType",1103],["ECodeCallingSessionNotFound",1104],["ECodeCallingTerminalNotFound",1105],["ECodeCallingNumberNotRegistered",1106],["ECodeCallingUserNotExist",1107],["ECodeCallingNoAuth",1108],["ECodeCallingOprFailed",1109],["ECodeCallingUserNotInGroup",1110],["ECodeCallingGroupNotFound",1111],["ECodeCallingCallTypeError",1112],["ECodeCallingSessionCreateFailed",1113],["ECodeOpFaxFailured",1114],["ECodeFileNotFound",1115],["ECodeNoCid",1116],["ECodeNumberBusy",1117],["ECodeCallingOperateFailed",1118],["ECodeCallingNotHaveFitCall",1119],["ECodeNotDTPUser",1120],["ECodeSessionStateError",1121],["ECodeCanNotCallIntercomGroup",1122],["ECodeCallingOperateNotConn",1123],["ECodeConsole",1200],["ECodeConsoleBind",1201],["ECodeErrLicense",1202],["ECodeErrCanNotUse",1203],["ECodeConsoleBindErrorType",1204],["ECodeConsoleBindFristRegist",1205],["ECodeNotMCUSession",1300],["ECodeIsBinded",1301],["ECodeMsgGroupExist",1400],["ECodeMsgGroupNotExist",1401],["ECodeVideoBugCalledIsVoice",1500]]),Object.defineProperty(D,"ECodeNoneDis",{value:"\u672a\u5b9a\u4e49\u9519\u8bef"}),Object.defineProperty(D,"ECodeRegisterKickoutDis",{value:"\u5f02\u5730\u767b\u9646"}),Object.defineProperty(D,"ECodeRegisterTimeoutDis",{value:"\u767b\u9646\u8d85\u65f6"}),Object.defineProperty(D,"ECodeRegisterNotRegisterDis",{value:"\u53f7\u7801\u672a\u6ce8\u518c"}),Object.defineProperty(D,"ECodeRegisterDisConnectDis",{value:"\u8fde\u63a5\u5df2\u65ad\u5f00"}),Object.defineProperty(D,"ECodeRegisterUserIsLoginDis",{value:"\u53f7\u7801\u5df2\u5728\u5176\u5b83\u7ec8\u7aef\u767b\u5f55"}),Object.defineProperty(D,"ECodeRegisterErrorPwdDis",{value:"\u5bc6\u7801\u9519\u8bef"}),Object.defineProperty(D,"ECodeRegisterLicenseOutDis",{value:"\u8fbe\u5230\u6388\u6743\u6570\u4e0a\u9650"}),Object.defineProperty(D,"ECodeRegisterNotExistDis",{value:"\u7528\u6237\u4e0d\u5b58\u5728"}),Object.defineProperty(D,"ECodeCallingCallerDis",{value:"\u4e3b\u53eb\u53f7\u7801\u9519\u8bef"}),Object.defineProperty(D,"ECodeCallingCalleeDis",{value:"\u88ab\u53eb\u53f7\u7801\u9519\u8bef"}),Object.defineProperty(D,"ECodeCallingTypeDis",{value:"\u547c\u53eb\u7c7b\u578b\u9519\u8bef"}),Object.defineProperty(D,"ECodeCallingSessionNotFoundDis",{value:"\u627e\u4e0d\u5230\u547c\u53ebID"}),Object.defineProperty(D,"ECodeConsoleBindDis",{value:"\u7ed1\u5b9a\u53f7\u7801\u9519\u8bef,\u53f7\u7801\u672a\u6ce8\u518c"}),Object.defineProperty(D,"ECodeConsoleBindErrorTypeDis",{value:"\u7ed1\u5b9a\u53f7\u7801\u9519\u8bef,\u53f7\u7801\u7c7b\u578b\u9519\u8bef"}),Object.defineProperty(D,"ECodeConsoleBindFristRegistDis",{value:"\u8bf7\u5148\u6ce8\u518c\u518d\u7ed1\u5b9a\u53f7\u7801"}),Object.defineProperty(D,"ECodeCallingTerminalNotFoundDis",{value:"\u53f7\u7801\u4e0d\u5b58\u5728"}),Object.defineProperty(D,"ECodeCallingNumberNotRegisteredDis",{value:"\u53f7\u7801\u672a\u6ce8\u518c"}),Object.defineProperty(D,"ECodeCallingUserNotExistDis",{value:"\u7528\u6237\u4e0d\u5b58\u5728"}),Object.defineProperty(D,"ECodeCallingNoAuthDis",{value:"\u6ca1\u6709\u6743\u9650"}),Object.defineProperty(D,"ECodeCallingOprFailedDis",{value:"\u64cd\u4f5c\u6267\u884c\u5931\u8d25"}),Object.defineProperty(D,"ECodeCallingUserNotInGroupDis",{value:"\u7528\u6237\u5728\u8be5\u7ec4\u4e2d\u4e0d\u5b58\u5728"}),Object.defineProperty(D,"ECodeCallingGroupNotFoundDis",{value:"\u7ec4\u53f7\u4e0d\u5b58\u5728"}),Object.defineProperty(D,"ECodeCallingCallTypeErrorDis",{value:"\u547c\u53eb\u7c7b\u578b\u9519\u8bef"}),Object.defineProperty(D,"ECodeCallingSessionCreateFailedDis",{value:"\u547c\u53eb\u521b\u5efa\u5931\u8d25"}),Object.defineProperty(D,"ECodeCallingOperateFailedDis",{value:"\u64cd\u4f5c\u5931\u8d25"}),Object.defineProperty(D,"ECodeCallingNotHaveFitCallDis",{value:"\u6ca1\u6709\u7b26\u5408\u6761\u4ef6\u547c\u53eb"}),Object.defineProperty(D,"ECodeSessionStateErrorDis",{value:"\u547c\u53eb\u72b6\u6001\u9519\u8bef"}),Object.defineProperty(D,"ECodeCanNotCallIntercomGroupDis",{value:"\u4e0d\u80fd\u547c\u53eb\u5bf9\u8bb2\u7ec4"}),Object.defineProperty(D,"ECodeCallingOperateNotConnDis",{value:"\u4ec5\u53ef\u5bf9\u901a\u8bdd\u4e2d\u7684\u7528\u6237\u8fdb\u884c\u64cd\u4f5c"}),Object.defineProperty(D,"ECodeOpFaxFailuredDis",{value:"\u53d1\u9001\u4f20\u771f\u5931\u8d25"}),Object.defineProperty(D,"ECodeFileNotFoundDis",{value:"\u627e\u4e0d\u5230\u6587\u4ef6"}),Object.defineProperty(D,"ECodeNoCidDis",{value:"\u547c\u53ebID\u4e3a\u7a7a"}),Object.defineProperty(D,"ECodeNumberBusyDis",{value:"\u6307\u5b9a\u53f7\u7801\u5fd9"}),Object.defineProperty(D,"ECodeErrLicenseDis",{value:"\u8d85\u51falicense\u9650\u5236"}),Object.defineProperty(D,"ECodeErrCanNotUseDis",{value:"\u529f\u80fd\u672a\u5f00\u901a"}),Object.defineProperty(D,"ECodeNotDTPUserDis",{value:"\u975e\u8c03\u5ea6\u7528\u6237"}),Object.defineProperty(D,"ECodeNotMCUSessionDis",{value:"\u975eMCU\u547c\u53eb"}),Object.defineProperty(D,"ECodeIsBindedDis",{value:"\u53f7\u7801\u5df2\u88ab\u7ed1\u5b9a\uff0c\u7ed1\u5b9a\u4eba:"}),Object.defineProperty(D,"ECodeMsgGroupExistDis",{value:"\u5f53\u524d\u7fa4\u5df2\u5b58\u5728"}),Object.defineProperty(D,"ECodeMsgGroupNotExistDis",{value:"\u6307\u5b9a\u7684\u7fa4\u4e0d\u5b58\u5728"}),Object.defineProperty(D,"ECodeVideoBugCalledIsVoiceDis",{value:"\u6307\u5b9a\u53f7\u7801\u5728\u97f3\u9891\u901a\u8bdd\u4e2d"}),D.Error=function(e){(0,g.default)(n,e);var t=_(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D.ECode.ECodeNone,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return(0,h.default)(this,n),e=t.call(this,s),e.code=i,e.desc=r,e}return(0,f.default)(n,[{key:"_mostDerivedType",value:function(){return D.Error}},{key:"_writeMemberImpl",value:function(e){D.ECode._write(e,this.code),e.writeString(this.desc)}},{key:"_readMemberImpl",value:function(e){this.code=D.ECode._read(e),this.desc=e.readString()}}],[{key:"_parent",get:function(){return i.Ice.UserException}},{key:"_id",get:function(){return"::Dispatcher::Error"}}]),n}(i.Ice.UserException),Object.defineProperty(D,"SYSMessageDiskUsed",{value:"\u8c03\u5ea6\u670d\u52a1\u5668\u5b58\u50a8\u5feb\u6ee1\uff0c\u8bf7\u53ca\u65f6\u5907\u4efd\u6216\u6e05\u9664\u6570\u636e"}),Object.defineProperty(D,"SYSMessageDiskClear",{value:"\u8c03\u5ea6\u670d\u52a1\u5668\u5b58\u50a8\u7a7a\u95f4\u6e05\u7406\u5b8c\u6bd5"});var O=i.Ice._ModuleRegistry,A=i.Ice.Slice,F=O.module("Dispatcher");F.CallType=A.defineEnum([["CallTypeNone",0],["CallTypeSingle",1],["CallTypeTmpgroup",2],["CallTypeReport",3],["CallTypeBroadcast",4],["CallTypeTemporary",5],["CallTypeInterpose",6],["CallTypeForceremove",7],["CallTypeMonitor",8],["CallTypeIntercom",9],["CallTypeSwitch",10],["CallTypeUrgent",11],["CallTypeSingle2",12],["CallTypeTmpintercom",13],["CallTypeVideobug",14],["CallTypeMCUMetting",15],["CallTypeSOS",16],["CallTypeTransferVideo",17],["CallTypeTransferVideoToMcu",18],["CallTypeUploadVideo",19]]),F.SubCallType=A.defineEnum([["SubCallTypeNone",0],["SubCallTypeFixMeeting",1],["SubCallTypeScheduleMeeting",2],["SubCallTypeSwitch",3]]),F.RegisterState=A.defineEnum([["RegisterStateNone",0],["RegisterStateLogin",1],["RegisterStateLogout",2],["RegisterStateTTOnline",20]]),F.CallState=A.defineEnum([["CallStateNone",0],["CallStateInit",1],["CallStateNormal",2],["CallStateCallout",3],["CallStateIncoming",4],["CallStateRinging",5],["CallStateConnect",6],["CallStateHold",7],["CallStateBusy",8],["CallStateOffhook",9],["CallStateRelease",10],["CallStateUnspeak",11],["CallStateSpeak",12],["CallStateQueue",13],["CallStateUnhold",14],["CallStateZombie",15]]),F.MediaType=A.defineEnum([["MediaTypeNone",0],["MediaTypeAudio",1],["MediaTypeVideo",2]]),F.GroupType=A.defineEnum([["GroupTypeIntercomgroup",0],["GroupTypeOther",1],["GroupTypeNone",2]]),F.UserType=A.defineEnum([["UserTypeDispatch",0],["UserTypeHandheld",1],["UserTypeCommonuser",2],["UserTypeOutlineuser",3],["UserTypeMonitoruser",4],["UserTypeSsu",5],["UserType3ghandheld",6],["UserTypeMonitordevice",7],["UserTypeNone",8],["UserType323",9],["UserTypeStationGroup",10],["UserTypeStationUser",11],["UserTypeRelayUser",12],["UserTypeBroadRelayUser",13],["UserTypeRelayGW",14],["UserTypeMCUReg",15],["UserTypeOutlineHandler",16],["UserTypeWeiDe",17],["UserTypeOutlineCar",18],["UserTypeTianTong",20],["UserTypeMeshDev",21]]),F.FileType=A.defineEnum([["FileTypeNone",0],["FileTypeText",1],["FileTypePic",2],["FileTypeVoice",3],["FileTypeVideo",4],["FileTypeGisinfo",5],["FileTypePlayAudio",6],["FileTypeFax",7],["FileTypeOther",8],["FileTypePlayVideo",9]]),F.FileState=A.defineEnum([["FileStateNone",0],["FileStateUploading",1],["FileStateUploaded",2]]),F.SpeakType=A.defineEnum([["SpeakTypeNone",0],["SpeakTypeMute",1],["SpeakTypeUnmute",2]]),F.UserOrGroup=A.defineEnum([["UOGNone",0],["UOGEmployee",1],["UOGGroup",2]]),F.HearType=A.defineEnum([["HearTypeNone",0],["HearTypeMute",1],["HearTypeUnmute",2]]),F.PushVideoType=A.defineEnum([["PushVideoTypeNone",0],["PushVideoTypePush",1],["PushVideoTypeUnpush",2]]),F.PlayAudioType=A.defineEnum([["PlayAudioTypeNone",0],["PlayAudioTypeStart",1],["PlayAudioTypeStop",2]]),F.PlayVideoType=A.defineEnum([["PlayVideoTypeNone",0],["PlayVideoTypeStart",1],["PlayVideoTypeStop",2]]),F.AudioFileType=A.defineEnum([["AudioFileTypeNone",0],["AudioFileTypeEcho",1]]),F.AnswerType=A.defineEnum([["AnswerTypeNone",0],["AnswerTypeAuto",1],["AnswerTypeMan",2]]),F.HoldType=A.defineEnum([["HoldTypeNone",0],["HoldTypeHold",1],["HoldTypeUnhold",2]]),F.GisTraceType=A.defineEnum([["GisTraceTypeNone",0],["GisTraceTypeSub",1],["GisTraceTypeUnsub",2]]),F.PrePlanState=A.defineEnum([["PrePlanStateNone",0],["PrePlanStateRuning",1],["PrePlanStateEnd",2]]),F.VBugStateType=A.defineEnum([["VBugStateTypeNone",0],["VBugStateTypeOk",1],["VBugStateTypeFailure",2],["VBugStateTypeRelease",3]]),F.PrePlanInstType=A.defineEnum([["PrePlanTypeInstMessage",1],["PrePlanTypeInstBroadCast",2],["PrePlanTypeInstMeeting",3]]),F.FaxStateSend=A.defineEnum([["FaxStateSendNone",0],["FaxStateSending",1],["FaxStateSended",2],["FaxStateSendFailure",3]]),F.FaxStateRecv=A.defineEnum([["FaxStateRecvNone",0],["FaxStateRecving",1],["FaxStateRecved",2],["FaxStateRecvedFailure",3]]),F.emCalledType=A.defineEnum([["CalledTypeNONE",0],["CalledTypeTDNSFreeswitch",1],["CalledTypeMCU",2],["CalledTypePlayVideo",3],["CalledTypeMCUDevice",4],["CalledType28181",5],["CalledTypeMonitorDeivce",6],["CalledTypePlayHisVideo",7]]),F.emVideoDeviceType=A.defineEnum([["VDTNONE",0],["VDTHKIPC",1],["VDTOTHER",2],["VDTHKDVR",3],["VDTHKVIDEOSERVER",4],["VDTHKDECOMPILER",5],["VDTDHIPC",10],["VDTDHDVR",11],["VDTDHVIDEOSERVER",12],["VDTDHDECOMPILER",13],["VDTWEIBOIPC",14],["VDT4GMONITOR",15],["VDTMINGJING",16]]),F.emCodecType=A.defineEnum([["CDTNONE",0],["CDTH264",1],["CDTH265",2],["CDT264265",3]]),F.Identity=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.user=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.user)}},{key:"_read",value:function(e){this.user=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),A.defineStruct(F.Identity,!0,!0),F.CommonRequestT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.cid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid)}},{key:"_read",value:function(e){this.cid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),A.defineStruct(F.CommonRequestT,!0,!0),Object.defineProperty(F,"CALLREMARKENGOTRANSFER",{value:"\u534f\u5546\u8f6c\u63a5"}),Object.defineProperty(F,"CALLREMARKMOINTOR",{value:"\u76d1\u542c"}),Object.defineProperty(F,"CALLREMARKSUBSTITUTE",{value:"\u4ee3\u63a5"}),Object.defineProperty(F,"CALLREMARKINTERPOSE",{value:"\u5f3a\u63d2"}),Object.defineProperty(F,"CALLREMARKREMOVE",{value:"\u5f3a\u65ad"}),Object.defineProperty(F,"CALLREMARKSWITCH",{value:"\u8f6c\u63a5"}),Object.defineProperty(F,"CALLREMARKADDMEMBER",{value:"\u9080\u8bf7\u6210\u5458"}),Object.defineProperty(F,"CALLREMARKPLAYFILE",{value:"\u64ad\u653e\u6587\u4ef6"}),Object.defineProperty(F,"CALLREMARKREMOVEOTHER",{value:"\u5f3a\u62c6"}),Object.defineProperty(F,"STRYMSDISPATCHERGROUP",{value:"\u8c03\u5ea6\u670d\u52a1\u5668\u4e13\u7528"});i.Ice._ModuleRegistry;var q=i.Ice.Slice;D.BusinessTypeRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";(0,h.default)(this,e),this.id=t,this.WTGroupID=i,this.WorkTypeName=n,this.TheValue=r,this.description=s,this.TheState=a,this.IsDefault=o,this.WTGroupName=c}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.id),e.writeInt(this.WTGroupID),e.writeString(this.WorkTypeName),e.writeInt(this.TheValue),e.writeString(this.description),e.writeInt(this.TheState),e.writeInt(this.IsDefault),e.writeString(this.WTGroupName)}},{key:"_read",value:function(e){this.id=e.readInt(),this.WTGroupID=e.readInt(),this.WorkTypeName=e.readString(),this.TheValue=e.readInt(),this.description=e.readString(),this.TheState=e.readInt(),this.IsDefault=e.readInt(),this.WTGroupName=e.readString()}}],[{key:"minWireSize",get:function(){return 23}}]),e}(),q.defineStruct(D.BusinessTypeRT,!0,!0),q.defineSequence(D,"BusinessTypeRTSeqHelper","Dispatcher.BusinessTypeRT",!1),D.SendBusFileReceiveT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";(0,h.default)(this,e),this.MsgUUID=t,this.Receiver=i,this.ReceiverName=n,this.Remark=r,this.ModifyEmployee=s}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.MsgUUID),e.writeString(this.Receiver),e.writeString(this.ReceiverName),e.writeString(this.Remark),e.writeString(this.ModifyEmployee)}},{key:"_read",value:function(e){this.MsgUUID=e.readString(),this.Receiver=e.readString(),this.ReceiverName=e.readString(),this.Remark=e.readString(),this.ModifyEmployee=e.readString()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),q.defineStruct(D.SendBusFileReceiveT,!0,!0),q.defineSequence(D,"SendBusFileReceiveSeqHelper","Dispatcher.SendBusFileReceiveT",!1),D.StartSendBusFileT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";(0,h.default)(this,e),this.MsgUUID=t,this.FileUUID=i,this.FileType=n,this.FileName=r,this.Remark=s}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.MsgUUID),e.writeString(this.FileUUID),e.writeInt(this.FileType),e.writeString(this.FileName),e.writeString(this.Remark)}},{key:"_read",value:function(e){this.MsgUUID=e.readString(),this.FileUUID=e.readString(),this.FileType=e.readInt(),this.FileName=e.readString(),this.Remark=e.readString()}}],[{key:"minWireSize",get:function(){return 8}}]),e}(),q.defineStruct(D.StartSendBusFileT,!0,!0),q.defineSequence(D,"StartSendBusFileSeqHelper","Dispatcher.StartSendBusFileT",!1),D.StartSendBusInfoT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:null,f=arguments.length>11&&void 0!==arguments[11]?arguments[11]:null;(0,h.default)(this,e),this.MsgUUID=t,this.KeyStationID=i,this.KeyLineID=n,this.KeyRailNum=r,this.Sender=s,this.senderName=a,this.WorkTypeValue=o,this.ParentID=c,this.Descrip=u,this.SendState=l,this.Files=d,this.Receivers=f}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.MsgUUID),e.writeInt(this.KeyStationID),e.writeInt(this.KeyLineID),e.writeString(this.KeyRailNum),e.writeString(this.Sender),e.writeString(this.senderName),e.writeInt(this.WorkTypeValue),e.writeString(this.ParentID),e.writeString(this.Descrip),e.writeInt(this.SendState),D.StartSendBusFileSeqHelper.write(e,this.Files),D.SendBusFileReceiveSeqHelper.write(e,this.Receivers)}},{key:"_read",value:function(e){this.MsgUUID=e.readString(),this.KeyStationID=e.readInt(),this.KeyLineID=e.readInt(),this.KeyRailNum=e.readString(),this.Sender=e.readString(),this.senderName=e.readString(),this.WorkTypeValue=e.readInt(),this.ParentID=e.readString(),this.Descrip=e.readString(),this.SendState=e.readInt(),this.Files=D.StartSendBusFileSeqHelper.read(e),this.Receivers=D.SendBusFileReceiveSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 24}}]),e}(),q.defineStruct(D.StartSendBusInfoT,!0,!0),D.StartSendBusFileRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";(0,h.default)(this,e),this.MsgUUID=t,this.FileUUID=i,this.FileName=n,this.FilePath=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.MsgUUID),e.writeString(this.FileUUID),e.writeString(this.FileName),e.writeString(this.FilePath)}},{key:"_read",value:function(e){this.MsgUUID=e.readString(),this.FileUUID=e.readString(),this.FileName=e.readString(),this.FilePath=e.readString()}}],[{key:"minWireSize",get:function(){return 4}}]),e}(),q.defineStruct(D.StartSendBusFileRT,!0,!0),q.defineSequence(D,"StartSendBusFileRTSeqHelper","Dispatcher.StartSendBusFileRT",!1),D.SendBusInfoRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,h.default)(this,e),this.MsgUUID=t,this.Sender=i,this.Files=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.MsgUUID),e.writeString(this.Sender),D.StartSendBusFileRTSeqHelper.write(e,this.Files)}},{key:"_read",value:function(e){this.MsgUUID=e.readString(),this.Sender=e.readString(),this.Files=D.StartSendBusFileRTSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),q.defineStruct(D.SendBusInfoRT,!0,!0),D.SendBusInfoEndT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,h.default)(this,e),this.MsgUUID=t,this.SendState=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.MsgUUID),e.writeInt(this.SendState)}},{key:"_read",value:function(e){this.MsgUUID=e.readString(),this.SendState=e.readInt()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),q.defineStruct(D.SendBusInfoEndT,!0,!0),D.SendBusFileEndT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,h.default)(this,e),this.FileUUID=t,this.SendState=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.FileUUID),e.writeInt(this.SendState)}},{key:"_read",value:function(e){this.FileUUID=e.readString(),this.SendState=e.readInt()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),q.defineStruct(D.SendBusFileEndT,!0,!0),D.BusFileReceivedT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.MsgUUID=t,this.receiver=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.MsgUUID),e.writeString(this.receiver)}},{key:"_read",value:function(e){this.MsgUUID=e.readString(),this.receiver=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),q.defineStruct(D.BusFileReceivedT,!0,!0),D.GetNotReceivedInfoT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.maxnum=t,this.receiver=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.maxnum),e.writeString(this.receiver)}},{key:"_read",value:function(e){this.maxnum=e.readInt(),this.receiver=e.readString()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),q.defineStruct(D.GetNotReceivedInfoT,!0,!0),D.GetNotReceivedInfoRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,h.default)(this,e),this.Sendnum=t,this.HaveOther=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.Sendnum),e.writeBool(this.HaveOther)}},{key:"_read",value:function(e){this.Sendnum=e.readInt(),this.HaveOther=e.readBool()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),q.defineStruct(D.GetNotReceivedInfoRT,!0,!1);D.BusinessOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.BusinessOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),q.defineOperations(D.BusinessOP,D.BusinessOPPrx,["::Dispatcher::BusinessOP","::Ice::Object"],0,{opGetBusinessTypes:[,,,,["Dispatcher.BusinessTypeRTSeqHelper"],[[D.Identity]],,[D.Error],,],opStartSendBusinessInfo:[,,,,[D.SendBusInfoRT],[[D.Identity],[D.StartSendBusInfoT]],,[D.Error],,],opStartSendFile:[,,,,[D.StartSendBusFileRT],[[D.Identity],[D.StartSendBusFileT]],,[D.Error],,],opSendBusinessInfoEnd:[,,,,[1],[[D.Identity],[D.SendBusInfoEndT]],,[D.Error],,],opSendBusinessFileEnd:[,,,,[1],[[D.Identity],[D.SendBusFileEndT]],,[D.Error],,],opChangeBusFileReceive:[,,,,[1],[[D.Identity],[D.SendBusFileReceiveT]],,[D.Error],,],opBusFileReceived:[,,,,,[[D.Identity],[D.BusFileReceivedT]],,[D.Error],,],opGetNotReceivedInfo:[,,,,[D.GetNotReceivedInfoRT],[[D.Identity],[D.GetNotReceivedInfoT]],,[D.Error],,],opDeleteBusInfo:[,,,,[1],[[D.Identity],[7]],,[D.Error],,]});i.Ice._ModuleRegistry;var N=i.Ice.Slice;D.PlayAudioEvT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D.PlayAudioType.PlayAudioTypeNone;(0,h.default)(this,e),this.cid=t,this.uuid=i,this.type=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.uuid),D.PlayAudioType._write(e,this.type)}},{key:"_read",value:function(e){this.cid=e.readString(),this.uuid=e.readString(),this.type=D.PlayAudioType._read(e)}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),N.defineStruct(D.PlayAudioEvT,!0,!0),D.CallDirect=N.defineEnum([["CallDirectNone",0],["CallDirectOut",1],["CallDirectIn",2]]),D.SessionChangeT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:D.CallDirect.CallDirectNone,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:D.CallState.CallStateNone,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:D.CallType.CallTypeNone,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:D.MediaType.MediaTypeNone,d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:"";(0,h.default)(this,e),this.cid=t,this.callingnum=i,this.callingname=n,this.othernum=r,this.othername=s,this.direction=a,this.state=o,this.type=c,this.level=u,this.isVideo=l,this.RoadParameters=d}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.callingnum),e.writeString(this.callingname),e.writeString(this.othernum),e.writeString(this.othername),D.CallDirect._write(e,this.direction),D.CallState._write(e,this.state),D.CallType._write(e,this.type),e.writeInt(this.level),D.MediaType._write(e,this.isVideo),e.writeString(this.RoadParameters)}},{key:"_read",value:function(e){this.cid=e.readString(),this.callingnum=e.readString(),this.callingname=e.readString(),this.othernum=e.readString(),this.othername=e.readString(),this.direction=D.CallDirect._read(e),this.state=D.CallState._read(e),this.type=D.CallType._read(e),this.level=e.readInt(),this.isVideo=D.MediaType._read(e),this.RoadParameters=e.readString()}}],[{key:"minWireSize",get:function(){return 14}}]),e}(),N.defineStruct(D.SessionChangeT,!0,!0),N.defineSequence(D,"SessionChangeTSeqHelper","Dispatcher.SessionChangeT",!1);i.Ice._ModuleRegistry;var B=i.Ice.Slice;D.CMStateChangeT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D.CallState.CallStateNone,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;(0,h.default)(this,e),this.cid=t,this.employeeid=i,this.state=n,this.stateDecorate=r,this.name=s,this.type=a}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.employeeid),D.CallState._write(e,this.state),e.writeString(this.stateDecorate),e.writeString(this.name),e.writeInt(this.type)}},{key:"_read",value:function(e){this.cid=e.readString(),this.employeeid=e.readString(),this.state=D.CallState._read(e),this.stateDecorate=e.readString(),this.name=e.readString(),this.type=e.readInt()}}],[{key:"minWireSize",get:function(){return 9}}]),e}(),B.defineStruct(D.CMStateChangeT,!0,!0),D.CallChangeT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D.CallState.CallStateNone,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;(0,h.default)(this,e),this.employeeid=t,this.state=i,this.othername=n,this.othernumber=r,this.DNSprefix=s,this.islocal=a}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid),D.CallState._write(e,this.state),e.writeString(this.othername),e.writeString(this.othernumber),e.writeString(this.DNSprefix),e.writeInt(this.islocal)}},{key:"_read",value:function(e){this.employeeid=e.readString(),this.state=D.CallState._read(e),this.othername=e.readString(),this.othernumber=e.readString(),this.DNSprefix=e.readString(),this.islocal=e.readInt()}}],[{key:"minWireSize",get:function(){return 9}}]),e}(),B.defineStruct(D.CallChangeT,!0,!0),D.SessionChange1T=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:D.CallDirect.CallDirectNone,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:D.CallState.CallStateNone,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:D.CallType.CallTypeNone,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:D.MediaType.MediaTypeNone,d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:"",f=arguments.length>11&&void 0!==arguments[11]?arguments[11]:"";(0,h.default)(this,e),this.cid=t,this.callingnum=i,this.callingname=n,this.othernum=r,this.othername=s,this.direction=a,this.state=o,this.type=c,this.level=u,this.isVideo=l,this.RoadParameters=d,this.othermsg=f}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.callingnum),e.writeString(this.callingname),e.writeString(this.othernum),e.writeString(this.othername),D.CallDirect._write(e,this.direction),D.CallState._write(e,this.state),D.CallType._write(e,this.type),e.writeInt(this.level),D.MediaType._write(e,this.isVideo),e.writeString(this.RoadParameters),e.writeString(this.othermsg)}},{key:"_read",value:function(e){this.cid=e.readString(),this.callingnum=e.readString(),this.callingname=e.readString(),this.othernum=e.readString(),this.othername=e.readString(),this.direction=D.CallDirect._read(e),this.state=D.CallState._read(e),this.type=D.CallType._read(e),this.level=e.readInt(),this.isVideo=D.MediaType._read(e),this.RoadParameters=e.readString(),this.othermsg=e.readString()}}],[{key:"minWireSize",get:function(){return 15}}]),e}(),B.defineStruct(D.SessionChange1T,!0,!0);D.CallingCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.CallingCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),B.defineOperations(D.CallingCB,D.CallingCBPrx,["::Dispatcher::CallingCB","::Ice::Object"],0,{IFCNotifySessionStateEvt:[,2,2,,,[[D.SessionChangeT]],,,,],IFCNotifySessionStateEvt2:[,2,2,,,[[D.SessionChange1T]],,,,],IFCNotifyConfMemberStateEvt:[,2,2,,,[[D.CMStateChangeT]],,,,],IFCNotifyCallStateEvt:[,2,2,,,[[D.CallChangeT]],,,,],IFCNotifyAudioPlayStateEvt:[,2,2,,,[[D.PlayAudioEvT]],,,,]});D.CallingCBSub=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.CallingCBSubPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),B.defineOperations(D.CallingCBSub,D.CallingCBSubPrx,["::Dispatcher::CallingCBSub","::Ice::Object"],0);i.Ice._ModuleRegistry;var L=i.Ice.Slice;D.NegoTransferT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";(0,h.default)(this,e),this.number=t,this.call1=i,this.call2=n,this.cid1=r,this.cid2=s}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.number),e.writeString(this.call1),e.writeString(this.call2),e.writeString(this.cid1),e.writeString(this.cid2)}},{key:"_read",value:function(e){this.number=e.readString(),this.call1=e.readString(),this.call2=e.readString(),this.cid1=e.readString(),this.cid2=e.readString()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),L.defineStruct(D.NegoTransferT,!0,!0),D.NegoTransferRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.cid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid)}},{key:"_read",value:function(e){this.cid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),L.defineStruct(D.NegoTransferRT,!0,!0),D.PlayAudioT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:D.PlayAudioType.PlayAudioTypeNone,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";(0,h.default)(this,e),this.fname=t,this.empid=i,this.cid=n,this.state=r,this.uuid=s}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.fname),e.writeString(this.empid),e.writeString(this.cid),D.PlayAudioType._write(e,this.state),e.writeString(this.uuid)}},{key:"_read",value:function(e){this.fname=e.readString(),this.empid=e.readString(),this.cid=e.readString(),this.state=D.PlayAudioType._read(e),this.uuid=e.readString()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),L.defineStruct(D.PlayAudioT,!0,!0),D.PlayAudioRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;(0,h.default)(this,e),this.code=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.code)}},{key:"_read",value:function(e){this.code=e.readInt()}}],[{key:"minWireSize",get:function(){return 4}}]),e}(),L.defineStruct(D.PlayAudioRT,!0,!1),D.CallCommonT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.cid=t,this.caller=i,this.called=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.caller),e.writeString(this.called)}},{key:"_read",value:function(e){this.cid=e.readString(),this.caller=e.readString(),this.called=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),L.defineStruct(D.CallCommonT,!0,!0),D.CallCommonRET=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.cid=t,this.caller=i,this.callee=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.caller),e.writeString(this.callee)}},{key:"_read",value:function(e){this.cid=e.readString(),this.caller=e.readString(),this.callee=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),L.defineStruct(D.CallCommonRET,!0,!0),L.defineSequence(D,"CallCommonRESeqHelper","Dispatcher.CallCommonRET",!1),D.CallCommonRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,h.default)(this,e),this.seq=t}return(0,f.default)(e,[{key:"_write",value:function(e){D.CallCommonRESeqHelper.write(e,this.seq)}},{key:"_read",value:function(e){this.seq=D.CallCommonRESeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),L.defineStruct(D.CallCommonRT,!0,!0),D.SpeakerT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D.SpeakType.SpeakTypeNone;(0,h.default)(this,e),this.cid=t,this.employeeid=i,this.speakertypea=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.employeeid),D.SpeakType._write(e,this.speakertypea)}},{key:"_read",value:function(e){this.cid=e.readString(),this.employeeid=e.readString(),this.speakertypea=D.SpeakType._read(e)}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),L.defineStruct(D.SpeakerT,!0,!0),D.SpeakerRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;(0,h.default)(this,e),this.code=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.code)}},{key:"_read",value:function(e){this.code=e.readInt()}}],[{key:"minWireSize",get:function(){return 4}}]),e}(),L.defineStruct(D.SpeakerRT,!0,!1),D.HearT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D.HearType.HearTypeNone;(0,h.default)(this,e),this.cid=t,this.number=i,this.hear=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.number),D.HearType._write(e,this.hear)}},{key:"_read",value:function(e){this.cid=e.readString(),this.number=e.readString(),this.hear=D.HearType._read(e)}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),L.defineStruct(D.HearT,!0,!0),D.HearRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;(0,h.default)(this,e),this.code=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.code)}},{key:"_read",value:function(e){this.code=e.readInt()}}],[{key:"minWireSize",get:function(){return 4}}]),e}(),L.defineStruct(D.HearRT,!0,!1),D.MuteLocalTrackT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,h.default)(this,e),this.cid=t,this.number=i,this.mute=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.number),e.writeBool(this.mute)}},{key:"_read",value:function(e){this.cid=e.readString(),this.number=e.readString(),this.mute=e.readBool()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),L.defineStruct(D.MuteLocalTrackT,!0,!0),D.ForceEndConfeT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.cid=t,this.employeeid=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.employeeid)}},{key:"_read",value:function(e){this.cid=e.readString(),this.employeeid=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),L.defineStruct(D.ForceEndConfeT,!0,!0),D.HoldT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D.HoldType.HoldTypeNone;(0,h.default)(this,e),this.cid=t,this.htype=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),D.HoldType._write(e,this.htype)}},{key:"_read",value:function(e){this.cid=e.readString(),this.htype=D.HoldType._read(e)}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),L.defineStruct(D.HoldT,!0,!0),D.HoldRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.cid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid)}},{key:"_read",value:function(e){this.cid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),L.defineStruct(D.HoldRT,!0,!0),D.HangupT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.cid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid)}},{key:"_read",value:function(e){this.cid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),L.defineStruct(D.HangupT,!0,!0),D.HangupT1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.cid=t,this.member=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.member)}},{key:"_read",value:function(e){this.cid=e.readString(),this.member=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),L.defineStruct(D.HangupT1,!0,!0),D.HangupRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.cid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid)}},{key:"_read",value:function(e){this.cid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),L.defineStruct(D.HangupRT,!0,!0),D.CalleeT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.employeeid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid)}},{key:"_read",value:function(e){this.employeeid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),L.defineStruct(D.CalleeT,!0,!0),L.defineSequence(D,"CalleeSeqHelper","Dispatcher.CalleeT",!1),D.CreateConfT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:D.CallType.CallTypeNone,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:D.MediaType.MediaTypeNone;(0,h.default)(this,e),this.member=t,this.sessname=i,this.sessnum=n,this.caller=r,this.ctype=s,this.isVideo=a}return(0,f.default)(e,[{key:"_write",value:function(e){D.CalleeSeqHelper.write(e,this.member),e.writeString(this.sessname),e.writeString(this.sessnum),e.writeString(this.caller),D.CallType._write(e,this.ctype),D.MediaType._write(e,this.isVideo)}},{key:"_read",value:function(e){this.member=D.CalleeSeqHelper.read(e),this.sessname=e.readString(),this.sessnum=e.readString(),this.caller=e.readString(),this.ctype=D.CallType._read(e),this.isVideo=D.MediaType._read(e)}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),L.defineStruct(D.CreateConfT,!0,!0),D.CreateMcuConfT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:D.CallType.CallTypeNone,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:D.MediaType.MediaTypeNone,o=arguments.length>6&&void 0!==arguments[6]&&arguments[6];(0,h.default)(this,e),this.member=t,this.sessname=i,this.sessnum=n,this.caller=r,this.ctype=s,this.isVideo=a,this.isMcuCall=o}return(0,f.default)(e,[{key:"_write",value:function(e){D.CalleeSeqHelper.write(e,this.member),e.writeString(this.sessname),e.writeString(this.sessnum),e.writeString(this.caller),D.CallType._write(e,this.ctype),D.MediaType._write(e,this.isVideo),e.writeBool(this.isMcuCall)}},{key:"_read",value:function(e){this.member=D.CalleeSeqHelper.read(e),this.sessname=e.readString(),this.sessnum=e.readString(),this.caller=e.readString(),this.ctype=D.CallType._read(e),this.isVideo=D.MediaType._read(e),this.isMcuCall=e.readBool()}}],[{key:"minWireSize",get:function(){return 7}}]),e}(),L.defineStruct(D.CreateMcuConfT,!0,!0),D.CreateMcuConf1T=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:D.CallType.CallTypeNone,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:D.MediaType.MediaTypeNone,o=arguments.length>6&&void 0!==arguments[6]&&arguments[6],c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";(0,h.default)(this,e),this.member=t,this.sessname=i,this.sessnum=n,this.caller=r,this.ctype=s,this.isVideo=a,this.isMcuCall=o,this.defaultsdp=c}return(0,f.default)(e,[{key:"_write",value:function(e){D.CalleeSeqHelper.write(e,this.member),e.writeString(this.sessname),e.writeString(this.sessnum),e.writeString(this.caller),D.CallType._write(e,this.ctype),D.MediaType._write(e,this.isVideo),e.writeBool(this.isMcuCall),e.writeString(this.defaultsdp)}},{key:"_read",value:function(e){this.member=D.CalleeSeqHelper.read(e),this.sessname=e.readString(),this.sessnum=e.readString(),this.caller=e.readString(),this.ctype=D.CallType._read(e),this.isVideo=D.MediaType._read(e),this.isMcuCall=e.readBool(),this.defaultsdp=e.readString()}}],[{key:"minWireSize",get:function(){return 8}}]),e}(),L.defineStruct(D.CreateMcuConf1T,!0,!0),D.CreateConf1T=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:D.CallType.CallTypeNone,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:D.MediaType.MediaTypeNone,o=arguments.length>6&&void 0!==arguments[6]&&arguments[6],c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";(0,h.default)(this,e),this.member=t,this.sessname=i,this.sessnum=n,this.caller=r,this.ctype=s,this.isVideo=a,this.isMcuCall=o,this.defaultsdp=c}return(0,f.default)(e,[{key:"_write",value:function(e){D.CalleeSeqHelper.write(e,this.member),e.writeString(this.sessname),e.writeString(this.sessnum),e.writeString(this.caller),D.CallType._write(e,this.ctype),D.MediaType._write(e,this.isVideo),e.writeBool(this.isMcuCall),e.writeString(this.defaultsdp)}},{key:"_read",value:function(e){this.member=D.CalleeSeqHelper.read(e),this.sessname=e.readString(),this.sessnum=e.readString(),this.caller=e.readString(),this.ctype=D.CallType._read(e),this.isVideo=D.MediaType._read(e),this.isMcuCall=e.readBool(),this.defaultsdp=e.readString()}}],[{key:"minWireSize",get:function(){return 8}}]),e}(),L.defineStruct(D.CreateConf1T,!0,!0),D.CreateConfRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.sessnum=t,this.cid=i,this.empid=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sessnum),e.writeString(this.cid),e.writeString(this.empid)}},{key:"_read",value:function(e){this.sessnum=e.readString(),this.cid=e.readString(),this.empid=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),L.defineStruct(D.CreateConfRT,!0,!0),D.AddMemberT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D.AnswerType.AnswerTypeNone;(0,h.default)(this,e),this.cid=t,this.number=i,this.astype=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.number),D.AnswerType._write(e,this.astype)}},{key:"_read",value:function(e){this.cid=e.readString(),this.number=e.readString(),this.astype=D.AnswerType._read(e)}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),L.defineStruct(D.AddMemberT,!0,!0),D.AddMemberRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.cid=t,this.empid=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.empid)}},{key:"_read",value:function(e){this.cid=e.readString(),this.empid=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),L.defineStruct(D.AddMemberRT,!0,!0),D.DelMemberT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.cid=t,this.number=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.number)}},{key:"_read",value:function(e){this.cid=e.readString(),this.number=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),L.defineStruct(D.DelMemberT,!0,!0),D.DelMemberRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.cid=t,this.empid=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.empid)}},{key:"_read",value:function(e){this.cid=e.readString(),this.empid=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),L.defineStruct(D.DelMemberRT,!0,!0),D.AllCallMemberT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.sid=t,this.cid=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.cid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.cid=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),L.defineStruct(D.AllCallMemberT,!0,!0),D.AllCallMemberRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:D.CallState.CallStateNone,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";(0,h.default)(this,e),this.cid=t,this.employeeid=i,this.name=n,this.type=r,this.state=s,this.stateDecorate=a}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.employeeid),e.writeString(this.name),e.writeInt(this.type),D.CallState._write(e,this.state),e.writeString(this.stateDecorate)}},{key:"_read",value:function(e){this.cid=e.readString(),this.employeeid=e.readString(),this.name=e.readString(),this.type=e.readInt(),this.state=D.CallState._read(e),this.stateDecorate=e.readString()}}],[{key:"minWireSize",get:function(){return 9}}]),e}(),L.defineStruct(D.AllCallMemberRT,!0,!0),L.defineSequence(D,"AllCallMemberRSeqHelper","Dispatcher.AllCallMemberRT",!1),D.PullQueueCallT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.cid=t,this.caller=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.caller)}},{key:"_read",value:function(e){this.cid=e.readString(),this.caller=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),L.defineStruct(D.PullQueueCallT,!0,!0),D.PushCallToQueueT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.cid=t,this.RoadParameters=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.RoadParameters)}},{key:"_read",value:function(e){this.cid=e.readString(),this.RoadParameters=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),L.defineStruct(D.PushCallToQueueT,!0,!0),D.PushCallToQueueT1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.cid=t,this.member=i,this.RoadParameters=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.member),e.writeString(this.RoadParameters)}},{key:"_read",value:function(e){this.cid=e.readString(),this.member=e.readString(),this.RoadParameters=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),L.defineStruct(D.PushCallToQueueT1,!0,!0),D.GetAllSessionT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.employeeid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid)}},{key:"_read",value:function(e){this.employeeid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),L.defineStruct(D.GetAllSessionT,!0,!0),D.GetAllSession1T=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D.CallType.CallTypeNone;(0,h.default)(this,e),this.employeeid=t,this.cType=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid),D.CallType._write(e,this.cType)}},{key:"_read",value:function(e){this.employeeid=e.readString(),this.cType=D.CallType._read(e)}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),L.defineStruct(D.GetAllSession1T,!0,!0),D.SendDTMFbyCidT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.cid=t,this.member=i,this.strdtmf=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.member),e.writeString(this.strdtmf)}},{key:"_read",value:function(e){this.cid=e.readString(),this.member=e.readString(),this.strdtmf=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),L.defineStruct(D.SendDTMFbyCidT,!0,!0),D.OrderDetailT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30;(0,h.default)(this,e),this.number=t,this.index=i,this.ringtime=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.number),e.writeInt(this.index),e.writeInt(this.ringtime)}},{key:"_read",value:function(e){this.number=e.readString(),this.index=e.readInt(),this.ringtime=e.readInt()}}],[{key:"minWireSize",get:function(){return 9}}]),e}(),L.defineStruct(D.OrderDetailT,!0,!0),L.defineSequence(D,"OrderDetailSeqHelper","Dispatcher.OrderDetailT",!1),D.OrderCalledT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,h.default)(this,e),this.called=t,this.details=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.called),D.OrderDetailSeqHelper.write(e,this.details)}},{key:"_read",value:function(e){this.called=e.readString(),this.details=D.OrderDetailSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),L.defineStruct(D.OrderCalledT,!0,!0),L.defineSequence(D,"OrderCalledSeqHelper","Dispatcher.OrderCalledT",!1),D.CalledOrderT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:D.CallType.CallTypeNone,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:D.MediaType.MediaTypeNone;(0,h.default)(this,e),this.calleds=t,this.sessname=i,this.sessnum=n,this.caller=r,this.ctype=s,this.isVideo=a}return(0,f.default)(e,[{key:"_write",value:function(e){D.OrderCalledSeqHelper.write(e,this.calleds),e.writeString(this.sessname),e.writeString(this.sessnum),e.writeString(this.caller),D.CallType._write(e,this.ctype),D.MediaType._write(e,this.isVideo)}},{key:"_read",value:function(e){this.calleds=D.OrderCalledSeqHelper.read(e),this.sessname=e.readString(),this.sessnum=e.readString(),this.caller=e.readString(),this.ctype=D.CallType._read(e),this.isVideo=D.MediaType._read(e)}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),L.defineStruct(D.CalledOrderT,!0,!0),D.CalledOrderRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.sessnum=t,this.cid=i,this.empid=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sessnum),e.writeString(this.cid),e.writeString(this.empid)}},{key:"_read",value:function(e){this.sessnum=e.readString(),this.cid=e.readString(),this.empid=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),L.defineStruct(D.CalledOrderRT,!0,!0),D.AddMemberByCallOrderT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D.AnswerType.AnswerTypeNone,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;(0,h.default)(this,e),this.cid=t,this.number=i,this.astype=n,this.details=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.number),D.AnswerType._write(e,this.astype),D.OrderDetailSeqHelper.write(e,this.details)}},{key:"_read",value:function(e){this.cid=e.readString(),this.number=e.readString(),this.astype=D.AnswerType._read(e),this.details=D.OrderDetailSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 4}}]),e}(),L.defineStruct(D.AddMemberByCallOrderT,!0,!0),D.ReCallDetailT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,h.default)(this,e),this.number=t,this.callnum=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.number),e.writeInt(this.callnum)}},{key:"_read",value:function(e){this.number=e.readString(),this.callnum=e.readInt()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),L.defineStruct(D.ReCallDetailT,!0,!0),L.defineSequence(D,"ReCallDetailSeqHelper","Dispatcher.ReCallDetailT",!1),D.SetReCallNumberT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,h.default)(this,e),this.cid=t,this.details=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),D.ReCallDetailSeqHelper.write(e,this.details)}},{key:"_read",value:function(e){this.cid=e.readString(),this.details=D.ReCallDetailSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),L.defineStruct(D.SetReCallNumberT,!0,!0),D.AllCallMemberRT1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:D.CallState.CallStateNone,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:10,c=arguments.length>7&&void 0!==arguments[7]&&arguments[7],u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:-1;(0,h.default)(this,e),this.cid=t,this.employeeid=i,this.name=n,this.type=r,this.state=s,this.stateDecorate=a,this.level=o,this.IsReCall=c,this.ReCallNum=u}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.employeeid),e.writeString(this.name),e.writeInt(this.type),D.CallState._write(e,this.state),e.writeString(this.stateDecorate),e.writeInt(this.level),e.writeBool(this.IsReCall),e.writeInt(this.ReCallNum)}},{key:"_read",value:function(e){this.cid=e.readString(),this.employeeid=e.readString(),this.name=e.readString(),this.type=e.readInt(),this.state=D.CallState._read(e),this.stateDecorate=e.readString(),this.level=e.readInt(),this.IsReCall=e.readBool(),this.ReCallNum=e.readInt()}}],[{key:"minWireSize",get:function(){return 18}}]),e}(),L.defineStruct(D.AllCallMemberRT1,!0,!0),L.defineSequence(D,"AllCallMemberRSeq1Helper","Dispatcher.AllCallMemberRT1",!1),D.SessionJoinT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.cid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid)}},{key:"_read",value:function(e){this.cid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),L.defineStruct(D.SessionJoinT,!0,!0),L.defineSequence(D,"SessionJoinSeqHelper","Dispatcher.SessionJoinT",!1),D.CreateSOSCallT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:D.MediaType.MediaTypeNone;(0,h.default)(this,e),this.member=t,this.sessname=i,this.sessnum=n,this.caller=r,this.isVideo=s}return(0,f.default)(e,[{key:"_write",value:function(e){D.CalleeSeqHelper.write(e,this.member),e.writeString(this.sessname),e.writeString(this.sessnum),e.writeString(this.caller),D.MediaType._write(e,this.isVideo)}},{key:"_read",value:function(e){this.member=D.CalleeSeqHelper.read(e),this.sessname=e.readString(),this.sessnum=e.readString(),this.caller=e.readString(),this.isVideo=D.MediaType._read(e)}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),L.defineStruct(D.CreateSOSCallT,!0,!0),D.UploadVideoCallT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:D.MediaType.MediaTypeNone;(0,h.default)(this,e),this.member=t,this.sessname=i,this.sessnum=n,this.caller=r,this.isVideo=s}return(0,f.default)(e,[{key:"_write",value:function(e){D.CalleeSeqHelper.write(e,this.member),e.writeString(this.sessname),e.writeString(this.sessnum),e.writeString(this.caller),D.MediaType._write(e,this.isVideo)}},{key:"_read",value:function(e){this.member=D.CalleeSeqHelper.read(e),this.sessname=e.readString(),this.sessnum=e.readString(),this.caller=e.readString(),this.isVideo=D.MediaType._read(e)}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),L.defineStruct(D.UploadVideoCallT,!0,!0),D.TransferVideoT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;(0,h.default)(this,e),this.sessname=t,this.sessnum=i,this.srccid=n,this.srcnumber=r,this.calleds=s}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sessname),e.writeString(this.sessnum),e.writeString(this.srccid),e.writeString(this.srcnumber),D.OrderCalledSeqHelper.write(e,this.calleds)}},{key:"_read",value:function(e){this.sessname=e.readString(),this.sessnum=e.readString(),this.srccid=e.readString(),this.srcnumber=e.readString(),this.calleds=D.OrderCalledSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),L.defineStruct(D.TransferVideoT,!0,!0),D.TransferVideoToMCUT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;(0,h.default)(this,e),this.sessname=t,this.sessnum=i,this.srccid=n,this.srcnumber=r,this.defaultcode=s,this.calleds=a}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sessname),e.writeString(this.sessnum),e.writeString(this.srccid),e.writeString(this.srcnumber),e.writeString(this.defaultcode),D.OrderCalledSeqHelper.write(e,this.calleds)}},{key:"_read",value:function(e){this.sessname=e.readString(),this.sessnum=e.readString(),this.srccid=e.readString(),this.srcnumber=e.readString(),this.defaultcode=e.readString(),this.calleds=D.OrderCalledSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),L.defineStruct(D.TransferVideoToMCUT,!0,!0),D.TransferVideoRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.newcid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.newcid)}},{key:"_read",value:function(e){this.newcid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),L.defineStruct(D.TransferVideoRT,!0,!0),D.AddMemberT1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D.AnswerType.AnswerTypeNone,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:D.SpeakType.SpeakTypeNone,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:D.HearType.HearTypeNone,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;(0,h.default)(this,e),this.cid=t,this.number=i,this.astype=n,this.speakertypea=r,this.hear=s,this.RoadParameters=a,this.details=o}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.number),D.AnswerType._write(e,this.astype),D.SpeakType._write(e,this.speakertypea),D.HearType._write(e,this.hear),e.writeString(this.RoadParameters),D.OrderDetailSeqHelper.write(e,this.details)}},{key:"_read",value:function(e){this.cid=e.readString(),this.number=e.readString(),this.astype=D.AnswerType._read(e),this.speakertypea=D.SpeakType._read(e),this.hear=D.HearType._read(e),this.RoadParameters=e.readString(),this.details=D.OrderDetailSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 7}}]),e}(),L.defineStruct(D.AddMemberT1,!0,!0);D.CallingOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.CallingOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),L.defineOperations(D.CallingOP,D.CallingOPPrx,["::Dispatcher::CallingOP","::Ice::Object"],0,{IFCReqNegoTransfer:[,,,,[D.NegoTransferRT],[[D.Identity],[D.NegoTransferT]],,[D.Error],,],IFCReqPlayAudio:[,,,,[D.PlayAudioRT],[[D.Identity],[D.PlayAudioT]],,[D.Error],,],IFCReqCallPickup:[,,,,[D.CallCommonRT],[[D.Identity],[D.CallCommonT]],,[D.Error],,],IFCReqForbiddenTalk:[,,,,[D.SpeakerRT],[[D.Identity],[D.SpeakerT]],,[D.Error],,],IFCReqForbiddenHear:[,,,,[D.HearRT],[[D.Identity],[D.HearT]],,[D.Error],,],IFCReqMuteLocalMic:[,,,,[1],[[D.Identity],[D.MuteLocalTrackT]],,[D.Error],,],IFCReqMuteLocalCamera:[,,,,[1],[[D.Identity],[D.MuteLocalTrackT]],,[D.Error],,],IFCReqEndConf:[,,,,[D.CommonRequestT],[[D.Identity],[D.ForceEndConfeT]],,[D.Error],,],IFCReqForceBreak:[,,,,[D.CallCommonRT],[[D.Identity],[D.CallCommonT]],,[D.Error],,],IFCReqForceDemolition:[,,,,[D.CallCommonRT],[[D.Identity],[D.CallCommonT]],,[D.Error],,],IFCReqForceInsert:[,,,,[D.CallCommonRT],[[D.Identity],[D.CallCommonT]],,[D.Error],,],IFCReqMonitor:[,,,,[D.CallCommonRT],[[D.Identity],[D.CallCommonT]],,[D.Error],,],IFCReqCallTransfer:[,,,,[D.CallCommonRT],[[D.Identity],[D.CallCommonT]],,[D.Error],,],IFCReqHold:[,,,,[D.HoldRT],[[D.Identity],[D.HoldT]],,[D.Error],,],IFCReqHangup:[,,,,[D.HangupRT],[[D.Identity],[D.HangupT]],,[D.Error],,],IFCReqHangup2:[,,,,[D.HangupRT],[[D.Identity],[D.HangupT1]],,[D.Error],,],IFCReqCreateConf:[,,,,[D.CreateConfRT],[[D.Identity],[D.CreateConfT]],,[D.Error],,],IFCReqCreateMcuConf:[,,,,[D.CreateConfRT],[[D.Identity],[D.CreateMcuConfT]],,[D.Error],,],IFCReqCreateMcuConf2:[,,,,[D.CreateConfRT],[[D.Identity],[D.CreateMcuConf1T]],,[D.Error],,],IFCReqCreateConf2:[,,,,[D.CreateConfRT],[[D.Identity],[D.CreateConf1T]],,[D.Error],,],IFCReqCreateConfWithoutCaller:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqCreateConfByJson:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqStartShareScreen:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqEndShareScreen:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqCreateScheduleConf:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqFixScheduleConf:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqDeleteScheduleConf:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetScheduleConf:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqCreateFileBroadcastConf:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetFileBroadcastState:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqAddMember:[,,,,[D.AddMemberRT],[[D.Identity],[D.AddMemberT]],,[D.Error],,],IFCReqDelMember:[,,,,[D.DelMemberRT],[[D.Identity],[D.DelMemberT]],,[D.Error],,],IFCReqGetAllMember:[,,,,["Dispatcher.AllCallMemberRSeqHelper"],[[D.Identity],[D.AllCallMemberT]],,[D.Error],,],IFCReqPullCallFromQueue:[,,,,[D.CommonRequestT],[[D.Identity],[D.PullQueueCallT]],,[D.Error],,],IFCReqPushCallToQueue:[,,,,[D.CommonRequestT],[[D.Identity],[D.PushCallToQueueT]],,[D.Error],,],IFCReqPushCallToQueue2:[,,,,[D.CommonRequestT],[[D.Identity],[D.PushCallToQueueT1]],,[D.Error],,],IFCReqGetAllSessions:[,,,,["Dispatcher.SessionChangeTSeqHelper"],[[D.Identity],[D.GetAllSessionT]],,[D.Error],,],IFCReqGetAllSessions2:[,,,,["Dispatcher.SessionChangeTSeqHelper"],[[D.Identity],[D.GetAllSession1T]],,[D.Error],,],IFCReqSendDtmf:[,,,,[1],[[D.Identity],[D.SendDTMFbyCidT]],,[D.Error],,],IFCReqCreateCallByOrder:[,,,,[D.CalledOrderRT],[[D.Identity],[D.CalledOrderT]],,[D.Error],,],IFCReqInviteMemberByOrder:[,,,,,[[D.Identity],[D.AddMemberByCallOrderT]],,[D.Error],,],IFCReqSetCallCount:[,,,,,[[D.Identity],[D.SetReCallNumberT]],,[D.Error],,],IFCReqGetAllMember1:[,,,,["Dispatcher.AllCallMemberRSeq1Helper"],[[D.Identity],[D.AllCallMemberT]],,[D.Error],,],IFCReqCallMerge:[,,,,[D.CreateConfRT],[[D.Identity],["Dispatcher.SessionJoinSeqHelper"]],,[D.Error],,],IFCReqCreateSOSCall:[,,,,[D.CreateConfRT],[[D.Identity],[D.CreateSOSCallT]],,[D.Error],,],IFCReqTransferVideo:[,,,,[D.TransferVideoRT],[[D.Identity],[D.TransferVideoT]],,[D.Error],,],IFCReqTransferVideoByJson:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqTransferVideoToMCU:[,,,,[D.TransferVideoRT],[[D.Identity],[D.TransferVideoToMCUT]],,[D.Error],,],IFCReqCreateVideoUploadCall:[,,,,[D.CreateConfRT],[[D.Identity],[D.UploadVideoCallT]],,[D.Error],,],IFCReqTmpCallMerge:[,,,,["Dispatcher.SessionJoinSeqHelper"],[[D.Identity],["Dispatcher.SessionJoinSeqHelper"]],,[D.Error],,],IFCReqAddMember2:[,,,,[D.AddMemberRT],[[D.Identity],[D.AddMemberT1]],,[D.Error],,],IFCReqRecallIntercom:[,,,,,[[D.Identity],[7]],,[D.Error],,],IFCReqGetAllMember2:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetAllFixMeetingSessions:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqAddMemberToFixMeeting:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqRecordScreenByWebrtc:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqPushStartCallAudio:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqPushStopCallAudio:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqPushStartCallAudioByNumber:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqPushStopCallAudioByNumber:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetPushingAudios:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqCheckSessionIsRuning:[,,,,[7],[[D.Identity],[7]],,[D.Error],,]});D.CallingSB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.CallingSBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),L.defineOperations(D.CallingSB,D.CallingSBPrx,["::Dispatcher::CallingSB","::Ice::Object"],0);i.Ice._ModuleRegistry;var H=i.Ice.Slice;D.SendVideoT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"";(0,h.default)(this,e),this.sid=t,this.cid=i,this.employeeid=n,this.ip=r,this.port=s,this.codec=a,this.stream=o,this.framerate=c,this.agentid=u}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.cid),e.writeString(this.employeeid),e.writeString(this.ip),e.writeString(this.port),e.writeString(this.codec),e.writeString(this.stream),e.writeString(this.framerate),e.writeString(this.agentid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.cid=e.readString(),this.employeeid=e.readString(),this.ip=e.readString(),this.port=e.readString(),this.codec=e.readString(),this.stream=e.readString(),this.framerate=e.readString(),this.agentid=e.readString()}}],[{key:"minWireSize",get:function(){return 9}}]),e}(),H.defineStruct(D.SendVideoT,!0,!0),D.SendVideoRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";(0,h.default)(this,e),this.sid=t,this.ip=i,this.port=n,this.agentid=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.ip),e.writeString(this.port),e.writeString(this.agentid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.ip=e.readString(),this.port=e.readString(),this.agentid=e.readString()}}],[{key:"minWireSize",get:function(){return 4}}]),e}(),H.defineStruct(D.SendVideoRT,!0,!0),D.GetVideoT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"";(0,h.default)(this,e),this.sid=t,this.cid=i,this.employeeid=n,this.ip=r,this.port=s,this.employeeiddst=a,this.codec=o,this.stream=c,this.framerate=u,this.agentid=l}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.cid),e.writeString(this.employeeid),e.writeString(this.ip),e.writeString(this.port),e.writeString(this.employeeiddst),e.writeString(this.codec),e.writeString(this.stream),e.writeString(this.framerate),e.writeString(this.agentid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.cid=e.readString(),this.employeeid=e.readString(),this.ip=e.readString(),this.port=e.readString(),this.employeeiddst=e.readString(),this.codec=e.readString(),this.stream=e.readString(),this.framerate=e.readString(),this.agentid=e.readString()}}],[{key:"minWireSize",get:function(){return 10}}]),e}(),H.defineStruct(D.GetVideoT,!0,!0),D.GetVideoRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.sid=t,this.cid=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.cid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.cid=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),H.defineStruct(D.GetVideoRT,!0,!0),D.ChangeVideoT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"";(0,h.default)(this,e),this.sid=t,this.cid=i,this.employeeid=n,this.ip=r,this.port=s,this.employeeiddst=a,this.codec=o,this.stream=c,this.framerate=u,this.agentid=l}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.cid),e.writeString(this.employeeid),e.writeString(this.ip),e.writeString(this.port),e.writeString(this.employeeiddst),e.writeString(this.codec),e.writeString(this.stream),e.writeString(this.framerate),e.writeString(this.agentid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.cid=e.readString(),this.employeeid=e.readString(),this.ip=e.readString(),this.port=e.readString(),this.employeeiddst=e.readString(),this.codec=e.readString(),this.stream=e.readString(),this.framerate=e.readString(),this.agentid=e.readString()}}],[{key:"minWireSize",get:function(){return 10}}]),e}(),H.defineStruct(D.ChangeVideoT,!0,!0),D.ChangeVideoRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";(0,h.default)(this,e),this.sid=t,this.streamid=i,this.ip=n,this.port=r,this.codec=s,this.stream=a,this.framerate=o,this.agentid=c}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.streamid),e.writeString(this.ip),e.writeString(this.port),e.writeString(this.codec),e.writeString(this.stream),e.writeString(this.framerate),e.writeString(this.agentid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.streamid=e.readString(),this.ip=e.readString(),this.port=e.readString(),this.codec=e.readString(),this.stream=e.readString(),this.framerate=e.readString(),this.agentid=e.readString()}}],[{key:"minWireSize",get:function(){return 8}}]),e}(),H.defineStruct(D.ChangeVideoRT,!0,!0),D.ReleaseVideoT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";(0,h.default)(this,e),this.sid=t,this.cid=i,this.employeeid=n,this.ip=r,this.port=s,this.streamid=a,this.employeeiddst=o,this.agentid=c}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.cid),e.writeString(this.employeeid),e.writeString(this.ip),e.writeString(this.port),e.writeString(this.streamid),e.writeString(this.employeeiddst),e.writeString(this.agentid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.cid=e.readString(),this.employeeid=e.readString(),this.ip=e.readString(),this.port=e.readString(),this.streamid=e.readString(),this.employeeiddst=e.readString(),this.agentid=e.readString()}}],[{key:"minWireSize",get:function(){return 8}}]),e}(),H.defineStruct(D.ReleaseVideoT,!0,!0),D.ReleaseVideoRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.sid=t,this.agentid=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.agentid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.agentid=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),H.defineStruct(D.ReleaseVideoRT,!0,!0),D.PushVideoT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:D.PushVideoType.PushVideoTypeNone,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";(0,h.default)(this,e),this.sid=t,this.cid=i,this.employeeid=n,this.streamid=r,this.revid=s,this.IsPush=a,this.agentid=o}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.cid),e.writeString(this.employeeid),e.writeString(this.streamid),e.writeString(this.revid),D.PushVideoType._write(e,this.IsPush),e.writeString(this.agentid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.cid=e.readString(),this.employeeid=e.readString(),this.streamid=e.readString(),this.revid=e.readString(),this.IsPush=D.PushVideoType._read(e),this.agentid=e.readString()}}],[{key:"minWireSize",get:function(){return 7}}]),e}(),H.defineStruct(D.PushVideoT,!0,!0),D.PushVideoRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.sid=t,this.agentid=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.agentid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.agentid=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),H.defineStruct(D.PushVideoRT,!0,!0),D.SendVideoEvT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";(0,h.default)(this,e),this.sid=t,this.ip=i,this.port=n,this.agentid=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.ip),e.writeString(this.port),e.writeString(this.agentid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.ip=e.readString(),this.port=e.readString(),this.agentid=e.readString()}}],[{key:"minWireSize",get:function(){return 4}}]),e}(),H.defineStruct(D.SendVideoEvT,!0,!0),D.GetVideoEvT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"";(0,h.default)(this,e),this.sid=t,this.streamid=i,this.ip=n,this.port=r,this.codec=s,this.stream=a,this.framerate=o,this.employeeid=c,this.cid=u,this.agentid=l}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.streamid),e.writeString(this.ip),e.writeString(this.port),e.writeString(this.codec),e.writeString(this.stream),e.writeString(this.framerate),e.writeString(this.employeeid),e.writeString(this.cid),e.writeString(this.agentid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.streamid=e.readString(),this.ip=e.readString(),this.port=e.readString(),this.codec=e.readString(),this.stream=e.readString(),this.framerate=e.readString(),this.employeeid=e.readString(),this.cid=e.readString(),this.agentid=e.readString()}}],[{key:"minWireSize",get:function(){return 10}}]),e}(),H.defineStruct(D.GetVideoEvT,!0,!0),D.GetKeyFrameT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.cid=t,this.employeeid=i,this.deviceid=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.employeeid),e.writeString(this.deviceid)}},{key:"_read",value:function(e){this.cid=e.readString(),this.employeeid=e.readString(),this.deviceid=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),H.defineStruct(D.GetKeyFrameT,!0,!0);i.Ice._ModuleRegistry;var V=i.Ice.Slice;D.CallingVCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.CallingVCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),V.defineOperations(D.CallingVCB,D.CallingVCBPrx,["::Dispatcher::CallingVCB","::Ice::Object"],0,{IFCNotifySendVideoEvt:[,2,2,,,[[D.SendVideoEvT]],,,,],IFCNotifyGetVideoEvt:[,2,2,,,[[D.GetVideoEvT]],,,,]});i.Ice._ModuleRegistry;var U=i.Ice.Slice;D.GetMemberVideoRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";(0,h.default)(this,e),this.sid=t,this.cid=i,this.fsip=n,this.fsport=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.cid),e.writeString(this.fsip),e.writeString(this.fsport)}},{key:"_read",value:function(e){this.sid=e.readString(),this.cid=e.readString(),this.fsip=e.readString(),this.fsport=e.readString()}}],[{key:"minWireSize",get:function(){return 4}}]),e}(),U.defineStruct(D.GetMemberVideoRT,!0,!0),U.defineSequence(D,"ReceiveNumSeqHelper","Ice.StringHelper",!1),D.MCUPushMemberToOtherT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,h.default)(this,e),this.cid=t,this.pushednum=i,this.ReceiveNumbers=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.pushednum),D.ReceiveNumSeqHelper.write(e,this.ReceiveNumbers)}},{key:"_read",value:function(e){this.cid=e.readString(),this.pushednum=e.readString(),this.ReceiveNumbers=D.ReceiveNumSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),U.defineStruct(D.MCUPushMemberToOtherT,!0,!0),D.StopMCUPushMemberToOtherT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.cid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid)}},{key:"_read",value:function(e){this.cid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),U.defineStruct(D.StopMCUPushMemberToOtherT,!0,!0),D.SendVideoRT1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";(0,h.default)(this,e),this.sid=t,this.ip=i,this.port=n,this.agentid=r,this.codec=s}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.ip),e.writeString(this.port),e.writeString(this.agentid),e.writeString(this.codec)}},{key:"_read",value:function(e){this.sid=e.readString(),this.ip=e.readString(),this.port=e.readString(),this.agentid=e.readString(),this.codec=e.readString()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),U.defineStruct(D.SendVideoRT1,!0,!0);D.CallingVOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.CallingVOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),U.defineOperations(D.CallingVOP,D.CallingVOPPrx,["::Dispatcher::CallingVOP","::Ice::Object"],0,{IFCReqSendVideo:[,,,,[D.SendVideoRT],[[D.Identity],[D.SendVideoT]],,[D.Error],,],IFCReqSendVideo2:[,,,,[D.SendVideoRT1],[[D.Identity],[D.SendVideoT]],,[D.Error],,],IFCReqSendVideoByJson:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetVideo:[,,,,[D.GetVideoRT],[[D.Identity],[D.GetVideoT]],,[D.Error],,],IFCReqWebrtcGetVideo:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqChangeVideo:[,,,,[D.ChangeVideoRT],[[D.Identity],[D.ChangeVideoT]],,[D.Error],,],IFCReqReleaseVideo:[,,,,[D.ReleaseVideoRT],[[D.Identity],[D.ReleaseVideoT]],,[D.Error],,],IFCReqReleaseVideoByJson:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqPushVideo:[,,,,[D.PushVideoRT],[[D.Identity],[D.PushVideoT]],,[D.Error],,],IFCReqGetKeyFrame:[,,,,,[[D.Identity],[D.GetKeyFrameT]],,[D.Error],,],IFCReqGetMemberVideo:[,,,,[D.GetMemberVideoRT],[[D.Identity],[D.GetVideoT]],,[D.Error],,],IFCReqMcuPushMemberToOther:[,,,,,[[D.Identity],[D.MCUPushMemberToOtherT]],,[D.Error],,],IFCReqStopMcuPushMemberToOther:[,,,,,[[D.Identity],[D.StopMCUPushMemberToOtherT]],,[D.Error],,],IFCReqChangeVideoCodec:[,,,,[7],[[D.Identity],[7]],,[D.Error],,]});var j=i.Ice._ModuleRegistry,G=i.Ice.Slice,z=j.module("DispatcherDB");z.EMPLOYEEINFO=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,f=arguments.length>11&&void 0!==arguments[11]?arguments[11]:"",g=arguments.length>12&&void 0!==arguments[12]?arguments[12]:0,p=arguments.length>13&&void 0!==arguments[13]?arguments[13]:0,v=arguments.length>14&&void 0!==arguments[14]?arguments[14]:0,m=arguments.length>15&&void 0!==arguments[15]?arguments[15]:"",y=arguments.length>16&&void 0!==arguments[16]?arguments[16]:"",_=arguments.length>17&&void 0!==arguments[17]?arguments[17]:"",S=arguments.length>18&&void 0!==arguments[18]?arguments[18]:0,I=arguments.length>19&&void 0!==arguments[19]?arguments[19]:"",w=arguments.length>20&&void 0!==arguments[20]?arguments[20]:0;(0,h.default)(this,e),this.mID=t,this.mEmployeeID=i,this.mPassword=n,this.mEmployeeLevel=r,this.mDepartID=s,this.mRoleID=a,this.mName=o,this.mAddTime=c,this.mModifyTime=u,this.mTheState=l,this.mTheType=d,this.mRemark=f,this.mLatitude=g,this.mLongitude=p,this.mIsRecord=v,this.mMonName=m,this.mMonPasswd=y,this.mMonIP=_,this.mMonPort=S,this.mMonFlag=I,this.mIsVideo=w}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.mID),e.writeString(this.mEmployeeID),e.writeString(this.mPassword),e.writeInt(this.mEmployeeLevel),e.writeInt(this.mDepartID),e.writeInt(this.mRoleID),e.writeString(this.mName),e.writeString(this.mAddTime),e.writeString(this.mModifyTime),e.writeInt(this.mTheState),e.writeInt(this.mTheType),e.writeString(this.mRemark),e.writeFloat(this.mLatitude),e.writeFloat(this.mLongitude),e.writeInt(this.mIsRecord),e.writeString(this.mMonName),e.writeString(this.mMonPasswd),e.writeString(this.mMonIP),e.writeInt(this.mMonPort),e.writeString(this.mMonFlag),e.writeInt(this.mIsVideo)}},{key:"_read",value:function(e){this.mID=e.readInt(),this.mEmployeeID=e.readString(),this.mPassword=e.readString(),this.mEmployeeLevel=e.readInt(),this.mDepartID=e.readInt(),this.mRoleID=e.readInt(),this.mName=e.readString(),this.mAddTime=e.readString(),this.mModifyTime=e.readString(),this.mTheState=e.readInt(),this.mTheType=e.readInt(),this.mRemark=e.readString(),this.mLatitude=e.readFloat(),this.mLongitude=e.readFloat(),this.mIsRecord=e.readInt(),this.mMonName=e.readString(),this.mMonPasswd=e.readString(),this.mMonIP=e.readString(),this.mMonPort=e.readInt(),this.mMonFlag=e.readString(),this.mIsVideo=e.readInt()}}],[{key:"minWireSize",get:function(){return 54}}]),e}(),G.defineStruct(z.EMPLOYEEINFO,!1,!0),G.defineSequence(z,"EMPLOYEEINFOSeqHelper","DispatcherDB.EMPLOYEEINFO",!1),z.GROUPEMPLOYEE=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";(0,h.default)(this,e),this.mID=t,this.mGroupID=i,this.mEmployeeID=n,this.mAddTime=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.mID),e.writeInt(this.mGroupID),e.writeString(this.mEmployeeID),e.writeString(this.mAddTime)}},{key:"_read",value:function(e){this.mID=e.readInt(),this.mGroupID=e.readInt(),this.mEmployeeID=e.readString(),this.mAddTime=e.readString()}}],[{key:"minWireSize",get:function(){return 10}}]),e}(),G.defineStruct(z.GROUPEMPLOYEE,!0,!0),G.defineSequence(z,"GROUPEMPLOYEESeqHelper","DispatcherDB.GROUPEMPLOYEE",!1),z.EmployeeRelatedAll=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,f=arguments.length>11&&void 0!==arguments[11]?arguments[11]:"",g=arguments.length>12&&void 0!==arguments[12]?arguments[12]:0,p=arguments.length>13&&void 0!==arguments[13]?arguments[13]:"",v=arguments.length>14&&void 0!==arguments[14]?arguments[14]:0,m=arguments.length>15&&void 0!==arguments[15]?arguments[15]:"",y=arguments.length>16&&void 0!==arguments[16]?arguments[16]:0,_=arguments.length>17&&void 0!==arguments[17]?arguments[17]:"";(0,h.default)(this,e),this.mID=t,this.mEmployeeID=i,this.mPassword=n,this.mEmployeeLevel=r,this.mDepartID=s,this.mRoleID=a,this.mName=o,this.mAddTime=c,this.mModifyTime=u,this.mTheState=l,this.mTheType=d,this.mRemark=f,this.mGroupID=g,this.mGroupName=p,this.mGroupParentID=v,this.mGroupNum=m,this.mGroupType=y,this.mRoleName=_}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.mID),e.writeString(this.mEmployeeID),e.writeString(this.mPassword),e.writeInt(this.mEmployeeLevel),e.writeInt(this.mDepartID),e.writeInt(this.mRoleID),e.writeString(this.mName),e.writeString(this.mAddTime),e.writeString(this.mModifyTime),e.writeInt(this.mTheState),e.writeInt(this.mTheType),e.writeString(this.mRemark),e.writeInt(this.mGroupID),e.writeString(this.mGroupName),e.writeInt(this.mGroupParentID),e.writeString(this.mGroupNum),e.writeInt(this.mGroupType),e.writeString(this.mRoleName)}},{key:"_read",value:function(e){this.mID=e.readInt(),this.mEmployeeID=e.readString(),this.mPassword=e.readString(),this.mEmployeeLevel=e.readInt(),this.mDepartID=e.readInt(),this.mRoleID=e.readInt(),this.mName=e.readString(),this.mAddTime=e.readString(),this.mModifyTime=e.readString(),this.mTheState=e.readInt(),this.mTheType=e.readInt(),this.mRemark=e.readString(),this.mGroupID=e.readInt(),this.mGroupName=e.readString(),this.mGroupParentID=e.readInt(),this.mGroupNum=e.readString(),this.mGroupType=e.readInt(),this.mRoleName=e.readString()}}],[{key:"minWireSize",get:function(){return 45}}]),e}(),G.defineStruct(z.EmployeeRelatedAll,!0,!0),G.defineSequence(z,"EmployeeRelatedAllSeqHelper","DispatcherDB.EmployeeRelatedAll",!1),z.DEVICECONFIG=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"",d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:"";(0,h.default)(this,e),this.mID=t,this.mStartDevice=i,this.mSumDevice=n,this.mServerIP=r,this.mServerPort=s,this.mTheState=a,this.mModifyTime=o,this.mAddTime=c,this.mTheType=u,this.mUserName=l,this.mUserPWD=d}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.mID),e.writeString(this.mStartDevice),e.writeInt(this.mSumDevice),e.writeString(this.mServerIP),e.writeInt(this.mServerPort),e.writeInt(this.mTheState),e.writeString(this.mModifyTime),e.writeString(this.mAddTime),e.writeInt(this.mTheType),e.writeString(this.mUserName),e.writeString(this.mUserPWD)}},{key:"_read",value:function(e){this.mID=e.readInt(),this.mStartDevice=e.readString(),this.mSumDevice=e.readInt(),this.mServerIP=e.readString(),this.mServerPort=e.readInt(),this.mTheState=e.readInt(),this.mModifyTime=e.readString(),this.mAddTime=e.readString(),this.mTheType=e.readInt(),this.mUserName=e.readString(),this.mUserPWD=e.readString()}}],[{key:"minWireSize",get:function(){return 26}}]),e}(),G.defineStruct(z.DEVICECONFIG,!0,!0),G.defineSequence(z,"DEVICECONFIGSeqHelper","DispatcherDB.DEVICECONFIG",!1),z.SYSPARAMETER=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;(0,h.default)(this,e),this.mTheKey=t,this.mTheValue=i,this.mTheState=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.mTheKey),e.writeString(this.mTheValue),e.writeInt(this.mTheState)}},{key:"_read",value:function(e){this.mTheKey=e.readString(),this.mTheValue=e.readString(),this.mTheState=e.readInt()}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),G.defineStruct(z.SYSPARAMETER,!0,!0),G.defineSequence(z,"SYSPARAMETERSeqHelper","DispatcherDB.SYSPARAMETER",!1),z.SYSCONFIGREAD=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";(0,h.default)(this,e),this.mTableName=t,this.mAddTime=i,this.mReadTime=n,this.mState=r,this.mValue1=s}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.mTableName),e.writeString(this.mAddTime),e.writeString(this.mReadTime),e.writeInt(this.mState),e.writeString(this.mValue1)}},{key:"_read",value:function(e){this.mTableName=e.readString(),this.mAddTime=e.readString(),this.mReadTime=e.readString(),this.mState=e.readInt(),this.mValue1=e.readString()}}],[{key:"minWireSize",get:function(){return 8}}]),e}(),G.defineStruct(z.SYSCONFIGREAD,!0,!0),G.defineSequence(z,"SYSCONFIGREADSeqHelper","DispatcherDB.SYSCONFIGREAD",!1),z.CALLCALLLOGType=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0;(0,h.default)(this,e),this.mCid=t,this.mCaller=i,this.mCalled=n,this.mCreateTime=r,this.mReleaseTime=s,this.mTimeLength=a,this.mCallType=o,this.mCallResult=c,this.mReleaseReason=u}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.mCid),e.writeString(this.mCaller),e.writeString(this.mCalled),e.writeString(this.mCreateTime),e.writeString(this.mReleaseTime),e.writeInt(this.mTimeLength),e.writeInt(this.mCallType),e.writeInt(this.mCallResult),e.writeInt(this.mReleaseReason)}},{key:"_read",value:function(e){this.mCid=e.readString(),this.mCaller=e.readString(),this.mCalled=e.readString(),this.mCreateTime=e.readString(),this.mReleaseTime=e.readString(),this.mTimeLength=e.readInt(),this.mCallType=e.readInt(),this.mCallResult=e.readInt(),this.mReleaseReason=e.readInt()}}],[{key:"minWireSize",get:function(){return 21}}]),e}(),G.defineStruct(z.CALLCALLLOGType,!0,!0),G.defineSequence(z,"CALLCALLLOGSeqHelper","DispatcherDB.CALLCALLLOGType",!1),z.CALLRECORDType=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"";(0,h.default)(this,e),this.mCid=t,this.mRecordName=i,this.mSubPath=n,this.mReadTimes=r,this.mRecordServerID=s,this.mCreateTime=a,this.mReleaseTime=o,this.mTimeLength=c,this.mRecordType=u,this.mWebPath=l}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.mCid),e.writeString(this.mRecordName),e.writeString(this.mSubPath),e.writeInt(this.mReadTimes),e.writeInt(this.mRecordServerID),e.writeString(this.mCreateTime),e.writeString(this.mReleaseTime),e.writeInt(this.mTimeLength),e.writeInt(this.mRecordType),e.writeString(this.mWebPath)}},{key:"_read",value:function(e){this.mCid=e.readString(),this.mRecordName=e.readString(),this.mSubPath=e.readString(),this.mReadTimes=e.readInt(),this.mRecordServerID=e.readInt(),this.mCreateTime=e.readString(),this.mReleaseTime=e.readString(),this.mTimeLength=e.readInt(),this.mRecordType=e.readInt(),this.mWebPath=e.readString()}}],[{key:"minWireSize",get:function(){return 22}}]),e}(),G.defineStruct(z.CALLRECORDType,!0,!0),G.defineSequence(z,"CALLRECORDSeqHelper","DispatcherDB.CALLRECORDType",!1),z.VIDEO=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";(0,h.default)(this,e),this.mID=t,this.mVideoIP=i,this.mVideoPort=n,this.mUser=r,this.mPassWord=s,this.mShowName=a,this.mTheType=o,this.mBindEmployeeID=c}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.mID),e.writeString(this.mVideoIP),e.writeString(this.mVideoPort),e.writeString(this.mUser),e.writeString(this.mPassWord),e.writeString(this.mShowName),e.writeInt(this.mTheType),e.writeString(this.mBindEmployeeID)}},{key:"_read",value:function(e){this.mID=e.readInt(),this.mVideoIP=e.readString(),this.mVideoPort=e.readString(),this.mUser=e.readString(),this.mPassWord=e.readString(),this.mShowName=e.readString(),this.mTheType=e.readInt(),this.mBindEmployeeID=e.readString()}}],[{key:"minWireSize",get:function(){return 14}}]),e}(),G.defineStruct(z.VIDEO,!0,!0),G.defineSequence(z,"VIDEOSeqHelper","DispatcherDB.VIDEO",!1),z.VIDEORECORDType=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"";(0,h.default)(this,e),this.mCid=t,this.mRecordName=i,this.mSubPath=n,this.mReadTimes=r,this.mRecordServerID=s,this.mCreateTime=a,this.mReleaseTime=o,this.mTimeLength=c,this.mRecordType=u,this.mWebPath=l}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.mCid),e.writeString(this.mRecordName),e.writeString(this.mSubPath),e.writeInt(this.mReadTimes),e.writeInt(this.mRecordServerID),e.writeString(this.mCreateTime),e.writeString(this.mReleaseTime),e.writeInt(this.mTimeLength),e.writeInt(this.mRecordType),e.writeString(this.mWebPath)}},{key:"_read",value:function(e){this.mCid=e.readString(),this.mRecordName=e.readString(),this.mSubPath=e.readString(),this.mReadTimes=e.readInt(),this.mRecordServerID=e.readInt(),this.mCreateTime=e.readString(),this.mReleaseTime=e.readString(),this.mTimeLength=e.readInt(),this.mRecordType=e.readInt(),this.mWebPath=e.readString()}}],[{key:"minWireSize",get:function(){return 22}}]),e}(),G.defineStruct(z.VIDEORECORDType,!0,!0),G.defineSequence(z,"VIDEORECORDSeqHelper","DispatcherDB.VIDEORECORDType",!1),z.MSGINFO=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0;(0,h.default)(this,e),this.mID=t,this.mMsgID=i,this.mSendID=n,this.mSendName=r,this.mMsgBody=s,this.mSendTime=a,this.mIsUpload=o,this.mMsgType=c}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.mID),e.writeString(this.mMsgID),e.writeString(this.mSendID),e.writeString(this.mSendName),e.writeString(this.mMsgBody),e.writeString(this.mSendTime),e.writeInt(this.mIsUpload),e.writeInt(this.mMsgType)}},{key:"_read",value:function(e){this.mID=e.readInt(),this.mMsgID=e.readString(),this.mSendID=e.readString(),this.mSendName=e.readString(),this.mMsgBody=e.readString(),this.mSendTime=e.readString(),this.mIsUpload=e.readInt(),this.mMsgType=e.readInt()}}],[{key:"minWireSize",get:function(){return 17}}]),e}(),G.defineStruct(z.MSGINFO,!0,!0),G.defineSequence(z,"MSGINFOSeqHelper","DispatcherDB.MSGINFO",!1),z.MSGSENDRS=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";(0,h.default)(this,e),this.mID=t,this.mMsgID=i,this.mReceiverID=n,this.mReceiverName=r,this.mIsFinish=s,this.mRecvTime=a}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.mID),e.writeString(this.mMsgID),e.writeString(this.mReceiverID),e.writeString(this.mReceiverName),e.writeString(this.mIsFinish),e.writeString(this.mRecvTime)}},{key:"_read",value:function(e){this.mID=e.readInt(),this.mMsgID=e.readString(),this.mReceiverID=e.readString(),this.mReceiverName=e.readString(),this.mIsFinish=e.readString(),this.mRecvTime=e.readString()}}],[{key:"minWireSize",get:function(){return 9}}]),e}(),G.defineStruct(z.MSGSENDRS,!0,!0),G.defineSequence(z,"MSGSENDRSSeqHelper","DispatcherDB.MSGSENDRS",!1),z.ROUTECFG=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.mID=t,this.mRouteNum=i,this.mIP=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.mID),e.writeString(this.mRouteNum),e.writeString(this.mIP)}},{key:"_read",value:function(e){this.mID=e.readInt(),this.mRouteNum=e.readString(),this.mIP=e.readString()}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),G.defineStruct(z.ROUTECFG,!0,!0),G.defineSequence(z,"ROUTECFGSeqHelper","DispatcherDB.ROUTECFG",!1),z.IVRCFG=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.mID=t,this.mIvrName=i,this.mIvrNum=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.mID),e.writeString(this.mIvrName),e.writeString(this.mIvrNum)}},{key:"_read",value:function(e){this.mID=e.readInt(),this.mIvrName=e.readString(),this.mIvrNum=e.readString()}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),G.defineStruct(z.IVRCFG,!0,!0),G.defineSequence(z,"IVRCFGSeqHelper","DispatcherDB.IVRCFG",!1),z.MDVSCFG=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.mID=t,this.mMdvsName=i,this.mIP=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.mID),e.writeString(this.mMdvsName),e.writeString(this.mIP)}},{key:"_read",value:function(e){this.mID=e.readInt(),this.mMdvsName=e.readString(),this.mIP=e.readString()}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),G.defineStruct(z.MDVSCFG,!0,!0),G.defineSequence(z,"MDVSCFGSeqHelper","DispatcherDB.MDVSCFG",!1),z.GISDETAIL=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;(0,h.default)(this,e),this.mEmployeeid=t,this.mLatitude=i,this.mLongitude=n,this.mPositionTime=r,this.mMessage=s,this.type=a}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.mEmployeeid),e.writeDouble(this.mLatitude),e.writeDouble(this.mLongitude),e.writeString(this.mPositionTime),e.writeString(this.mMessage),e.writeInt(this.type)}},{key:"_read",value:function(e){this.mEmployeeid=e.readString(),this.mLatitude=e.readDouble(),this.mLongitude=e.readDouble(),this.mPositionTime=e.readString(),this.mMessage=e.readString(),this.type=e.readInt()}}],[{key:"minWireSize",get:function(){return 23}}]),e}(),G.defineStruct(z.GISDETAIL,!1,!0),G.defineSequence(z,"GISDETAILSeqHelper","DispatcherDB.GISDETAIL",!1),z.PREPLANINFO=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";(0,h.default)(this,e),this.mPlanName=t,this.mPlanID=i,this.mPlanPasswd=n,this.mPlanType=r,this.mPlanAddr=s,this.mPlanAlloc=a}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.mPlanName),e.writeInt(this.mPlanID),e.writeString(this.mPlanPasswd),e.writeInt(this.mPlanType),e.writeString(this.mPlanAddr),e.writeString(this.mPlanAlloc)}},{key:"_read",value:function(e){this.mPlanName=e.readString(),this.mPlanID=e.readInt(),this.mPlanPasswd=e.readString(),this.mPlanType=e.readInt(),this.mPlanAddr=e.readString(),this.mPlanAlloc=e.readString()}}],[{key:"minWireSize",get:function(){return 12}}]),e}(),G.defineStruct(z.PREPLANINFO,!0,!0),G.defineSequence(z,"PREPLANINFOSeqHelper","DispatcherDB.PREPLANINFO",!1),z.PREPLANINSTRUMENT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;(0,h.default)(this,e),this.mPlanInstID=t,this.mPlanInstName=i,this.mPlanInstType=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.mPlanInstID),e.writeString(this.mPlanInstName),e.writeInt(this.mPlanInstType)}},{key:"_read",value:function(e){this.mPlanInstID=e.readInt(),this.mPlanInstName=e.readString(),this.mPlanInstType=e.readInt()}}],[{key:"minWireSize",get:function(){return 9}}]),e}(),G.defineStruct(z.PREPLANINSTRUMENT,!0,!0),G.defineSequence(z,"PREPLANINSTRUMENTSeqHelper","DispatcherDB.PREPLANINSTRUMENT",!1),z.PREPLANINSTRUREF=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,h.default)(this,e),this.mPlanID=t,this.mPlanInstID=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.mPlanID),e.writeInt(this.mPlanInstID)}},{key:"_read",value:function(e){this.mPlanID=e.readInt(),this.mPlanInstID=e.readInt()}}],[{key:"minWireSize",get:function(){return 8}}]),e}(),G.defineStruct(z.PREPLANINSTRUREF,!0,!1),G.defineSequence(z,"PREPLANINSTRUREFSeqHelper","DispatcherDB.PREPLANINSTRUREF",!0),z.PREPLANMEMBER=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.mPlanInstID=t,this.mEmployeeID=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.mPlanInstID),e.writeString(this.mEmployeeID)}},{key:"_read",value:function(e){this.mPlanInstID=e.readInt(),this.mEmployeeID=e.readString()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),G.defineStruct(z.PREPLANMEMBER,!0,!0),G.defineSequence(z,"PREPLANMEMBERSeqHelper","DispatcherDB.PREPLANMEMBER",!1);i.Ice._ModuleRegistry;var $=i.Ice.Slice;F.CommSrv=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),F.CommSrvPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),$.defineOperations(F.CommSrv,F.CommSrvPrx,["::Dispatcher::CommSrv","::Ice::Object"],0);F.CommCli=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),F.CommCliPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),$.defineOperations(F.CommCli,F.CommCliPrx,["::Dispatcher::CommCli","::Ice::Object"],0);i.Ice._ModuleRegistry;var W=i.Ice.Slice;D.TreeT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;(0,h.default)(this,e),this.userId=t,this.groupnum=i,this.dnsprefix=n,this.type=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.userId),e.writeString(this.groupnum),e.writeString(this.dnsprefix),e.writeInt(this.type)}},{key:"_read",value:function(e){this.userId=e.readString(),this.groupnum=e.readString(),this.dnsprefix=e.readString(),this.type=e.readInt()}}],[{key:"minWireSize",get:function(){return 7}}]),e}(),W.defineStruct(D.TreeT,!0,!0);D.UserT=function(e){(0,g.default)(i,e);var t=_(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:D.RegisterState.RegisterStateNone,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:D.CallState.CallStateNone,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"";return(0,h.default)(this,i),e=t.call(this),e.userid=n,e.username=r,e.type=s,e.dnsprefix=a,e.islocal=o,e.rstate=c,e.cstate=u,e.othernumber=l,e.othername=d,e}return(0,f.default)(i,[{key:"_iceWriteMemberImpl",value:function(e){e.writeString(this.userid),e.writeString(this.username),e.writeInt(this.type),e.writeString(this.dnsprefix),e.writeInt(this.islocal),D.RegisterState._write(e,this.rstate),D.CallState._write(e,this.cstate),e.writeString(this.othernumber),e.writeString(this.othername)}},{key:"_iceReadMemberImpl",value:function(e){this.userid=e.readString(),this.username=e.readString(),this.type=e.readInt(),this.dnsprefix=e.readString(),this.islocal=e.readInt(),this.rstate=D.RegisterState._read(e),this.cstate=D.CallState._read(e),this.othernumber=e.readString(),this.othername=e.readString()}}]),i}(i.Ice.Value),W.defineValue(D.UserT,["::Dispatcher::UserT","::Ice::Object"][0],!1),W.defineSequence(D,"UserSeqHelper","Ice.ObjectHelper",!1,"Dispatcher.UserT"),W.defineSequence(D,"GroupSeqHelper","Ice.ObjectHelper",!1,"Dispatcher.GroupT");D.GroupT=function(e){(0,g.default)(i,e);var t=_(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:D.GroupType.GroupTypeNone,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,f=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0;return(0,h.default)(this,i),e=t.call(this),e.id=n,e.groupnum=r,e.groupname=s,e.type=a,e.user=o,e.group=c,e.dnsprefix=u,e.islocal=l,e.canshowall=d,e.level=f,e}return(0,f.default)(i,[{key:"_iceWriteMemberImpl",value:function(e){e.writeInt(this.id),e.writeString(this.groupnum),e.writeString(this.groupname),D.GroupType._write(e,this.type),D.UserSeqHelper.write(e,this.user),D.GroupSeqHelper.write(e,this.group),e.writeString(this.dnsprefix),e.writeInt(this.islocal),e.writeInt(this.canshowall),e.writeInt(this.level)}},{key:"_iceReadMemberImpl",value:function(e){this.id=e.readInt(),this.groupnum=e.readString(),this.groupname=e.readString(),this.type=D.GroupType._read(e),this.user=D.UserSeqHelper.read(e),this.group=D.GroupSeqHelper.read(e),this.dnsprefix=e.readString(),this.islocal=e.readInt(),this.canshowall=e.readInt(),this.level=e.readInt()}}]),i}(i.Ice.Value),W.defineValue(D.GroupT,["::Dispatcher::GroupT","::Ice::Object"][0],!1);D.TreeRT=function(e){(0,g.default)(i,e);var t=_(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,h.default)(this,i),e=t.call(this),e.roots=n,e}return(0,f.default)(i,[{key:"_iceWriteMemberImpl",value:function(e){D.GroupSeqHelper.write(e,this.roots)}},{key:"_iceReadMemberImpl",value:function(e){this.roots=D.GroupSeqHelper.read(e)}}]),i}(i.Ice.Value),W.defineValue(D.TreeRT,["::Dispatcher::TreeRT","::Ice::Object"][0],!1),D.VersionElem=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";(0,h.default)(this,e),this.name=t,this.type=i,this.version=n,this.time=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.name),e.writeString(this.type),e.writeString(this.version),e.writeString(this.time)}},{key:"_read",value:function(e){this.name=e.readString(),this.type=e.readString(),this.version=e.readString(),this.time=e.readString()}}],[{key:"minWireSize",get:function(){return 4}}]),e}(),W.defineStruct(D.VersionElem,!0,!0),W.defineSequence(D,"VersionSeqHelper","Dispatcher.VersionElem",!1),D.VersionEventT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,h.default)(this,e),this.vseq=t}return(0,f.default)(e,[{key:"_write",value:function(e){D.VersionSeqHelper.write(e,this.vseq)}},{key:"_read",value:function(e){this.vseq=D.VersionSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),W.defineStruct(D.VersionEventT,!0,!0),D.GetVersionT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.dummy=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.dummy)}},{key:"_read",value:function(e){this.dummy=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),W.defineStruct(D.GetVersionT,!0,!0),D.GetVersionRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,h.default)(this,e),this.vseq=t}return(0,f.default)(e,[{key:"_write",value:function(e){D.VersionSeqHelper.write(e,this.vseq)}},{key:"_read",value:function(e){this.vseq=D.VersionSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),W.defineStruct(D.GetVersionRT,!0,!0);i.Ice._ModuleRegistry;var K=i.Ice.Slice;D.ConfigureCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.ConfigureCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),K.defineOperations(D.ConfigureCB,D.ConfigureCBPrx,["::Dispatcher::ConfigureCB","::Ice::Object"],0);D.ConfigureCBSub=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.ConfigureCBSubPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),K.defineOperations(D.ConfigureCBSub,D.ConfigureCBSubPrx,["::Dispatcher::ConfigureCBSub","::Ice::Object"],0);i.Ice._ModuleRegistry;var J=i.Ice.Slice;D.FXDeviceNumberRT=function(e){(0,g.default)(i,e);var t=_(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0;return(0,h.default)(this,i),e=t.call(this),e.dev=n,e.num=r,e.name=s,e.orgid=a,e.domain=o,e.latitude=c,e.longitude=u,e.remarks=l,e.status=d,e}return(0,f.default)(i,[{key:"_iceWriteMemberImpl",value:function(e){e.writeString(this.dev),e.writeString(this.num),e.writeString(this.name),e.writeString(this.orgid),e.writeString(this.domain),e.writeString(this.latitude),e.writeString(this.longitude),e.writeString(this.remarks),e.writeInt(this.status)}},{key:"_iceReadMemberImpl",value:function(e){this.dev=e.readString(),this.num=e.readString(),this.name=e.readString(),this.orgid=e.readString(),this.domain=e.readString(),this.latitude=e.readString(),this.longitude=e.readString(),this.remarks=e.readString(),this.status=e.readInt()}}]),i}(i.Ice.Value),J.defineValue(D.FXDeviceNumberRT,["::Dispatcher::FXDeviceNumberRT","::Ice::Object"][0],!1),J.defineSequence(D,"NumbersRTHelper","Ice.ObjectHelper",!1,"Dispatcher.FXDeviceNumberRT"),J.defineSequence(D,"OrgsRTHelper","Ice.ObjectHelper",!1,"Dispatcher.FXOrgRT");D.FXOrgRT=function(e){(0,g.default)(i,e);var t=_(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null;return(0,h.default)(this,i),e=t.call(this),e.id=n,e.name=r,e.parentid=s,e.ldap=a,e.domain=o,e.remarks=c,e.ordernum=u,e.Orgs=l,e.Numbers=d,e}return(0,f.default)(i,[{key:"_iceWriteMemberImpl",value:function(e){e.writeString(this.id),e.writeString(this.name),e.writeString(this.parentid),e.writeString(this.ldap),e.writeString(this.domain),e.writeString(this.remarks),e.writeString(this.ordernum),D.OrgsRTHelper.write(e,this.Orgs),D.NumbersRTHelper.write(e,this.Numbers)}},{key:"_iceReadMemberImpl",value:function(e){this.id=e.readString(),this.name=e.readString(),this.parentid=e.readString(),this.ldap=e.readString(),this.domain=e.readString(),this.remarks=e.readString(),this.ordernum=e.readString(),this.Orgs=D.OrgsRTHelper.read(e),this.Numbers=D.NumbersRTHelper.read(e)}}]),i}(i.Ice.Value),J.defineValue(D.FXOrgRT,["::Dispatcher::FXOrgRT","::Ice::Object"][0],!1);D.FXDeviceRT=function(e){(0,g.default)(i,e);var t=_(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return(0,h.default)(this,i),e=t.call(this),e.id=n,e.name=r,e.remarks=s,e.Orgs=a,e}return(0,f.default)(i,[{key:"_iceWriteMemberImpl",value:function(e){e.writeString(this.id),e.writeString(this.name),e.writeString(this.remarks),D.OrgsRTHelper.write(e,this.Orgs)}},{key:"_iceReadMemberImpl",value:function(e){this.id=e.readString(),this.name=e.readString(),this.remarks=e.readString(),this.Orgs=D.OrgsRTHelper.read(e)}}]),i}(i.Ice.Value),J.defineValue(D.FXDeviceRT,["::Dispatcher::FXDeviceRT","::Ice::Object"][0],!1),D.LocalDNSPrefixRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.prefix=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.prefix)}},{key:"_read",value:function(e){this.prefix=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),J.defineStruct(D.LocalDNSPrefixRT,!0,!0),J.defineSequence(D,"FXDeviceSeqHelper","Ice.ObjectHelper",!1,"Dispatcher.FXDeviceRT"),D.GetFXDeviceT=function(){function e(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.getdetail=t,this.remarks=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeBool(this.getdetail),e.writeString(this.remarks)}},{key:"_read",value:function(e){this.getdetail=e.readBool(),this.remarks=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),J.defineStruct(D.GetFXDeviceT,!0,!0),D.GetFXDeviceDetailT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.fxDeviceid=t,this.orgid=i,this.remarks=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.fxDeviceid),e.writeString(this.orgid),e.writeString(this.remarks)}},{key:"_read",value:function(e){this.fxDeviceid=e.readString(),this.orgid=e.readString(),this.remarks=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),J.defineStruct(D.GetFXDeviceDetailT,!0,!0),D.KeyConfig=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.Key=t,this.Value1=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.Key),e.writeString(this.Value1)}},{key:"_read",value:function(e){this.Key=e.readString(),this.Value1=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),J.defineStruct(D.KeyConfig,!0,!0),J.defineSequence(D,"KeyConfigSeqHelper","Dispatcher.KeyConfig",!1),D.MealConfig=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;(0,h.default)(this,e),this.id=t,this.SetMealName=i,this.SetMealState=n,this.Details=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.id),e.writeString(this.SetMealName),e.writeInt(this.SetMealState),D.KeyConfigSeqHelper.write(e,this.Details)}},{key:"_read",value:function(e){this.id=e.readInt(),this.SetMealName=e.readString(),this.SetMealState=e.readInt(),this.Details=D.KeyConfigSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 10}}]),e}(),J.defineStruct(D.MealConfig,!0,!0),D.KeyConfig1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.TheKey=t,this.TheValue=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.TheKey),e.writeString(this.TheValue)}},{key:"_read",value:function(e){this.TheKey=e.readString(),this.TheValue=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),J.defineStruct(D.KeyConfig1,!0,!0),J.defineSequence(D,"KeyConfigSeq1Helper","Dispatcher.KeyConfig1",!1),D.MealConfig1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;(0,h.default)(this,e),this.id=t,this.SetMealName=i,this.SetMealState=n,this.Details=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.id),e.writeString(this.SetMealName),e.writeInt(this.SetMealState),D.KeyConfigSeq1Helper.write(e,this.Details)}},{key:"_read",value:function(e){this.id=e.readInt(),this.SetMealName=e.readString(),this.SetMealState=e.readInt(),this.Details=D.KeyConfigSeq1Helper.read(e)}}],[{key:"minWireSize",get:function(){return 10}}]),e}(),J.defineStruct(D.MealConfig1,!0,!0);D.ConfigureOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.ConfigureOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),J.defineOperations(D.ConfigureOP,D.ConfigureOPPrx,["::Dispatcher::ConfigureOP","::Ice::Object"],0,{IFCReqGetOrganization:[,,,,["Dispatcher.TreeRT",!0],[[D.Identity],[D.TreeT]],,[D.Error],,!0],IFCReqGetVersion:[,,,,[D.GetVersionRT],[[D.Identity],[D.GetVersionT]],,[D.Error],,],IFCReqGetLocalUserByType:[,,,,["Dispatcher.TreeRT",!0],[[D.Identity],[D.TreeT]],,[D.Error],,!0],IFCReqGet28181Devices:[,,,,["Dispatcher.FXDeviceSeqHelper"],[[D.Identity],[D.GetFXDeviceT]],,[D.Error],,!0],IFCReqGet28181DeviceDetail:[,,,,["Dispatcher.FXDeviceSeqHelper"],[[D.Identity],[D.GetFXDeviceDetailT]],,[D.Error],,!0],IFCReqGetConfigByKey:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetLocalPrefix:[,,,,[D.LocalDNSPrefixRT],[[D.Identity]],,[D.Error],,],IFCReqGetConfigByKeys:[,,,,["Dispatcher.KeyConfigSeqHelper"],[[D.Identity],["Dispatcher.KeyConfigSeqHelper"]],,[D.Error],,],IFCReqGetMealConfig:[,,,,[D.MealConfig],[[D.Identity]],,[D.Error],,],IFCReqGetConfigByKeys2:[,,,,["Dispatcher.KeyConfigSeq1Helper"],[[D.Identity],["Dispatcher.KeyConfigSeq1Helper"]],,[D.Error],,],IFCReqGetMealConfig2:[,,,,[D.MealConfig1],[[D.Identity]],,[D.Error],,],IFCReqGetOrganizationByJson:[,,,,[7],[[D.Identity],[D.TreeT]],,[D.Error],,],IFCReqGetGroupDetail:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqSetDeviceChange2:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetLicenseInfo:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetRecordInfo:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetEMServerInfo:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetEmployeeBindingNumbers:[,,,,[7],[[D.Identity],[7]],,[D.Error],,]});D.ConfigureSB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.ConfigureSBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),J.defineOperations(D.ConfigureSB,D.ConfigureSBPrx,["::Dispatcher::ConfigureSB","::Ice::Object"],0);i.Ice._ModuleRegistry;var X=i.Ice.Slice;D.DecoderDeviceInfo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;(0,h.default)(this,e),this.id=t,this.videoip=i,this.videoport=n,this.user=r,this.Password=s,this.showname=a,this.thetype=o}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.id),e.writeString(this.videoip),e.writeString(this.videoport),e.writeString(this.user),e.writeString(this.Password),e.writeString(this.showname),e.writeInt(this.thetype)}},{key:"_read",value:function(e){this.id=e.readString(),this.videoip=e.readString(),this.videoport=e.readString(),this.user=e.readString(),this.Password=e.readString(),this.showname=e.readString(),this.thetype=e.readInt()}}],[{key:"minWireSize",get:function(){return 10}}]),e}(),X.defineStruct(D.DecoderDeviceInfo,!0,!0),X.defineSequence(D,"DecoderDeviceInfoSeqHelper","Dispatcher.DecoderDeviceInfo",!1),D.DecoderDisplayChan=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;(0,h.default)(this,e),this.byChan=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeByte(this.byChan)}},{key:"_read",value:function(e){this.byChan=e.readByte()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),X.defineStruct(D.DecoderDisplayChan,!0,!1),X.defineSequence(D,"DecoderDisplayChanSeqHelper","Dispatcher.DecoderDisplayChan",!0),D.DecoderDisplayCfg=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;(0,h.default)(this,e),this.Channelid=t,this.dwWindowMode=i,this.byAudio=n,this.byVedioFormat=r,this.dwResolution=s,this.byJoinDecChans=a,this.byDispChanType=o}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.Channelid),e.writeInt(this.dwWindowMode),e.writeByte(this.byAudio),e.writeByte(this.byVedioFormat),e.writeInt(this.dwResolution),D.DecoderDisplayChanSeqHelper.write(e,this.byJoinDecChans),e.writeByte(this.byDispChanType)}},{key:"_read",value:function(e){this.Channelid=e.readInt(),this.dwWindowMode=e.readInt(),this.byAudio=e.readByte(),this.byVedioFormat=e.readByte(),this.dwResolution=e.readInt(),this.byJoinDecChans=D.DecoderDisplayChanSeqHelper.read(e),this.byDispChanType=e.readByte()}}],[{key:"minWireSize",get:function(){return 16}}]),e}(),X.defineStruct(D.DecoderDisplayCfg,!0,!0),X.defineSequence(D,"DecoderDisplayCfgSeqHelper","Dispatcher.DecoderDisplayCfg",!1);i.Ice._ModuleRegistry;var Y=i.Ice.Slice;D.DecoderCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.DecoderCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),Y.defineOperations(D.DecoderCB,D.DecoderCBPrx,["::Dispatcher::DecoderCB","::Ice::Object"],0);i.Ice._ModuleRegistry;var Z=i.Ice.Slice;D.GetDisplayCfg=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.Decoderid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.Decoderid)}},{key:"_read",value:function(e){this.Decoderid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Z.defineStruct(D.GetDisplayCfg,!0,!0),D.SetDecoderCfg=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new D.DecoderDisplayCfg;(0,h.default)(this,e),this.Decoderid=t,this.Cfg=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.Decoderid),D.DecoderDisplayCfg.write(e,this.Cfg)}},{key:"_read",value:function(e){this.Decoderid=e.readString(),this.Cfg=D.DecoderDisplayCfg.read(e,this.Cfg)}}],[{key:"minWireSize",get:function(){return 17}}]),e}(),Z.defineStruct(D.SetDecoderCfg,!0,!0),D.RetDecoderAllCfg=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,h.default)(this,e),this.Decoderid=t,this.Cfgs=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.Decoderid),D.DecoderDisplayCfgSeqHelper.write(e,this.Cfgs)}},{key:"_read",value:function(e){this.Decoderid=e.readString(),this.Cfgs=D.DecoderDisplayCfgSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Z.defineStruct(D.RetDecoderAllCfg,!0,!0),D.opDecoderInfo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";(0,h.default)(this,e),this.Decoderid=t,this.Channel=i,this.cid=n,this.disNumber=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.Decoderid),e.writeString(this.Channel),e.writeString(this.cid),e.writeString(this.disNumber)}},{key:"_read",value:function(e){this.Decoderid=e.readString(),this.Channel=e.readString(),this.cid=e.readString(),this.disNumber=e.readString()}}],[{key:"minWireSize",get:function(){return 4}}]),e}(),Z.defineStruct(D.opDecoderInfo,!0,!0),D.opTransferRTPInfo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;(0,h.default)(this,e),this.cid=t,this.Number=i,this.disip=n,this.disport=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.Number),e.writeString(this.disip),e.writeInt(this.disport)}},{key:"_read",value:function(e){this.cid=e.readString(),this.Number=e.readString(),this.disip=e.readString(),this.disport=e.readInt()}}],[{key:"minWireSize",get:function(){return 7}}]),e}(),Z.defineStruct(D.opTransferRTPInfo,!0,!0),D.opDecoderByUrlInfo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.Decoderid=t,this.Channel=i,this.url=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.Decoderid),e.writeString(this.Channel),e.writeString(this.url)}},{key:"_read",value:function(e){this.Decoderid=e.readString(),this.Channel=e.readString(),this.url=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Z.defineStruct(D.opDecoderByUrlInfo,!0,!0),D.opDecoderByVideoInfo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:D.emVideoDeviceType.VDTNONE;(0,h.default)(this,e),this.Decoderid=t,this.Channel=i,this.VideoUser=n,this.VideoPwd=r,this.VideoIP=s,this.VideoPort=a,this.VideoChannel=o,this.VideoType=c}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.Decoderid),e.writeString(this.Channel),e.writeString(this.VideoUser),e.writeString(this.VideoPwd),e.writeString(this.VideoIP),e.writeString(this.VideoPort),e.writeString(this.VideoChannel),D.emVideoDeviceType._write(e,this.VideoType)}},{key:"_read",value:function(e){this.Decoderid=e.readString(),this.Channel=e.readString(),this.VideoUser=e.readString(),this.VideoPwd=e.readString(),this.VideoIP=e.readString(),this.VideoPort=e.readString(),this.VideoChannel=e.readString(),this.VideoType=D.emVideoDeviceType._read(e)}}],[{key:"minWireSize",get:function(){return 8}}]),e}(),Z.defineStruct(D.opDecoderByVideoInfo,!0,!0),D.opChannelStatus=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.Decoderid=t,this.Channel=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.Decoderid),e.writeString(this.Channel)}},{key:"_read",value:function(e){this.Decoderid=e.readString(),this.Channel=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Z.defineStruct(D.opChannelStatus,!0,!0),D.RetDecoderAbility=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D.emVideoDeviceType.VDTNONE,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;(0,h.default)(this,e),this.Decoderid=t,this.VideoType=i,this.InChannelsNum=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.Decoderid),D.emVideoDeviceType._write(e,this.VideoType),e.writeInt(this.InChannelsNum)}},{key:"_read",value:function(e){this.Decoderid=e.readString(),this.VideoType=D.emVideoDeviceType._read(e),this.InChannelsNum=e.readInt()}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),Z.defineStruct(D.RetDecoderAbility,!0,!0);D.DecoderOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.DecoderOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),Z.defineOperations(D.DecoderOP,D.DecoderOPPrx,["::Dispatcher::DecoderOP","::Ice::Object"],0,{IFCReqGetDecoderDevice:[,,,,["Dispatcher.DecoderDeviceInfoSeqHelper"],[[D.Identity]],,[D.Error],,],IFCReqGetDisplayConfig:[,,,,[D.RetDecoderAllCfg],[[D.Identity],[D.GetDisplayCfg]],,,,],IFCReqGetDecoderAbility:[,,,,[D.RetDecoderAbility],[[D.Identity],[D.GetDisplayCfg]],,,,],IFCReqGetChannelDecodeState:[,,,,[1],[[D.Identity],[D.opChannelStatus]],,,,],IFCReqSetDisplayConfig:[,,,,[1],[[D.Identity],[D.SetDecoderCfg]],,,,],IFCReqStartDecode:[,,,,[1],[[D.Identity],[D.opDecoderInfo]],,,,],IFCReqStartDecodeByJson:[,,,,[1],[[D.Identity],[7]],,,,],IFCReqStartDecodeByURL:[,,,,[1],[[D.Identity],[D.opDecoderByUrlInfo]],,,,],IFCReqStopDecode:[,,,,[1],[[D.Identity],[D.opDecoderInfo]],,,,],IFCReqStopDecodeByURL:[,,,,[1],[[D.Identity],[D.opDecoderByUrlInfo]],,,,],IFCReqTransferRtp:[,,,,[1],[[D.Identity],[D.opTransferRTPInfo]],,,,],IFCReqStopTransferRtp:[,,,,[1],[[D.Identity],[D.opTransferRTPInfo]],,,,],IFCReqStartDecodeByVideoInfo:[,,,,[1],[[D.Identity],[D.opDecoderByVideoInfo]],,,,],IFCReqStopDecodeByVideoInfo:[,,,,[1],[[D.Identity],[D.opDecoderByVideoInfo]],,,,],IFCReqGetDisplayConfig2:[,,,,[7],[[D.Identity],[D.GetDisplayCfg]],,,,],IFCReqSetWindows:[,,,,[7],[[D.Identity],[7],[7]],,,,],IFCReqGetSubWindowsStatus:[,,,,[7],[[D.Identity],[7],[7]],,,,],IFCReqSetDisplayPosition:[,,,,[1],[[D.Identity],[7],[7]],,,,],IFCReqSetScreenMode:[,,,,[1],[[D.Identity],[7],[7]],,,,]});var Q=i.Ice._ModuleRegistry,ee=(i.Ice.Slice,Q.module("EM"));ee.EMError=function(e){(0,g.default)(n,e);var t=_(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return(0,h.default)(this,n),e=t.call(this,s),e.code=i,e.desc=r,e}return(0,f.default)(n,[{key:"_mostDerivedType",value:function(){return ee.EMError}},{key:"_writeMemberImpl",value:function(e){e.writeInt(this.code),e.writeString(this.desc)}},{key:"_readMemberImpl",value:function(e){this.code=e.readInt(),this.desc=e.readString()}}],[{key:"_parent",get:function(){return i.Ice.UserException}},{key:"_id",get:function(){return"::EM::EMError"}}]),n}(i.Ice.UserException);var te=i.Ice._ModuleRegistry,ie=i.Ice.Slice,ne=te.module("EM");ne.EMIdentity=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.user=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.user)}},{key:"_read",value:function(e){this.user=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),ie.defineStruct(ne.EMIdentity,!0,!0);i.Ice._ModuleRegistry;var re=i.Ice.Slice;ee.EMEventCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),ee.EMEventCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),re.defineOperations(ee.EMEventCB,ee.EMEventCBPrx,["::EM::EMEventCB","::Ice::Object"],0,{EMCBNotifyNewEvent:[,2,2,,,[[7]],,[ee.EMError],,],EMCBNotifyEventStateChanged:[,2,2,,,[[7]],,[ee.EMError],,],EMCBNotifyNewTask:[,2,2,,,[[7]],,[ee.EMError],,],EMCBNotifyTaskStateChanged:[,2,2,,,[[7]],,[ee.EMError],,]});i.Ice._ModuleRegistry;var se=i.Ice.Slice;ee.EMMaterialCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),ee.EMMaterialCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),se.defineOperations(ee.EMMaterialCB,ee.EMMaterialCBPrx,["::EM::EMMaterialCB","::Ice::Object"],0,{EMCBNotifyWarehouseChanged:[,2,2,,,[[7],[7]],,[ee.EMError],,],EMCBNotifyMaterialChanged:[,2,2,,,[[7],[7]],,[ee.EMError],,]});i.Ice._ModuleRegistry;var ae=i.Ice.Slice;ee.EMCli=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i,null,[{key:"_iceImplements",get:function(){return[ee.EMEventCB,ee.EMMaterialCB]}}]),i}(i.Ice.Object),ee.EMCliPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i,null,[{key:"_implements",get:function(){return[ee.EMEventCBPrx,ee.EMMaterialCBPrx]}}]),i}(i.Ice.ObjectPrx),ae.defineOperations(ee.EMCli,ee.EMCliPrx,["::EM::EMCli","::EM::EMEventCB","::EM::EMMaterialCB","::Ice::Object"],0,{EMHeartbeatCB:[,2,2,,,[[7]],,[ee.EMError],,],EMDataChangedCB:[,2,2,,,[[7]],,[ee.EMError],,]});i.Ice._ModuleRegistry;var oe=i.Ice.Slice;ee.EMDutyOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),ee.EMDutyOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),oe.defineOperations(ee.EMDutyOP,ee.EMDutyOPPrx,["::EM::EMDutyOP","::Ice::Object"],0,{EMDutyAddOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMDutyDelOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMDutyFixOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMDutyGetOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,]});i.Ice._ModuleRegistry;var ce=i.Ice.Slice;ee.EMEventOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),ee.EMEventOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),ce.defineOperations(ee.EMEventOP,ee.EMEventOPPrx,["::EM::EMEventOP","::Ice::Object"],0,{EMEventGetParam:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMEventReportOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMEventViewOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMEventConfirmOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMEventStartProcessOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMEventProcessOverOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMEventDistributeOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMEventReturnOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMGetEventsOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMGetTaskBySelfOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMGetEventDetialOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMGetStatisticsDataByEmployeeOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMGetStatisticsDataByStateOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMGetStatisticsDataByLevelOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMGetStatisticsDataByTypeOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,]});i.Ice._ModuleRegistry;var ue=i.Ice.Slice;ee.EMIFCCli=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),ee.EMIFCCliPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),ue.defineOperations(ee.EMIFCCli,ee.EMIFCCliPrx,["::EM::EMIFCCli","::Ice::Object"],0,{EMCBSendDBChange:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMCBHeartBeat:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,]});i.Ice._ModuleRegistry;var le=i.Ice.Slice;ee.EMIFCSrv=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),ee.EMIFCSrvPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),le.defineOperations(ee.EMIFCSrv,ee.EMIFCSrvPrx,["::EM::EMIFCSrv","::Ice::Object"],0,{EMOPSetClientInfo:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,]});i.Ice._ModuleRegistry;var de=i.Ice.Slice;ee.EMMaterialOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),ee.EMMaterialOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),de.defineOperations(ee.EMMaterialOP,ee.EMMaterialOPPrx,["::EM::EMMaterialOP","::Ice::Object"],0,{EMMaterialAddWareHouseOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMMaterialDelWareHouseOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMMaterialFixWareHouseInfoOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMMaterialGetWareHouseOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMMaterialAddMaterialOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMMaterialDelMaterialOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMMaterialFixMaterialInfoOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMMaterialGetMaterialOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,]});i.Ice._ModuleRegistry;var he=i.Ice.Slice;ee.EMPlanOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),ee.EMPlanOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),he.defineOperations(ee.EMPlanOP,ee.EMPlanOPPrx,["::EM::EMPlanOP","::Ice::Object"],0,{EMPlanGetFilesOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,]});i.Ice._ModuleRegistry;var fe=i.Ice.Slice;ee.EMSrv=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i,null,[{key:"_iceImplements",get:function(){return[ee.EMEventOP,ee.EMPlanOP,ee.EMMaterialOP,ee.EMDutyOP]}}]),i}(i.Ice.Object),ee.EMSrvPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i,null,[{key:"_implements",get:function(){return[ee.EMEventOPPrx,ee.EMPlanOPPrx,ee.EMMaterialOPPrx,ee.EMDutyOPPrx]}}]),i}(i.Ice.ObjectPrx),fe.defineOperations(ee.EMSrv,ee.EMSrvPrx,["::EM::EMDutyOP","::EM::EMEventOP","::EM::EMMaterialOP","::EM::EMPlanOP","::EM::EMSrv","::Ice::Object"],4,{EMRegisterOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMUnRegisterOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,],EMHeartbeatOP:[,2,2,,[7],[[ee.EMIdentity],[7]],,[ee.EMError],,]});var ge=i.Ice._ModuleRegistry,pe=(i.Ice.Slice,ge.module("Dispatcher"));Object.defineProperty(pe,"EventEmployeeStateReg",{value:"Employee.State.Reg"}),Object.defineProperty(pe,"EventEmployeeStateCall",{value:"Employee.State.Call"}),Object.defineProperty(pe,"EventPttState",{value:"Ptt.State"}),Object.defineProperty(pe,"EventPttStateSpeaker",{value:"Ptt.State.Speaker"}),Object.defineProperty(pe,"EventPttWaiting",{value:"Ptt.Waiting"}),Object.defineProperty(pe,"EventPttReject",{value:"Ptt.Reject"}),Object.defineProperty(pe,"EventHistoryVideoInfo",{value:"Video.Role.History.Info"}),Object.defineProperty(pe,"EventSessionStateChange",{value:"Session.State.Change"}),Object.defineProperty(pe,"EventSessionMemberChange",{value:"Session.Member.Change"}),Object.defineProperty(pe,"EventSessionSendToCreater",{value:"Session.SendToCreater.State"}),Object.defineProperty(pe,"EventSessionSendToAllDTP",{value:"Session.SendToAllDTP.State"}),Object.defineProperty(pe,"EventSessionMemberToAllDTP",{value:"Session.SendMemberToAllDTP.State"}),Object.defineProperty(pe,"EventSessionStateChangeFixMeeting",{value:"Session.State.Change.FixMeeting"}),Object.defineProperty(pe,"EventSessionMemberChangeFixMeeting",{value:"Session.Member.Change.FixMeeting"}),Object.defineProperty(pe,"EventCallVideoGetVideoEvent",{value:"CallVideo.GetVideo.Event"}),Object.defineProperty(pe,"EventBusFileOnReceive",{value:"BusFile.OnReceive"}),Object.defineProperty(pe,"EventCALLPLAYAUDIOCB",{value:"CallPlay.Audio.CB"}),Object.defineProperty(pe,"EventGisPositionChange",{value:"GIS.Position.Change"}),Object.defineProperty(pe,"EventFileMsgOnReceive",{value:"FileMsg.OnReceive"}),Object.defineProperty(pe,"EventMsgOnReceive",{value:"Msg.OnReceive"}),Object.defineProperty(pe,"EventEmployeeChannelChange",{value:"Employee.Relay.ChannelChange"}),Object.defineProperty(pe,"EventDBChangeGroupChange",{value:"DB.Group.Change"}),Object.defineProperty(pe,"EventRegistKickout",{value:"Regist.Kickout.Event"}),Object.defineProperty(pe,"EventPushCallAudioToOther",{value:"Push.Call.Audio.To.Other"});i.Ice._ModuleRegistry;var ve=i.Ice.Slice;D.FaxT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";(0,h.default)(this,e),this.fid=t,this.fname=i,this.srcnum=n,this.dstnum=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.fid),e.writeString(this.fname),e.writeString(this.srcnum),e.writeString(this.dstnum)}},{key:"_read",value:function(e){this.fid=e.readString(),this.fname=e.readString(),this.srcnum=e.readString(),this.dstnum=e.readString()}}],[{key:"minWireSize",get:function(){return 4}}]),e}(),ve.defineStruct(D.FaxT,!0,!0),D.FaxRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.fid=t,this.fname=i,this.fpath=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.fid),e.writeString(this.fname),e.writeString(this.fpath)}},{key:"_read",value:function(e){this.fid=e.readString(),this.fname=e.readString(),this.fpath=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),ve.defineStruct(D.FaxRT,!0,!0),D.FaxEvT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D.FileState.FileStateNone;(0,h.default)(this,e),this.fid=t,this.code=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.fid),D.FileState._write(e,this.code)}},{key:"_read",value:function(e){this.fid=e.readString(),this.code=D.FileState._read(e)}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),ve.defineStruct(D.FaxEvT,!0,!0),D.FaxEv2T=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D.FaxStateSend.FaxStateSendNone;(0,h.default)(this,e),this.fid=t,this.code=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.fid),D.FaxStateSend._write(e,this.code)}},{key:"_read",value:function(e){this.fid=e.readString(),this.code=D.FaxStateSend._read(e)}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),ve.defineStruct(D.FaxEv2T,!0,!0),D.NewFaxEvT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.fid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.fid)}},{key:"_read",value:function(e){this.fid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),ve.defineStruct(D.NewFaxEvT,!0,!0);i.Ice._ModuleRegistry;var me=i.Ice.Slice;D.FaxCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.FaxCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),me.defineOperations(D.FaxCB,D.FaxCBPrx,["::Dispatcher::FaxCB","::Ice::Object"],0,{IFCNotifyFaxEvt:[,2,2,,,[[D.FaxEv2T]],,,,],IFCNotifyNewFaxEvt:[,2,2,,,[[D.NewFaxEvT]],,,,]});i.Ice._ModuleRegistry;var ye=i.Ice.Slice;D.FaxOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.FaxOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),ye.defineOperations(D.FaxOP,D.FaxOPPrx,["::Dispatcher::FaxOP","::Ice::Object"],0,{IFCReqSendFax:[,,,,[D.FaxRT],[[D.Identity],[D.FaxT]],,[D.Error],,]});var _e=i.Ice._ModuleRegistry,Se=i.Ice.Slice,Ie=_e.module("Fax");Ie.FaxDirectType=Se.defineEnum([["FaxDirectTypeSend",0],["FaxDirectTypeRecv",1]]),Ie.Error=function(e){(0,g.default)(n,e);var t=_(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return(0,h.default)(this,n),e=t.call(this,a),e.fid=i,e.code=r,e.desc=s,e}return(0,f.default)(n,[{key:"_mostDerivedType",value:function(){return Ie.Error}},{key:"_writeMemberImpl",value:function(e){e.writeString(this.fid),e.writeInt(this.code),e.writeString(this.desc)}},{key:"_readMemberImpl",value:function(e){this.fid=e.readString(),this.code=e.readInt(),this.desc=e.readString()}}],[{key:"_parent",get:function(){return i.Ice.UserException}},{key:"_id",get:function(){return"::Fax::Error"}}]),n}(i.Ice.UserException),Ie.FaxOriginateT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:Ie.FaxDirectType.FaxDirectTypeSend;(0,h.default)(this,e),this.fid=t,this.srcip=i,this.srcport=n,this.srcpath=r,this.srcuser=s,this.dstip=a,this.dstport=o,this.dstpath=c,this.dstuser=u,this.direct=l}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.fid),e.writeString(this.srcip),e.writeInt(this.srcport),e.writeString(this.srcpath),e.writeString(this.srcuser),e.writeString(this.dstip),e.writeInt(this.dstport),e.writeString(this.dstpath),e.writeString(this.dstuser),Ie.FaxDirectType._write(e,this.direct)}},{key:"_read",value:function(e){this.fid=e.readString(),this.srcip=e.readString(),this.srcport=e.readInt(),this.srcpath=e.readString(),this.srcuser=e.readString(),this.dstip=e.readString(),this.dstport=e.readInt(),this.dstpath=e.readString(),this.dstuser=e.readString(),this.direct=Ie.FaxDirectType._read(e)}}],[{key:"minWireSize",get:function(){return 16}}]),e}(),Se.defineStruct(Ie.FaxOriginateT,!0,!0),Ie.FaxFeedbackT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";(0,h.default)(this,e),this.fid=t,this.direct=i,this.code=n,this.msg=r,this.tiffname=s,this.tiffpath=a}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.fid),e.writeInt(this.direct),e.writeInt(this.code),e.writeString(this.msg),e.writeString(this.tiffname),e.writeString(this.tiffpath)}},{key:"_read",value:function(e){this.fid=e.readString(),this.direct=e.readInt(),this.code=e.readInt(),this.msg=e.readString(),this.tiffname=e.readString(),this.tiffpath=e.readString()}}],[{key:"minWireSize",get:function(){return 12}}]),e}(),Se.defineStruct(Ie.FaxFeedbackT,!0,!0);Ie.FaxServer=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),Ie.FaxServerPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),Se.defineOperations(Ie.FaxServer,Ie.FaxServerPrx,["::Fax::FaxServer","::Ice::Object"],0,{faxOriginate:[,,,,[Ie.FaxFeedbackT],[[Ie.FaxOriginateT]],,[Ie.Error],,]});i.Ice._ModuleRegistry;var we=i.Ice.Slice;D.UploadEvent2T=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:D.FileState.FileStateNone,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:D.FileType.FileTypeNone,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";(0,h.default)(this,e),this.snum=t,this.dnum=i,this.fname=n,this.fid=r,this.fpath=s,this.state=a,this.ftype=o,this.sendtime=c}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.snum),i.Ice.StringSeqHelper.write(e,this.dnum),e.writeString(this.fname),e.writeString(this.fid),e.writeString(this.fpath),D.FileState._write(e,this.state),D.FileType._write(e,this.ftype),e.writeString(this.sendtime)}},{key:"_read",value:function(e){this.snum=e.readString(),this.dnum=i.Ice.StringSeqHelper.read(e),this.fname=e.readString(),this.fid=e.readString(),this.fpath=e.readString(),this.state=D.FileState._read(e),this.ftype=D.FileType._read(e),this.sendtime=e.readString()}}],[{key:"minWireSize",get:function(){return 8}}]),e}(),we.defineStruct(D.UploadEvent2T,!0,!0),we.defineSequence(D,"UploadEvent2SeqHelper","Dispatcher.UploadEvent2T",!1);i.Ice._ModuleRegistry;var ke=i.Ice.Slice;D.FileCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.FileCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),ke.defineOperations(D.FileCB,D.FileCBPrx,["::Dispatcher::FileCB","::Ice::Object"],0,{IFCNotifyUploadEvt:[,2,2,,,[[D.UploadEvent2T]],,,,],IFCNotifyDeleteFileEvt:[,2,2,,,[[7]],,,,]});i.Ice._ModuleRegistry;var Ce=i.Ice.Slice;D.ApplyUploadET=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D.FileType.FileTypeNone;(0,h.default)(this,e),this.fid=t,this.fname=i,this.ftype=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.fid),e.writeString(this.fname),D.FileType._write(e,this.ftype)}},{key:"_read",value:function(e){this.fid=e.readString(),this.fname=e.readString(),this.ftype=D.FileType._read(e)}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Ce.defineStruct(D.ApplyUploadET,!0,!0),Ce.defineSequence(D,"ApplyUploadESeqHelper","Dispatcher.ApplyUploadET",!1),D.ApplyUploadT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new D.ApplyUploadET;(0,h.default)(this,e),this.recv=t,this.file=i}return(0,f.default)(e,[{key:"_write",value:function(e){i.Ice.StringSeqHelper.write(e,this.recv),D.ApplyUploadET.write(e,this.file)}},{key:"_read",value:function(e){this.recv=i.Ice.StringSeqHelper.read(e),this.file=D.ApplyUploadET.read(e,this.file)}}],[{key:"minWireSize",get:function(){return 4}}]),e}(),Ce.defineStruct(D.ApplyUploadT,!0,!0),D.ApplyUploadRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.fid=t,this.fname=i,this.fpath=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.fid),e.writeString(this.fname),e.writeString(this.fpath)}},{key:"_read",value:function(e){this.fid=e.readString(),this.fname=e.readString(),this.fpath=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Ce.defineStruct(D.ApplyUploadRT,!0,!0),Ce.defineSequence(D,"ApplyUploadRSeqHelper","Dispatcher.ApplyUploadRT",!1),D.UploadEventT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D.FileState.FileStateNone;(0,h.default)(this,e),this.fid=t,this.state=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.fid),D.FileState._write(e,this.state)}},{key:"_read",value:function(e){this.fid=e.readString(),this.state=D.FileState._read(e)}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Ce.defineStruct(D.UploadEventT,!0,!0),D.FlistT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:D.FileType.FileTypeNone;(0,h.default)(this,e),this.sendid=t,this.recvid=i,this.isfinish=n,this.begtime=r,this.endtime=s,this.ftype=a}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sendid),e.writeString(this.recvid),e.writeString(this.isfinish),e.writeString(this.begtime),e.writeString(this.endtime),D.FileType._write(e,this.ftype)}},{key:"_read",value:function(e){this.sendid=e.readString(),this.recvid=e.readString(),this.isfinish=e.readString(),this.begtime=e.readString(),this.endtime=e.readString(),this.ftype=D.FileType._read(e)}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),Ce.defineStruct(D.FlistT,!0,!0),Ce.defineSequence(D,"FlistSeqHelper","Dispatcher.FlistT",!1),D.FlistRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:D.FileType.FileTypeNone,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:"";(0,h.default)(this,e),this.fid=t,this.sendid=i,this.sendname=n,this.msgbody=r,this.sendtime=s,this.isupload=a,this.type=o,this.recvid=c,this.recvname=u,this.isfinish=l,this.recvtime=d}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.fid),e.writeString(this.sendid),e.writeString(this.sendname),e.writeString(this.msgbody),e.writeString(this.sendtime),e.writeInt(this.isupload),D.FileType._write(e,this.type),e.writeString(this.recvid),e.writeString(this.recvname),e.writeInt(this.isfinish),e.writeString(this.recvtime)}},{key:"_read",value:function(e){this.fid=e.readString(),this.sendid=e.readString(),this.sendname=e.readString(),this.msgbody=e.readString(),this.sendtime=e.readString(),this.isupload=e.readInt(),this.type=D.FileType._read(e),this.recvid=e.readString(),this.recvname=e.readString(),this.isfinish=e.readInt(),this.recvtime=e.readString()}}],[{key:"minWireSize",get:function(){return 17}}]),e}(),Ce.defineStruct(D.FlistRT,!0,!0),Ce.defineSequence(D,"FlistRSeqHelper","Dispatcher.FlistRT",!1),D.FileReceivedT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.fid=t,this.employeeid=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.fid),e.writeString(this.employeeid)}},{key:"_read",value:function(e){this.fid=e.readString(),this.employeeid=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Ce.defineStruct(D.FileReceivedT,!0,!0),D.FileDeleteT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.fid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.fid)}},{key:"_read",value:function(e){this.fid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Ce.defineStruct(D.FileDeleteT,!0,!0),Ce.defineSequence(D,"FileDeleteTSeqHelper","Dispatcher.FileDeleteT",!1);D.FileOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.FileOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),Ce.defineOperations(D.FileOP,D.FileOPPrx,["::Dispatcher::FileOP","::Ice::Object"],0,{IFCReqapPlayUploadFile:[,,,,[D.ApplyUploadRT],[[D.Identity],[D.ApplyUploadT]],,[D.Error],,],IFCNotifyUploadFileEvt:[,2,2,,,[[D.Identity],[D.UploadEventT]],,[D.Error],,],IFCReqGetFileList:[,,,,["Dispatcher.FlistRSeqHelper"],[[D.Identity],["Dispatcher.FlistSeqHelper"]],,[D.Error],,],IFCReqFileReceived:[,,,,,[[D.Identity],[D.FileReceivedT]],,[D.Error],,],IFCReqDeleteFile:[,,,,,[[D.Identity],["Dispatcher.FileDeleteTSeqHelper"]],,[D.Error],,],IFCReqUploadFileToGroup:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqSetUploadFileState:[,,,,[7],[[D.Identity],[7]],,[D.Error],,]});i.Ice._ModuleRegistry;var be=i.Ice.Slice;D.GisInfoEventT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;(0,h.default)(this,e),this.mEmployeeid=t,this.mLatitude=i,this.mLongitude=n,this.mPositionTime=r,this.mMessage=s,this.disid=a,this.type=o}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.mEmployeeid),e.writeDouble(this.mLatitude),e.writeDouble(this.mLongitude),e.writeString(this.mPositionTime),e.writeString(this.mMessage),e.writeString(this.disid),e.writeInt(this.type)}},{key:"_read",value:function(e){this.mEmployeeid=e.readString(),this.mLatitude=e.readDouble(),this.mLongitude=e.readDouble(),this.mPositionTime=e.readString(),this.mMessage=e.readString(),this.disid=e.readString(),this.type=e.readInt()}}],[{key:"minWireSize",get:function(){return 24}}]),e}(),be.defineStruct(D.GisInfoEventT,!1,!0),D.GisInfoEventT1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";(0,h.default)(this,e),this.mEmployeeid=t,this.mLatitude=i,this.mLongitude=n,this.mPositionTime=r,this.mMessage=s,this.disid=a,this.type=o,this.dnsprefix=c}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.mEmployeeid),e.writeDouble(this.mLatitude),e.writeDouble(this.mLongitude),e.writeString(this.mPositionTime),e.writeString(this.mMessage),e.writeString(this.disid),e.writeInt(this.type),e.writeString(this.dnsprefix)}},{key:"_read",value:function(e){this.mEmployeeid=e.readString(),this.mLatitude=e.readDouble(),this.mLongitude=e.readDouble(),this.mPositionTime=e.readString(),this.mMessage=e.readString(),this.disid=e.readString(),this.type=e.readInt(),this.dnsprefix=e.readString()}}],[{key:"minWireSize",get:function(){return 25}}]),e}(),be.defineStruct(D.GisInfoEventT1,!1,!0);D.GisCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.GisCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),be.defineOperations(D.GisCB,D.GisCBPrx,["::Dispatcher::GisCB","::Ice::Object"],0,{IFCNotifyGisInfoEvt:[,2,2,,,[[D.GisInfoEventT]],,,,],IFCNotifyGisInfoEvt2:[,2,2,,,[[D.GisInfoEventT1]],,,,],IFCNotifyGisThirdDataEvt:[,2,2,,,[[7]],,,,],IFCNotifyGisHistoryEvt:[,2,2,,,[[7]],,,,]});i.Ice._ModuleRegistry;var Ee=i.Ice.Slice;D.GisInfoByTimeT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;(0,h.default)(this,e),this.employeeid=t,this.begin=i,this.end=n,this.type=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid),e.writeString(this.begin),e.writeString(this.end),e.writeInt(this.type)}},{key:"_read",value:function(e){this.employeeid=e.readString(),this.begin=e.readString(),this.end=e.readString(),this.type=e.readInt()}}],[{key:"minWireSize",get:function(){return 7}}]),e}(),Ee.defineStruct(D.GisInfoByTimeT,!0,!0),D.GisInfoByEllipseT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";(0,h.default)(this,e),this.sid=t,this.a=i,this.b=n,this.c=r,this.d=s,this.type=a}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeDouble(this.a),e.writeDouble(this.b),e.writeDouble(this.c),e.writeDouble(this.d),e.writeString(this.type)}},{key:"_read",value:function(e){this.sid=e.readString(),this.a=e.readDouble(),this.b=e.readDouble(),this.c=e.readDouble(),this.d=e.readDouble(),this.type=e.readString()}}],[{key:"minWireSize",get:function(){return 34}}]),e}(),Ee.defineStruct(D.GisInfoByEllipseT,!1,!0),D.GisInfoByRectangleT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";(0,h.default)(this,e),this.a=t,this.b=i,this.c=n,this.d=r,this.type=s}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeDouble(this.a),e.writeDouble(this.b),e.writeDouble(this.c),e.writeDouble(this.d),e.writeString(this.type)}},{key:"_read",value:function(e){this.a=e.readDouble(),this.b=e.readDouble(),this.c=e.readDouble(),this.d=e.readDouble(),this.type=e.readString()}}],[{key:"minWireSize",get:function(){return 33}}]),e}(),Ee.defineStruct(D.GisInfoByRectangleT,!1,!0),D.GetPositionT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.employeeid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid)}},{key:"_read",value:function(e){this.employeeid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Ee.defineStruct(D.GetPositionT,!0,!0),D.GetPositionElem=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:-1,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:D.RegisterState.RegisterStateLogout,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"";(0,h.default)(this,e),this.employeeid=t,this.name=i,this.longitude=n,this.latitude=r,this.message=s,this.type=a,this.dnsprefix=o,this.regstate=c,this.positiontime=u}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid),e.writeString(this.name),e.writeString(this.longitude),e.writeString(this.latitude),e.writeString(this.message),e.writeInt(this.type),e.writeString(this.dnsprefix),D.RegisterState._write(e,this.regstate),e.writeString(this.positiontime)}},{key:"_read",value:function(e){this.employeeid=e.readString(),this.name=e.readString(),this.longitude=e.readString(),this.latitude=e.readString(),this.message=e.readString(),this.type=e.readInt(),this.dnsprefix=e.readString(),this.regstate=D.RegisterState._read(e),this.positiontime=e.readString()}}],[{key:"minWireSize",get:function(){return 12}}]),e}(),Ee.defineStruct(D.GetPositionElem,!0,!0),Ee.defineSequence(D,"GetPositionSeqHelper","Dispatcher.GetPositionElem",!1),D.GetPositionRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,h.default)(this,e),this.pseq=t}return(0,f.default)(e,[{key:"_write",value:function(e){D.GetPositionSeqHelper.write(e,this.pseq)}},{key:"_read",value:function(e){this.pseq=D.GetPositionSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Ee.defineStruct(D.GetPositionRT,!0,!0),D.GetPositionT1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.employeeid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid)}},{key:"_read",value:function(e){this.employeeid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Ee.defineStruct(D.GetPositionT1,!0,!0),D.GetPositionElem1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:D.RegisterState.RegisterStateLogout;(0,h.default)(this,e),this.employeeid=t,this.name=i,this.longitude=n,this.latitude=r,this.message=s,this.type=a,this.dnsprefix=o,this.regstate=c}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid),e.writeString(this.name),e.writeString(this.longitude),e.writeString(this.latitude),e.writeString(this.message),e.writeInt(this.type),e.writeString(this.dnsprefix),D.RegisterState._write(e,this.regstate)}},{key:"_read",value:function(e){this.employeeid=e.readString(),this.name=e.readString(),this.longitude=e.readString(),this.latitude=e.readString(),this.message=e.readString(),this.type=e.readInt(),this.dnsprefix=e.readString(),this.regstate=D.RegisterState._read(e)}}],[{key:"minWireSize",get:function(){return 11}}]),e}(),Ee.defineStruct(D.GetPositionElem1,!0,!0),Ee.defineSequence(D,"GetPositionSeq1Helper","Dispatcher.GetPositionElem1",!1),D.GetPositionRT1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,h.default)(this,e),this.pseq=t}return(0,f.default)(e,[{key:"_write",value:function(e){D.GetPositionSeq1Helper.write(e,this.pseq)}},{key:"_read",value:function(e){this.pseq=D.GetPositionSeq1Helper.read(e)}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Ee.defineStruct(D.GetPositionRT1,!0,!0),D.GisTraceT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D.GisTraceType.GisTraceTypeNone;(0,h.default)(this,e),this.dstid=t,this.space=i,this.flag=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.dstid),e.writeString(this.space),D.GisTraceType._write(e,this.flag)}},{key:"_read",value:function(e){this.dstid=e.readString(),this.space=e.readString(),this.flag=D.GisTraceType._read(e)}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Ee.defineStruct(D.GisTraceT,!0,!0),Ee.defineSequence(D,"GisTraceSeqHelper","Dispatcher.GisTraceT",!1),D.GisTraceRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.employeeid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid)}},{key:"_read",value:function(e){this.employeeid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Ee.defineStruct(D.GisTraceRT,!0,!0),Ee.defineSequence(D,"GisTraceRSeqHelper","Dispatcher.GisTraceRT",!1),D.GisInfoT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";(0,h.default)(this,e),this.latitude=t,this.longitude=i,this.time=n,this.grmc=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeDouble(this.latitude),e.writeDouble(this.longitude),e.writeString(this.time),e.writeString(this.grmc)}},{key:"_read",value:function(e){this.latitude=e.readDouble(),this.longitude=e.readDouble(),this.time=e.readString(),this.grmc=e.readString()}}],[{key:"minWireSize",get:function(){return 18}}]),e}(),Ee.defineStruct(D.GisInfoT,!1,!0),D.GISDETAIL1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:D.RegisterState.RegisterStateLogout;(0,h.default)(this,e),this.mEmployeeid=t,this.mLatitude=i,this.mLongitude=n,this.mPositionTime=r,this.mMessage=s,this.type=a,this.dnsprefix=o,this.regstate=c}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.mEmployeeid),e.writeDouble(this.mLatitude),e.writeDouble(this.mLongitude),e.writeString(this.mPositionTime),e.writeString(this.mMessage),e.writeInt(this.type),e.writeString(this.dnsprefix),D.RegisterState._write(e,this.regstate)}},{key:"_read",value:function(e){this.mEmployeeid=e.readString(),this.mLatitude=e.readDouble(),this.mLongitude=e.readDouble(),this.mPositionTime=e.readString(),this.mMessage=e.readString(),this.type=e.readInt(),this.dnsprefix=e.readString(),this.regstate=D.RegisterState._read(e)}}],[{key:"minWireSize",get:function(){return 25}}]),e}(),Ee.defineStruct(D.GISDETAIL1,!1,!0),Ee.defineSequence(D,"GISDETAILSeq1Helper","Dispatcher.GISDETAIL1",!1);D.GisOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.GisOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),Ee.defineOperations(D.GisOP,D.GisOPPrx,["::Dispatcher::GisOP","::Ice::Object"],0,{IFCReqGetGisInfoByTime:[,,,,["DispatcherDB.GISDETAILSeqHelper"],[[D.Identity],[D.GisInfoByTimeT]],,[D.Error],,],IFCReqGetGisInfoByTime2:[,,,,["Dispatcher.GISDETAILSeq1Helper"],[[D.Identity],[D.GisInfoByTimeT]],,[D.Error],,],IFCReqGetGisInfoByTimeByJson:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetGisInfoByTimeByJson2:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetGisInfoByEllipse:[,,,,["DispatcherDB.GISDETAILSeqHelper"],[[D.Identity],[D.GisInfoByEllipseT]],,[D.Error],,],IFCReqGetGisInfoByEllipse2:[,,,,["Dispatcher.GISDETAILSeq1Helper"],[[D.Identity],[D.GisInfoByEllipseT]],,[D.Error],,],IFCReqGetGisInfoByEllipseByJson:[,,,,[7],[[D.Identity],[D.GisInfoByEllipseT]],,[D.Error],,],IFCReqGetGisInfoByRectangle:[,,,,["DispatcherDB.GISDETAILSeqHelper"],[[D.Identity],[D.GisInfoByRectangleT]],,[D.Error],,],IFCReqGetGisInfoByRectangle2:[,,,,["Dispatcher.GISDETAILSeq1Helper"],[[D.Identity],[D.GisInfoByRectangleT]],,[D.Error],,],IFCReqGetGisInfoByRectangleByJson:[,,,,[7],[[D.Identity],[D.GisInfoByRectangleT]],,[D.Error],,],IFCReqGetGisInfo:[,,,,[D.GetPositionRT],[[D.Identity],[D.GetPositionT]],,[D.Error],,],IFCReqGetGisInfo2:[,,,,[D.GetPositionRT1],[[D.Identity],[D.GetPositionT1]],,[D.Error],,],IFCReqGetGisInfoByJson:[,,,,[7],[[D.Identity],[D.GetPositionT1]],,[D.Error],,],IFCReqTraceGisInfo:[,,,,["Dispatcher.GisTraceRSeqHelper"],[[D.Identity],["Dispatcher.GisTraceSeqHelper"]],,[D.Error],,],IFCReqReportGisInfo:[,2,2,,,[[D.Identity],[D.GisInfoT]],,,,],IFCReqReportGisInfo2:[,2,2,,,[[D.Identity],[7]],,,,],IFCReqReportGisInfoByJson:[,2,2,,[7],[[D.Identity],[7]],,,,]});i.Ice._ModuleRegistry,i.Ice.Slice,i.Ice._ModuleRegistry;var Te=i.Ice.Slice;D.McuCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.McuCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),Te.defineOperations(D.McuCB,D.McuCBPrx,["::Dispatcher::McuCB","::Ice::Object"],0);i.Ice._ModuleRegistry;var xe=i.Ice.Slice;D.ScreenDisPlay=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];(0,h.default)(this,e),this.index=t,this.showmember=i,this.hasstream=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.index),e.writeString(this.showmember),e.writeBool(this.hasstream)}},{key:"_read",value:function(e){this.index=e.readInt(),this.showmember=e.readString(),this.hasstream=e.readBool()}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),xe.defineStruct(D.ScreenDisPlay,!0,!0),D.ScreenInfo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;(0,h.default)(this,e),this.type=t,this.stream=i,this.role=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.type),e.writeInt(this.stream),e.writeInt(this.role)}},{key:"_read",value:function(e){this.type=e.readString(),this.stream=e.readInt(),this.role=e.readInt()}}],[{key:"minWireSize",get:function(){return 9}}]),e}(),xe.defineStruct(D.ScreenInfo,!0,!0),xe.defineSequence(D,"ScreenDisPlaySeqHelper","Dispatcher.ScreenDisPlay",!1),D.SetScreenT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new D.ScreenInfo,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,h.default)(this,e),this.cid=t,this.screen=i,this.DisplaySeq=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),D.ScreenInfo.write(e,this.screen),D.ScreenDisPlaySeqHelper.write(e,this.DisplaySeq)}},{key:"_read",value:function(e){this.cid=e.readString(),this.screen=D.ScreenInfo.read(e,this.screen),this.DisplaySeq=D.ScreenDisPlaySeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 11}}]),e}(),xe.defineStruct(D.SetScreenT,!0,!0),D.SetScreenRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,h.default)(this,e),this.cid=t,this.reslut=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeInt(this.reslut)}},{key:"_read",value:function(e){this.cid=e.readString(),this.reslut=e.readInt()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),xe.defineStruct(D.SetScreenRT,!0,!0),D.SetMemberRoleT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;(0,h.default)(this,e),this.cid=t,this.member=i,this.role=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.member),e.writeInt(this.role)}},{key:"_read",value:function(e){this.cid=e.readString(),this.member=e.readString(),this.role=e.readInt()}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),xe.defineStruct(D.SetMemberRoleT,!0,!0),D.SetMemberRoleRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,h.default)(this,e),this.cid=t,this.reslut=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeInt(this.reslut)}},{key:"_read",value:function(e){this.cid=e.readString(),this.reslut=e.readInt()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),xe.defineStruct(D.SetMemberRoleRT,!0,!0),D.MCUDevice=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";(0,h.default)(this,e),this.id=t,this.ip=i,this.thetype=n,this.defaultbandwidth=r,this.thename=s}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.id),e.writeString(this.ip),e.writeInt(this.thetype),e.writeInt(this.defaultbandwidth),e.writeString(this.thename)}},{key:"_read",value:function(e){this.id=e.readInt(),this.ip=e.readString(),this.thetype=e.readInt(),this.defaultbandwidth=e.readInt(),this.thename=e.readString()}}],[{key:"minWireSize",get:function(){return 14}}]),e}(),xe.defineStruct(D.MCUDevice,!0,!0),D.MCUMettingOP=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.cid=t,this.number=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.number)}},{key:"_read",value:function(e){this.cid=e.readString(),this.number=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),xe.defineStruct(D.MCUMettingOP,!0,!0),xe.defineSequence(D,"MCUDeviceSeqHelper","Dispatcher.MCUDevice",!1);D.McuOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.McuOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),xe.defineOperations(D.McuOP,D.McuOPPrx,["::Dispatcher::McuOP","::Ice::Object"],0,{IFCReSetScreen:[,,,,[D.SetScreenRT],[[D.Identity],[D.SetScreenT]],,[D.Error],,],IFCReqSetMemberRole:[,,,,[D.SetMemberRoleRT],[[D.Identity],[D.SetMemberRoleT]],,[D.Error],,],IFCReqGetMcuDevice:[,,,,["Dispatcher.MCUDeviceSeqHelper"],[[D.Identity]],,[D.Error],,],IFCReqMcuConfAddDevice:[,,,,,[[D.Identity],[D.MCUMettingOP]],,[D.Error],,],IFCReqMcuConfDelDevice:[,,,,,[[D.Identity],[D.MCUMettingOP]],,[D.Error],,]});i.Ice._ModuleRegistry;var Pe=i.Ice.Slice;D.Message2T=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:D.UserType.UserTypeDispatch;(0,h.default)(this,e),this.msgid=t,this.body=i,this.sendid=n,this.time=r,this.receiver=s,this.attach=a,this.utype=o}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.msgid),e.writeString(this.body),e.writeString(this.sendid),e.writeString(this.time),i.Ice.StringSeqHelper.write(e,this.receiver),D.UploadEvent2SeqHelper.write(e,this.attach),D.UserType._write(e,this.utype)}},{key:"_read",value:function(e){this.msgid=e.readString(),this.body=e.readString(),this.sendid=e.readString(),this.time=e.readString(),this.receiver=i.Ice.StringSeqHelper.read(e),this.attach=D.UploadEvent2SeqHelper.read(e),this.utype=D.UserType._read(e)}}],[{key:"minWireSize",get:function(){return 7}}]),e}(),Pe.defineStruct(D.Message2T,!0,!0),Pe.defineSequence(D,"Message2SeqHelper","Dispatcher.Message2T",!1);i.Ice._ModuleRegistry;var Re=i.Ice.Slice;D.MessageCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i,null,[{key:"_iceImplements",get:function(){return[D.FileCB]}}]),i}(i.Ice.Object),D.MessageCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i,null,[{key:"_implements",get:function(){return[D.FileCBPrx]}}]),i}(i.Ice.ObjectPrx),Re.defineOperations(D.MessageCB,D.MessageCBPrx,["::Dispatcher::FileCB","::Dispatcher::MessageCB","::Ice::Object"],1,{IFCNotifyMsgEvt:[,2,2,,,[[D.Message2T]],,,,],IFCNotifyMsgDelEvt:[,2,2,,,[[7]],,,,]});i.Ice._ModuleRegistry;var Me=i.Ice.Slice;D.MessageET=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,h.default)(this,e),this.body=t,this.attach=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.body),D.ApplyUploadESeqHelper.write(e,this.attach)}},{key:"_read",value:function(e){this.body=e.readString(),this.attach=D.ApplyUploadESeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Me.defineStruct(D.MessageET,!0,!0),D.MessageT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new D.MessageET;(0,h.default)(this,e),this.receiver=t,this.message=i}return(0,f.default)(e,[{key:"_write",value:function(e){i.Ice.StringSeqHelper.write(e,this.receiver),D.MessageET.write(e,this.message)}},{key:"_read",value:function(e){this.receiver=i.Ice.StringSeqHelper.read(e),this.message=D.MessageET.read(e,this.message)}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Me.defineStruct(D.MessageT,!0,!0),D.MessageRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,h.default)(this,e),this.msgid=t,this.attach=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.msgid),D.ApplyUploadRSeqHelper.write(e,this.attach)}},{key:"_read",value:function(e){this.msgid=e.readString(),this.attach=D.ApplyUploadRSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Me.defineStruct(D.MessageRT,!0,!0),D.MessageReceivedT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.msgid=t,this.employeeid=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.msgid),e.writeString(this.employeeid)}},{key:"_read",value:function(e){this.msgid=e.readString(),this.employeeid=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Me.defineStruct(D.MessageReceivedT,!0,!0),D.GetOldMsgFileT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,h.default)(this,e),this.employeeid=t,this.getnum=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid),e.writeInt(this.getnum)}},{key:"_read",value:function(e){this.employeeid=e.readString(),this.getnum=e.readInt()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),Me.defineStruct(D.GetOldMsgFileT,!0,!0),D.GetOldMsgFileRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,h.default)(this,e),this.fileinfos=t,this.msginfos=i}return(0,f.default)(e,[{key:"_write",value:function(e){D.UploadEvent2SeqHelper.write(e,this.fileinfos),D.Message2SeqHelper.write(e,this.msginfos)}},{key:"_read",value:function(e){this.fileinfos=D.UploadEvent2SeqHelper.read(e),this.msginfos=D.Message2SeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Me.defineStruct(D.GetOldMsgFileRT,!0,!0);D.MessageOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i,null,[{key:"_iceImplements",get:function(){return[D.FileOP]}}]),i}(i.Ice.Object),D.MessageOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i,null,[{key:"_implements",get:function(){return[D.FileOPPrx]}}]),i}(i.Ice.ObjectPrx),Me.defineOperations(D.MessageOP,D.MessageOPPrx,["::Dispatcher::FileOP","::Dispatcher::MessageOP","::Ice::Object"],1,{IFCReqMsg:[,,,,[D.MessageRT],[[D.Identity],[D.MessageT]],,[D.Error],,],IFCReqMsgReceived:[,,,,,[[D.Identity],[D.MessageReceivedT]],,[D.Error],,],IFCReqGetOldMsgFile:[,,,,[D.GetOldMsgFileRT],[[D.Identity],[D.GetOldMsgFileT]],,[D.Error],,],IFCReqDelMsg:[,,,,,[[D.Identity],[7]],,[D.Error],,],IFCReqGetGroupMsgByUserid:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqAddGroupMsg:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqUpdateGroupMsg:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqDeleteGroupMsg:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqSendMsg:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetOldMsg:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetSmsGis:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetSmsGisRepeat:[,,,,[7],[[D.Identity],[7],[7]],,[D.Error],,]});i.Ice._ModuleRegistry;var De=i.Ice.Slice;D.PrePlanT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.dummy=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.dummy)}},{key:"_read",value:function(e){this.dummy=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),De.defineStruct(D.PrePlanT,!0,!0),D.PrePlanRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";(0,h.default)(this,e),this.planId=t,this.planName=i,this.planAddr=n,this.planMeans=r,this.planNumber=s,this.planType=a,this.dis=o}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.planId),e.writeString(this.planName),e.writeString(this.planAddr),e.writeString(this.planMeans),e.writeString(this.planNumber),e.writeInt(this.planType),e.writeString(this.dis)}},{key:"_read",value:function(e){this.planId=e.readInt(),this.planName=e.readString(),this.planAddr=e.readString(),this.planMeans=e.readString(),this.planNumber=e.readString(),this.planType=e.readInt(),this.dis=e.readString()}}],[{key:"minWireSize",get:function(){return 13}}]),e}(),De.defineStruct(D.PrePlanRT,!0,!0),De.defineSequence(D,"PrePlanRSeqHelper","Dispatcher.PrePlanRT",!1),D.PrePlanStartT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.planId=t,this.passwd=i,this.caller=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.planId),e.writeString(this.passwd),e.writeString(this.caller)}},{key:"_read",value:function(e){this.planId=e.readInt(),this.passwd=e.readString(),this.caller=e.readString()}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),De.defineStruct(D.PrePlanStartT,!0,!0),D.PrePlanStartRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.dummy=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.dummy)}},{key:"_read",value:function(e){this.dummy=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),De.defineStruct(D.PrePlanStartRT,!0,!0),D.PrePlanEvT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D.PrePlanState.PrePlanStateNone;(0,h.default)(this,e),this.planId=t,this.state=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.planId),D.PrePlanState._write(e,this.state)}},{key:"_read",value:function(e){this.planId=e.readInt(),this.state=D.PrePlanState._read(e)}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),De.defineStruct(D.PrePlanEvT,!0,!0),D.PrePlanStopT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.planId=t,this.passwd=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.planId),e.writeString(this.passwd)}},{key:"_read",value:function(e){this.planId=e.readInt(),this.passwd=e.readString()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),De.defineStruct(D.PrePlanStopT,!0,!0),D.PrePlanStopRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.dummy=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.dummy)}},{key:"_read",value:function(e){this.dummy=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),De.defineStruct(D.PrePlanStopRT,!0,!0);i.Ice._ModuleRegistry;var Oe=i.Ice.Slice;D.PrePlanCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.PrePlanCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),Oe.defineOperations(D.PrePlanCB,D.PrePlanCBPrx,["::Dispatcher::PrePlanCB","::Ice::Object"],0,{onPrePlanEv:[,2,2,,,[[D.PrePlanEvT]],,,,]});i.Ice._ModuleRegistry;var Ae=i.Ice.Slice;D.PrePlanOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i,null,[{key:"_iceImplements",get:function(){return[D.MessageOP]}}]),i}(i.Ice.Object),D.PrePlanOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i,null,[{key:"_implements",get:function(){return[D.MessageOPPrx]}}]),i}(i.Ice.ObjectPrx),Ae.defineOperations(D.PrePlanOP,D.PrePlanOPPrx,["::Dispatcher::FileOP","::Dispatcher::MessageOP","::Dispatcher::PrePlanOP","::Ice::Object"],2,{IFCReqSelectPreplan:[,,,,["Dispatcher.PrePlanRSeqHelper"],[[D.Identity],[D.PrePlanT]],,[D.Error],,],IFCReqSelectPreplan2:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqStartPreplan:[,,,,[D.PrePlanStartRT],[[D.Identity],[D.PrePlanStartT]],,[D.Error],,],IFCReqStopPreplan:[,,,,[D.PrePlanStopRT],[[D.Identity],[D.PrePlanStopT]],,[D.Error],,]});i.Ice._ModuleRegistry;var Fe=i.Ice.Slice;D.PttIndCallInfoElem=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.group=t,this.speaker=i,this.callid=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.group),e.writeString(this.speaker),e.writeString(this.callid)}},{key:"_read",value:function(e){this.group=e.readString(),this.speaker=e.readString(),this.callid=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Fe.defineStruct(D.PttIndCallInfoElem,!0,!0),Fe.defineSequence(D,"PttIndCallInfoSeqHelper","Dispatcher.PttIndCallInfoElem",!1),D.G3MessageT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;(0,h.default)(this,e),this.sid=t,this.employeeid=i,this.callinfo=n,this.ip=r,this.port=s}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.employeeid),D.PttIndCallInfoSeqHelper.write(e,this.callinfo),e.writeString(this.ip),e.writeInt(this.port)}},{key:"_read",value:function(e){this.sid=e.readString(),this.employeeid=e.readString(),this.callinfo=D.PttIndCallInfoSeqHelper.read(e),this.ip=e.readString(),this.port=e.readInt()}}],[{key:"minWireSize",get:function(){return 8}}]),e}(),Fe.defineStruct(D.G3MessageT,!0,!0),D.PttIndGroupInfoElem=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:D.GroupType.GroupTypeNone;(0,h.default)(this,e),this.groupname=t,this.groupnum=i,this.grouplevel=n,this.ipstatespace=r,this.ipheartbeatspace=s,this.ip=a,this.port=o,this.thetype=c}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.groupname),e.writeString(this.groupnum),e.writeInt(this.grouplevel),e.writeInt(this.ipstatespace),e.writeInt(this.ipheartbeatspace),e.writeString(this.ip),e.writeInt(this.port),D.GroupType._write(e,this.thetype)}},{key:"_read",value:function(e){this.groupname=e.readString(),this.groupnum=e.readString(),this.grouplevel=e.readInt(),this.ipstatespace=e.readInt(),this.ipheartbeatspace=e.readInt(),this.ip=e.readString(),this.port=e.readInt(),this.thetype=D.GroupType._read(e)}}],[{key:"minWireSize",get:function(){return 20}}]),e}(),Fe.defineStruct(D.PttIndGroupInfoElem,!0,!0),Fe.defineSequence(D,"PttIndGroupInfoSeqHelper","Dispatcher.PttIndGroupInfoElem",!1),D.PttIndGroupInfoT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";(0,h.default)(this,e),this.seq=t,this.employeeid=i,this.ip=n,this.port=r,this.type=s}return(0,f.default)(e,[{key:"_write",value:function(e){D.PttIndGroupInfoSeqHelper.write(e,this.seq),e.writeString(this.employeeid),e.writeString(this.ip),e.writeInt(this.port),e.writeString(this.type)}},{key:"_read",value:function(e){this.seq=D.PttIndGroupInfoSeqHelper.read(e),this.employeeid=e.readString(),this.ip=e.readString(),this.port=e.readInt(),this.type=e.readString()}}],[{key:"minWireSize",get:function(){return 8}}]),e}(),Fe.defineStruct(D.PttIndGroupInfoT,!0,!0),D.PttReqRightRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.employeeid=t,this.result=i,this.reason=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid),e.writeString(this.result),e.writeString(this.reason)}},{key:"_read",value:function(e){this.employeeid=e.readString(),this.result=e.readString(),this.reason=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Fe.defineStruct(D.PttReqRightRT,!0,!0);i.Ice._ModuleRegistry;var qe=i.Ice.Slice;D.PttCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.PttCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),qe.defineOperations(D.PttCB,D.PttCBPrx,["::Dispatcher::PttCB","::Ice::Object"],0,{IFCNotifyPhoneMsgEvt:[,2,2,,,[[D.G3MessageT]],,,,],IFCNotifyGroupInfoEvt:[,2,2,,,[[D.PttIndGroupInfoT]],,,,],IFCNotifyReqRightResultEvt:[,2,2,,,[[D.PttReqRightRT]],,,,]});i.Ice._ModuleRegistry;var Ne=i.Ice.Slice;D.PttReqRightT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.groupnum=t,this.caller=i,this.messageinfo=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.groupnum),e.writeString(this.caller),e.writeString(this.messageinfo)}},{key:"_read",value:function(e){this.groupnum=e.readString(),this.caller=e.readString(),this.messageinfo=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Ne.defineStruct(D.PttReqRightT,!0,!0),D.PttReqGroupInfoT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.employeeid=t,this.type=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid),e.writeString(this.type)}},{key:"_read",value:function(e){this.employeeid=e.readString(),this.type=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Ne.defineStruct(D.PttReqGroupInfoT,!0,!0),D.PttReqMemberInfoT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.employeeid=t,this.groupnum=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid),e.writeString(this.groupnum)}},{key:"_read",value:function(e){this.employeeid=e.readString(),this.groupnum=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Ne.defineStruct(D.PttReqMemberInfoT,!0,!0),D.PttReqMemberInfoRElem=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D.CallState.CallStateNone;(0,h.default)(this,e),this.num=t,this.name=i,this.state=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.num),e.writeString(this.name),D.CallState._write(e,this.state)}},{key:"_read",value:function(e){this.num=e.readString(),this.name=e.readString(),this.state=D.CallState._read(e)}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Ne.defineStruct(D.PttReqMemberInfoRElem,!0,!0),Ne.defineSequence(D,"PttReqMemberInfoRSeqHelper","Dispatcher.PttReqMemberInfoRElem",!1),D.PttReqMemberInfoRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,h.default)(this,e),this.groupnum=t,this.employeeid=i,this.memberinfo=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.groupnum),e.writeString(this.employeeid),D.PttReqMemberInfoRSeqHelper.write(e,this.memberinfo)}},{key:"_read",value:function(e){this.groupnum=e.readString(),this.employeeid=e.readString(),this.memberinfo=D.PttReqMemberInfoRSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Ne.defineStruct(D.PttReqMemberInfoRT,!0,!0),D.PttReqMemberInfoT1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.sid=t,this.groupnum=i,this.employeeid=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.groupnum),e.writeString(this.employeeid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.groupnum=e.readString(),this.employeeid=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Ne.defineStruct(D.PttReqMemberInfoT1,!0,!0),D.PttReqMemberInfoRElem1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:D.CallState.CallStateNone,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";(0,h.default)(this,e),this.employeeid=t,this.name=i,this.type=n,this.level=r,this.state=s,this.stateDecorate=a}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid),e.writeString(this.name),e.writeInt(this.type),e.writeInt(this.level),D.CallState._write(e,this.state),e.writeString(this.stateDecorate)}},{key:"_read",value:function(e){this.employeeid=e.readString(),this.name=e.readString(),this.type=e.readInt(),this.level=e.readInt(),this.state=D.CallState._read(e),this.stateDecorate=e.readString()}}],[{key:"minWireSize",get:function(){return 12}}]),e}(),Ne.defineStruct(D.PttReqMemberInfoRElem1,!0,!0),Ne.defineSequence(D,"PttReqMemberInfoRSeq1Helper","Dispatcher.PttReqMemberInfoRElem1",!1),D.PttReqMemberInfoRT1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,h.default)(this,e),this.groupnum=t,this.employeeid=i,this.memberinfo=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.groupnum),e.writeString(this.employeeid),D.PttReqMemberInfoRSeq1Helper.write(e,this.memberinfo)}},{key:"_read",value:function(e){this.groupnum=e.readString(),this.employeeid=e.readString(),this.memberinfo=D.PttReqMemberInfoRSeq1Helper.read(e)}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Ne.defineStruct(D.PttReqMemberInfoRT1,!0,!0),D.PttTimeOutT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";(0,h.default)(this,e),this.cid=t,this.MaxQueue=i,this.IdelTimeout=n,this.SpeakTimeout=r,this.RefreshStateSpace=s}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.MaxQueue),e.writeString(this.IdelTimeout),e.writeString(this.SpeakTimeout),e.writeString(this.RefreshStateSpace)}},{key:"_read",value:function(e){this.cid=e.readString(),this.MaxQueue=e.readString(),this.IdelTimeout=e.readString(),this.SpeakTimeout=e.readString(),this.RefreshStateSpace=e.readString()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),Ne.defineStruct(D.PttTimeOutT,!0,!0);D.PttOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.PttOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),Ne.defineOperations(D.PttOP,D.PttOPPrx,["::Dispatcher::PttOP","::Ice::Object"],0,{IFCReqGetMemberInfo:[,,,,[D.PttReqMemberInfoRT],[[D.Identity],[D.PttReqMemberInfoT]],,[D.Error],,],IFCReqGetMemberInfo2:[,,,,[D.PttReqMemberInfoRT1],[[D.Identity],[D.PttReqMemberInfoT1]],,[D.Error],,],IFCReqApplyRight:[,,,,[D.CommonRequestT],[[D.Identity],[D.PttReqRightT]],,[D.Error],,],IFCReqSetIntercomTimeoutInfo:[,,,,[3],[[D.Identity],[D.PttTimeOutT]],,[D.Error],,],IFCReqGetIntercomTimeoutInfo:[,,,,[D.PttTimeOutT],[[D.Identity],[7]],,[D.Error],,],IFCReqGetGroupInfo:[,2,2,,,[[D.Identity],[D.PttReqGroupInfoT]],,,,]});D.PttSB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.PttSBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),Ne.defineOperations(D.PttSB,D.PttSBPrx,["::Dispatcher::PttSB","::Ice::Object"],0);var Be=i.Ice._ModuleRegistry,Le=i.Ice.Slice,He=Be.module("Dispatcher");He.ContentInfo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.strContent=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.strContent)}},{key:"_read",value:function(e){this.strContent=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Le.defineStruct(He.ContentInfo,!0,!0),Le.defineSequence(He,"SubContentSeqHelper","Dispatcher.ContentInfo",!1),He.SubInfo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,h.default)(this,e),this.subHeader=t,this.subContents=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.subHeader),He.SubContentSeqHelper.write(e,this.subContents)}},{key:"_read",value:function(e){this.subHeader=e.readString(),this.subContents=He.SubContentSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Le.defineStruct(He.SubInfo,!0,!0),Le.defineSequence(He,"SubInfoSeqHelper","Dispatcher.SubInfo",!1),He.SubInfos=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,h.default)(this,e),this.Infos=t}return(0,f.default)(e,[{key:"_write",value:function(e){He.SubInfoSeqHelper.write(e,this.Infos)}},{key:"_read",value:function(e){this.Infos=He.SubInfoSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Le.defineStruct(He.SubInfos,!0,!0),He.PubInfo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.subHeader=t,this.subMsg=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.subHeader),e.writeString(this.subMsg)}},{key:"_read",value:function(e){this.subHeader=e.readString(),this.subMsg=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Le.defineStruct(He.PubInfo,!0,!0),He.FixReceiveInfo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.subHeader=t,this.subMsg=i,this.receive=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.subHeader),e.writeString(this.subMsg),e.writeString(this.receive)}},{key:"_read",value:function(e){this.subHeader=e.readString(),this.subMsg=e.readString(),this.receive=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Le.defineStruct(He.FixReceiveInfo,!0,!0),He.OnReceiveHeartBeat=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,h.default)(this,e),this.number=t,this.issub=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.number),e.writeBool(this.issub)}},{key:"_read",value:function(e){this.number=e.readString(),this.issub=e.readBool()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Le.defineStruct(He.OnReceiveHeartBeat,!0,!0);i.Ice._ModuleRegistry;var Ve=i.Ice.Slice;D.PublishCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.PublishCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),Ve.defineOperations(D.PublishCB,D.PublishCBPrx,["::Dispatcher::PublishCB","::Ice::Object"],0,{IFCNotifyPublishMsgEvt:[,2,2,,,[[D.PubInfo]],,,,],IFCNotifyFixMsgEvt:[,2,2,,,[[D.FixReceiveInfo]],,,,],IFCNotifyPublishHBEvt:[,2,2,,,[[D.OnReceiveHeartBeat]],,,,]});i.Ice._ModuleRegistry;var Ue=i.Ice.Slice;D.PublishOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.PublishOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),Ue.defineOperations(D.PublishOP,D.PublishOPPrx,["::Dispatcher::PublishOP","::Ice::Object"],0,{IFCReqPublishMsg:[,,,,,[[D.Identity],[D.SubInfos]],,,,],IFCReqUnpublishMsg:[,,,,,[[D.Identity]],,,,],IFCReqPublishHB:[,,,,[1],[[D.Identity],[3]],,[D.Error],,]});i.Ice._ModuleRegistry;var je=i.Ice.Slice;D.StationLineT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.stationid=t,this.Employeeid=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.stationid),e.writeString(this.Employeeid)}},{key:"_read",value:function(e){this.stationid=e.readInt(),this.Employeeid=e.readString()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),je.defineStruct(D.StationLineT,!0,!0),D.StationLineRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";(0,h.default)(this,e),this.LineID=t,this.LineName=i,this.StationID=n,this.Description=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.LineID),e.writeString(this.LineName),e.writeInt(this.StationID),e.writeString(this.Description)}},{key:"_read",value:function(e){this.LineID=e.readInt(),this.LineName=e.readString(),this.StationID=e.readInt(),this.Description=e.readString()}}],[{key:"minWireSize",get:function(){return 10}}]),e}(),je.defineStruct(D.StationLineRT,!0,!0),je.defineSequence(D,"StationLineRTSeqHelper","Dispatcher.StationLineRT",!1),D.StationT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.Employeeid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.Employeeid)}},{key:"_read",value:function(e){this.Employeeid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),je.defineStruct(D.StationT,!0,!0),D.StationRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.StationID=t,this.StationName=i,this.StationDes=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.StationID),e.writeString(this.StationName),e.writeString(this.StationDes)}},{key:"_read",value:function(e){this.StationID=e.readInt(),this.StationName=e.readString(),this.StationDes=e.readString()}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),je.defineStruct(D.StationRT,!0,!0),je.defineSequence(D,"StationRTSeqHelper","Dispatcher.StationRT",!1);D.RailWayOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.RailWayOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),je.defineOperations(D.RailWayOP,D.RailWayOPPrx,["::Dispatcher::RailWayOP","::Ice::Object"],0,{IFCReqGetStationLine:[,,,,["Dispatcher.StationLineRTSeqHelper"],[[D.Identity],[D.StationLineT]],,[D.Error],,],IFCReqstopGetStation:[,,,,[D.StationRT],[[D.Identity],[D.StationT]],,[D.Error],,],IFCReqGetAllStations:[,,,,["Dispatcher.StationRTSeqHelper"],[[D.Identity]],,[D.Error],,]});i.Ice._ModuleRegistry;var Ge=i.Ice.Slice;D.ForceLogoutT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D.ECode.ECodeNone;(0,h.default)(this,e),this.code=t}return(0,f.default)(e,[{key:"_write",value:function(e){D.ECode._write(e,this.code)}},{key:"_read",value:function(e){this.code=D.ECode._read(e)}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Ge.defineStruct(D.ForceLogoutT,!0,!0);D.RegisterCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.RegisterCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),Ge.defineOperations(D.RegisterCB,D.RegisterCBPrx,["::Dispatcher::RegisterCB","::Ice::Object"],0,{IFCNotifyForceLogout:[,2,2,,,[[D.ForceLogoutT]],,,,]});D.RegisterCBSub=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.RegisterCBSubPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),Ge.defineOperations(D.RegisterCBSub,D.RegisterCBSubPrx,["::Dispatcher::RegisterCBSub","::Ice::Object"],0);i.Ice._ModuleRegistry;var ze=i.Ice.Slice;D.LoginT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:D.UserType.UserTypeNone;(0,h.default)(this,e),this.pass=t,this.ip=i,this.interval=n,this.type=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.pass),e.writeString(this.ip),e.writeInt(this.interval),D.UserType._write(e,this.type)}},{key:"_read",value:function(e){this.pass=e.readString(),this.ip=e.readString(),this.interval=e.readInt(),this.type=D.UserType._read(e)}}],[{key:"minWireSize",get:function(){return 7}}]),e}(),ze.defineStruct(D.LoginT,!0,!0),D.LoginRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.firstlogin=t,this.sptpsw=i,this.dnsprefix=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeBool(this.firstlogin),e.writeString(this.sptpsw),e.writeString(this.dnsprefix)}},{key:"_read",value:function(e){this.firstlogin=e.readBool(),this.sptpsw=e.readString(),this.dnsprefix=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),ze.defineStruct(D.LoginRT,!0,!0),D.LogoutT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.dummy=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.dummy)}},{key:"_read",value:function(e){this.dummy=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),ze.defineStruct(D.LogoutT,!0,!0),D.LogoutRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.dummy=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.dummy)}},{key:"_read",value:function(e){this.dummy=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),ze.defineStruct(D.LogoutRT,!0,!0),D.ReloginT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.state=t,this.ip=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.state),e.writeString(this.ip)}},{key:"_read",value:function(e){this.state=e.readInt(),this.ip=e.readString()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),ze.defineStruct(D.ReloginT,!0,!0),D.HeartbeatRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;(0,h.default)(this,e),this.dummy=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.dummy)}},{key:"_read",value:function(e){this.dummy=e.readInt()}}],[{key:"minWireSize",get:function(){return 4}}]),e}(),ze.defineStruct(D.HeartbeatRT,!0,!1),D.ChangePassWordT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.Employeeid=t,this.oldPassWord=i,this.newPassWord=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.Employeeid),e.writeString(this.oldPassWord),e.writeString(this.newPassWord)}},{key:"_read",value:function(e){this.Employeeid=e.readString(),this.oldPassWord=e.readString(),this.newPassWord=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),ze.defineStruct(D.ChangePassWordT,!0,!0),D.ChangePassWordRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,h.default)(this,e),this.Employeeid=t,this.issuccess=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.Employeeid),e.writeBool(this.issuccess)}},{key:"_read",value:function(e){this.Employeeid=e.readString(),this.issuccess=e.readBool()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),ze.defineStruct(D.ChangePassWordRT,!0,!0),D.ForceKickOutT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.Employeeid=t,this.LoginUUID=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.Employeeid),e.writeString(this.LoginUUID)}},{key:"_read",value:function(e){this.Employeeid=e.readString(),this.LoginUUID=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),ze.defineStruct(D.ForceKickOutT,!0,!0);D.RegisterOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.RegisterOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),ze.defineOperations(D.RegisterOP,D.RegisterOPPrx,["::Dispatcher::RegisterOP","::Ice::Object"],0,{IFCReqLogin:[,,,,[D.LoginRT],[[D.Identity],[D.LoginT]],,[D.Error],,],IFCReqLoginForce:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqLogout:[,,,,[D.LogoutRT],[[D.Identity],[D.LogoutT]],,[D.Error],,],IFCReqRelogin:[,2,2,,,[[D.Identity],[D.ReloginT]],,,,],IFCReqSendHB:[,,,,[D.HeartbeatRT],[[D.Identity],[3]],,[D.Error],,],IFCReqSendHB2:[,,,,[7],[[D.Identity],[3]],,[D.Error],,],IFCReqChangePasswd:[,,,,[D.ChangePassWordRT],[[D.Identity],[D.ChangePassWordT]],,[D.Error],,],IFCReqForceLogout:[,,,,[1],[[D.Identity],[D.ForceKickOutT]],,[D.Error],,],IFCReqAllUserRegState:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqLoginState:[,,,,[7],[[D.Identity],[7]],,[D.Error],,]});D.RegisterSB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.RegisterSBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),ze.defineOperations(D.RegisterSB,D.RegisterSBPrx,["::Dispatcher::RegisterSB","::Ice::Object"],0);i.Ice._ModuleRegistry;var $e=i.Ice.Slice;D.Agent=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D.RegisterState.RegisterStateNone,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";(0,h.default)(this,e),this.employeeid=t,this.state=i,this.othernumber=n,this.othername=r,this.ip=s,this.DNSprefix=a}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid),D.RegisterState._write(e,this.state),e.writeString(this.othernumber),e.writeString(this.othername),e.writeString(this.ip),e.writeString(this.DNSprefix)}},{key:"_read",value:function(e){this.employeeid=e.readString(),this.state=D.RegisterState._read(e),this.othernumber=e.readString(),this.othername=e.readString(),this.ip=e.readString(),this.DNSprefix=e.readString()}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),$e.defineStruct(D.Agent,!0,!0),$e.defineSequence(D,"AgentSeqHelper","Dispatcher.Agent",!1);D.StateCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.StateCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),$e.defineOperations(D.StateCB,D.StateCBPrx,["::Dispatcher::StateCB","::Ice::Object"],0,{IFCNotifyUserStateEvt:[,2,2,,,[["Dispatcher.AgentSeqHelper"]],,,,]});i.Ice._ModuleRegistry;var We=i.Ice.Slice;D.VideoBugT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:D.VBugStateType.VBugStateTypeNone;(0,h.default)(this,e),this.cid=t,this.ip=i,this.port=n,this.srcid=r,this.dstid=s,this.state=a}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.ip),e.writeString(this.port),e.writeString(this.srcid),e.writeString(this.dstid),D.VBugStateType._write(e,this.state)}},{key:"_read",value:function(e){this.cid=e.readString(),this.ip=e.readString(),this.port=e.readString(),this.srcid=e.readString(),this.dstid=e.readString(),this.state=D.VBugStateType._read(e)}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),We.defineStruct(D.VideoBugT,!0,!0),D.VideoBugT1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:D.VBugStateType.VBugStateTypeNone;(0,h.default)(this,e),this.cid=t,this.ip=i,this.port=n,this.srcid=r,this.dstid=s,this.audiocodec=a,this.videocodec=o,this.state=c}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.ip),e.writeString(this.port),e.writeString(this.srcid),e.writeString(this.dstid),e.writeString(this.audiocodec),e.writeString(this.videocodec),D.VBugStateType._write(e,this.state)}},{key:"_read",value:function(e){this.cid=e.readString(),this.ip=e.readString(),this.port=e.readString(),this.srcid=e.readString(),this.dstid=e.readString(),this.audiocodec=e.readString(),this.videocodec=e.readString(),this.state=D.VBugStateType._read(e)}}],[{key:"minWireSize",get:function(){return 8}}]),e}(),We.defineStruct(D.VideoBugT1,!0,!0),D.PlayVideoEvT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D.PlayVideoType.PlayVideoTypeNone;(0,h.default)(this,e),this.cid=t,this.uuid=i,this.type=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.uuid),D.PlayVideoType._write(e,this.type)}},{key:"_read",value:function(e){this.cid=e.readString(),this.uuid=e.readString(),this.type=D.PlayVideoType._read(e)}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),We.defineStruct(D.PlayVideoEvT,!0,!0);D.VideoCB=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.VideoCBPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),We.defineOperations(D.VideoCB,D.VideoCBPrx,["::Dispatcher::VideoCB","::Ice::Object"],0,{IFCNotifyVideoBugEvt:[,2,2,,,[[D.VideoBugT]],,,,],IFCNotifyVideoBugEvt2:[,2,2,,,[[D.VideoBugT1]],,,,],IFCNotifyPlayVideoEvt:[,2,2,,,[[D.PlayVideoEvT]],,,,]});i.Ice._ModuleRegistry;var Ke=i.Ice.Slice;D.VideoBugStartT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";(0,h.default)(this,e),this.dstid=t,this.ip=i,this.port=n,this.codec=r,this.srcid=s}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.dstid),e.writeString(this.ip),e.writeString(this.port),e.writeString(this.codec),e.writeString(this.srcid)}},{key:"_read",value:function(e){this.dstid=e.readString(),this.ip=e.readString(),this.port=e.readString(),this.codec=e.readString(),this.srcid=e.readString()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),Ke.defineStruct(D.VideoBugStartT,!0,!0),D.VideoBugStartRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.cid=t,this.srcid=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.srcid)}},{key:"_read",value:function(e){this.cid=e.readString(),this.srcid=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Ke.defineStruct(D.VideoBugStartRT,!0,!0),D.VideoBugEndT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.cid=t,this.srcid=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.srcid)}},{key:"_read",value:function(e){this.cid=e.readString(),this.srcid=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Ke.defineStruct(D.VideoBugEndT,!0,!0),D.VideoBugEndRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.srcid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.srcid)}},{key:"_read",value:function(e){this.srcid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Ke.defineStruct(D.VideoBugEndRT,!0,!0),D.PlayVideoT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D.PlayVideoType.PlayVideoTypeNone;(0,h.default)(this,e),this.cid=t,this.fid=i,this.state=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.fid),D.PlayVideoType._write(e,this.state)}},{key:"_read",value:function(e){this.cid=e.readString(),this.fid=e.readString(),this.state=D.PlayVideoType._read(e)}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Ke.defineStruct(D.PlayVideoT,!0,!0),D.PlayVideoRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;(0,h.default)(this,e),this.code=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.code)}},{key:"_read",value:function(e){this.code=e.readInt()}}],[{key:"minWireSize",get:function(){return 4}}]),e}(),Ke.defineStruct(D.PlayVideoRT,!0,!1),D.VideoInfoT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.dummy=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.dummy)}},{key:"_read",value:function(e){this.dummy=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Ke.defineStruct(D.VideoInfoT,!0,!0),D.VideoChannelInfo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";(0,h.default)(this,e),this.ID=t,this.ChannelNum=i,this.bindEmployeeID=n,this.ChannelName=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.ID),e.writeInt(this.ChannelNum),e.writeString(this.bindEmployeeID),e.writeString(this.ChannelName)}},{key:"_read",value:function(e){this.ID=e.readInt(),this.ChannelNum=e.readInt(),this.bindEmployeeID=e.readString(),this.ChannelName=e.readString()}}],[{key:"minWireSize",get:function(){return 10}}]),e}(),Ke.defineStruct(D.VideoChannelInfo,!0,!0),Ke.defineSequence(D,"VideoChannelsHelper","Dispatcher.VideoChannelInfo",!1),D.VideoInfoElem=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:D.emVideoDeviceType.VDTNONE,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;(0,h.default)(this,e),this.id=t,this.videoIP=i,this.videoport=n,this.user=r,this.password=s,this.showname=a,this.type=o,this.channels=c}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.id),e.writeString(this.videoIP),e.writeString(this.videoport),e.writeString(this.user),e.writeString(this.password),e.writeString(this.showname),D.emVideoDeviceType._write(e,this.type),D.VideoChannelsHelper.write(e,this.channels)}},{key:"_read",value:function(e){this.id=e.readInt(),this.videoIP=e.readString(),this.videoport=e.readString(),this.user=e.readString(),this.password=e.readString(),this.showname=e.readString(),this.type=D.emVideoDeviceType._read(e),this.channels=D.VideoChannelsHelper.read(e)}}],[{key:"minWireSize",get:function(){return 11}}]),e}(),Ke.defineStruct(D.VideoInfoElem,!0,!0),Ke.defineSequence(D,"VideoInfoSeqHelper","Dispatcher.VideoInfoElem",!1),D.VideoInfoRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,h.default)(this,e),this.vseq=t}return(0,f.default)(e,[{key:"_write",value:function(e){D.VideoInfoSeqHelper.write(e,this.vseq)}},{key:"_read",value:function(e){this.vseq=D.VideoInfoSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Ke.defineStruct(D.VideoInfoRT,!0,!0),D.VideoChannelInfo1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";(0,h.default)(this,e),this.ID=t,this.ChannelNum=i,this.bindEmployeeID=n,this.ChannelName=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.ID),e.writeInt(this.ChannelNum),e.writeString(this.bindEmployeeID),e.writeString(this.ChannelName)}},{key:"_read",value:function(e){this.ID=e.readInt(),this.ChannelNum=e.readInt(),this.bindEmployeeID=e.readString(),this.ChannelName=e.readString()}}],[{key:"minWireSize",get:function(){return 10}}]),e}(),Ke.defineStruct(D.VideoChannelInfo1,!0,!0),Ke.defineSequence(D,"VideoChannels1Helper","Dispatcher.VideoChannelInfo1",!1),D.VideoInfoElem1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;(0,h.default)(this,e),this.id=t,this.videoIP=i,this.videoport=n,this.user=r,this.password=s,this.showname=a,this.type=o,this.channels=c}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.id),e.writeString(this.videoIP),e.writeString(this.videoport),e.writeString(this.user),e.writeString(this.password),e.writeString(this.showname),e.writeInt(this.type),D.VideoChannels1Helper.write(e,this.channels)}},{key:"_read",value:function(e){this.id=e.readInt(),this.videoIP=e.readString(),this.videoport=e.readString(),this.user=e.readString(),this.password=e.readString(),this.showname=e.readString(),this.type=e.readInt(),this.channels=D.VideoChannels1Helper.read(e)}}],[{key:"minWireSize",get:function(){return 14}}]),e}(),Ke.defineStruct(D.VideoInfoElem1,!0,!0),Ke.defineSequence(D,"VideoInfoSeq1Helper","Dispatcher.VideoInfoElem1",!1),D.VideoInfoRT1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,h.default)(this,e),this.vseq=t}return(0,f.default)(e,[{key:"_write",value:function(e){D.VideoInfoSeq1Helper.write(e,this.vseq)}},{key:"_read",value:function(e){this.vseq=D.VideoInfoSeq1Helper.read(e)}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Ke.defineStruct(D.VideoInfoRT1,!0,!0),D.VideoControlType=Ke.defineEnum([["VideoControlTypeX",0],["VideoControlTypeY",1],["VideoControlTypeZoom",2],["VideoControlTypeLR",3],["VideoControlTypeFocus",4],["VideoControlTypeZoomADD",20],["VideoControlTypeZoomDEL",21]]),D.CameraNumberControl=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D.VideoControlType.VideoControlTypeX,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;(0,h.default)(this,e),this.number=t,this.ctype=i,this.IsStart=n,this.TimeOut=r,this.step=s}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.number),D.VideoControlType._write(e,this.ctype),e.writeBool(this.IsStart),e.writeInt(this.TimeOut),e.writeFloat(this.step)}},{key:"_read",value:function(e){this.number=e.readString(),this.ctype=D.VideoControlType._read(e),this.IsStart=e.readBool(),this.TimeOut=e.readInt(),this.step=e.readFloat()}}],[{key:"minWireSize",get:function(){return 11}}]),e}(),Ke.defineStruct(D.CameraNumberControl,!1,!0),D.CameraIPControl=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:D.VideoControlType.VideoControlTypeX,o=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0;(0,h.default)(this,e),this.strip=t,this.strport=i,this.struser=n,this.strpwd=r,this.channel=s,this.ctype=a,this.IsStart=o,this.TimeOut=c,this.step=u}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.strip),e.writeString(this.strport),e.writeString(this.struser),e.writeString(this.strpwd),e.writeInt(this.channel),D.VideoControlType._write(e,this.ctype),e.writeBool(this.IsStart),e.writeInt(this.TimeOut),e.writeFloat(this.step)}},{key:"_read",value:function(e){this.strip=e.readString(),this.strport=e.readString(),this.struser=e.readString(),this.strpwd=e.readString(),this.channel=e.readInt(),this.ctype=D.VideoControlType._read(e),this.IsStart=e.readBool(),this.TimeOut=e.readInt(),this.step=e.readFloat()}}],[{key:"minWireSize",get:function(){return 18}}]),e}(),Ke.defineStruct(D.CameraIPControl,!1,!0),D.HistoryVideoT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";(0,h.default)(this,e),this.srcnumber=t,this.caramnumber=i,this.timestart=n,this.timeend=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.srcnumber),e.writeString(this.caramnumber),e.writeString(this.timestart),e.writeString(this.timeend)}},{key:"_read",value:function(e){this.srcnumber=e.readString(),this.caramnumber=e.readString(),this.timestart=e.readString(),this.timeend=e.readString()}}],[{key:"minWireSize",get:function(){return 4}}]),e}(),Ke.defineStruct(D.HistoryVideoT,!0,!0),D.HistoryVideoOperateT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;(0,h.default)(this,e),this.cid=t,this.caramnumber=i,this.second=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.caramnumber),e.writeInt(this.second)}},{key:"_read",value:function(e){this.cid=e.readString(),this.caramnumber=e.readString(),this.second=e.readInt()}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),Ke.defineStruct(D.HistoryVideoOperateT,!0,!0),D.HistoryVSpeedT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;(0,h.default)(this,e),this.cid=t,this.caramnumber=i,this.speed=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.caramnumber),e.writeFloat(this.speed)}},{key:"_read",value:function(e){this.cid=e.readString(),this.caramnumber=e.readString(),this.speed=e.readFloat()}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),Ke.defineStruct(D.HistoryVSpeedT,!1,!0),D.PlayHistoryVideoRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.cid=t,this.caramnumber=i,this.msg=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.caramnumber),e.writeString(this.msg)}},{key:"_read",value:function(e){this.cid=e.readString(),this.caramnumber=e.readString(),this.msg=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Ke.defineStruct(D.PlayHistoryVideoRT,!0,!0),D.SipPhoneVideoBugT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.called=t,this.caller=i,this.codec=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.called),e.writeString(this.caller),e.writeString(this.codec)}},{key:"_read",value:function(e){this.called=e.readString(),this.caller=e.readString(),this.codec=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Ke.defineStruct(D.SipPhoneVideoBugT,!0,!0),D.SipPhoneVideoBugRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.cid=t,this.empid=i,this.sessnum=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.empid),e.writeString(this.sessnum)}},{key:"_read",value:function(e){this.cid=e.readString(),this.empid=e.readString(),this.sessnum=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Ke.defineStruct(D.SipPhoneVideoBugRT,!0,!0);D.VideoOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.Object),D.VideoOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i)}(i.Ice.ObjectPrx),Ke.defineOperations(D.VideoOP,D.VideoOPPrx,["::Dispatcher::VideoOP","::Ice::Object"],0,{IFCReqStartVideoBug:[,,,,[D.VideoBugStartRT],[[D.Identity],[D.VideoBugStartT]],,[D.Error],,],IFCReqStopVideoBug:[,,,,[D.VideoBugEndRT],[[D.Identity],[D.VideoBugEndT]],,[D.Error],,],IFCReqPlayVideo:[,,,,[D.PlayVideoRT],[[D.Identity],[D.PlayVideoT]],,[D.Error],,],IFCReqGetVideoInfo:[,,,,[D.VideoInfoRT],[[D.Identity],[D.VideoInfoT]],,[D.Error],,],IFCReqGetVideoInfo2:[,,,,[D.VideoInfoRT1],[[D.Identity],[D.VideoInfoT]],,[D.Error],,],IFCReqCameraControlByNumber:[,,,,,[[D.Identity],[D.CameraNumberControl]],,[D.Error],,],IFCReqCameraControlByIP:[,,,,,[[D.Identity],[D.CameraIPControl]],,[D.Error],,],IFCReqGetHistoryVideo:[,,,,,[[D.Identity],[D.HistoryVideoT]],,[D.Error],,],IFCReqPlayHistoryVideo:[,,,,[D.PlayHistoryVideoRT],[[D.Identity],[D.HistoryVideoT]],,[D.Error],,],IFCReqHistoryVideoPlay:[,,,,,[[D.Identity],[D.HistoryVideoOperateT]],,[D.Error],,],IFCReqHistoryVideoPause:[,,,,,[[D.Identity],[D.HistoryVideoOperateT]],,[D.Error],,],IFCReqHistoryVideoSpeed:[,,,,,[[D.Identity],[D.HistoryVSpeedT]],,[D.Error],,],IFCReqPhoneVideoBug:[,,,,[D.SipPhoneVideoBugRT],[[D.Identity],[D.SipPhoneVideoBugT]],,[D.Error],,]});i.Ice._ModuleRegistry;var Je=i.Ice.Slice;D.MdsStateAgentMonitorSessionType=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.sid=t,this.employeeid=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.employeeid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.employeeid=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Je.defineStruct(D.MdsStateAgentMonitorSessionType,!0,!0),D.MdsStateAgentMonitorSessionElem=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";(0,h.default)(this,e),this.cid=t,this.caller=i,this.called=n,this.type=r,this.time=s,this.level=a,this.state=o}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.cid),e.writeString(this.caller),e.writeString(this.called),e.writeInt(this.type),e.writeString(this.time),e.writeInt(this.level),e.writeString(this.state)}},{key:"_read",value:function(e){this.cid=e.readString(),this.caller=e.readString(),this.called=e.readString(),this.type=e.readInt(),this.time=e.readString(),this.level=e.readInt(),this.state=e.readString()}}],[{key:"minWireSize",get:function(){return 13}}]),e}(),Je.defineStruct(D.MdsStateAgentMonitorSessionElem,!0,!0),Je.defineSequence(D,"MdsStateAgentMonitorSessionSeqHelper","Dispatcher.MdsStateAgentMonitorSessionElem",!1),D.MdsStateAgentMonitorSessionRType=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,h.default)(this,e),this.sid=t,this.sseq=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),D.MdsStateAgentMonitorSessionSeqHelper.write(e,this.sseq)}},{key:"_read",value:function(e){this.sid=e.readString(),this.sseq=D.MdsStateAgentMonitorSessionSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Je.defineStruct(D.MdsStateAgentMonitorSessionRType,!0,!0),D.MdsStateAgentMonitorDeviceType=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;(0,h.default)(this,e),this.sid=t,this.employeeid=i,this.employeename=n,this.type=r}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.employeeid),e.writeString(this.employeename),e.writeInt(this.type)}},{key:"_read",value:function(e){this.sid=e.readString(),this.employeeid=e.readString(),this.employeename=e.readString(),this.type=e.readInt()}}],[{key:"minWireSize",get:function(){return 7}}]),e}(),Je.defineStruct(D.MdsStateAgentMonitorDeviceType,!0,!0),D.MdsStateAgentMonitorDeviceElem=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;(0,h.default)(this,e),this.employeename=t,this.employeeid=i,this.type=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeename),e.writeString(this.employeeid),e.writeInt(this.type)}},{key:"_read",value:function(e){this.employeename=e.readString(),this.employeeid=e.readString(),this.type=e.readInt()}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),Je.defineStruct(D.MdsStateAgentMonitorDeviceElem,!0,!0),Je.defineSequence(D,"MdsStateAgentMonitorDeviceSeqHelper","Dispatcher.MdsStateAgentMonitorDeviceElem",!1),D.MdsStateAgentMonitorDeviceRType=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,h.default)(this,e),this.sid=t,this.dseq=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),D.MdsStateAgentMonitorDeviceSeqHelper.write(e,this.dseq)}},{key:"_read",value:function(e){this.sid=e.readString(),this.dseq=D.MdsStateAgentMonitorDeviceSeqHelper.read(e)}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Je.defineStruct(D.MdsStateAgentMonitorDeviceRType,!0,!0),D.MdsSessionAgentSetNightServiceType=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";(0,h.default)(this,e),this.sid=t,this.employeeid=i,this.nightnumber=n,this.starttime=r,this.endtime=s}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.employeeid),e.writeString(this.nightnumber),e.writeString(this.starttime),e.writeString(this.endtime)}},{key:"_read",value:function(e){this.sid=e.readString(),this.employeeid=e.readString(),this.nightnumber=e.readString(),this.starttime=e.readString(),this.endtime=e.readString()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),Je.defineStruct(D.MdsSessionAgentSetNightServiceType,!0,!0),D.MdsSessionAgentSetNightServiceRsType=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.sid=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid)}},{key:"_read",value:function(e){this.sid=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Je.defineStruct(D.MdsSessionAgentSetNightServiceRsType,!0,!0),D.MdsSessionAgentSetNightServiceReType=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.sid=t,this.errid=i,this.dis=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeInt(this.errid),e.writeString(this.dis)}},{key:"_read",value:function(e){this.sid=e.readString(),this.errid=e.readInt(),this.dis=e.readString()}}],[{key:"minWireSize",get:function(){return 6}}]),e}(),Je.defineStruct(D.MdsSessionAgentSetNightServiceReType,!0,!0),D.MdsDataAgentGetConfigType=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.sid=t,this.employeeid=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.employeeid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.employeeid=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Je.defineStruct(D.MdsDataAgentGetConfigType,!0,!0),D.MdsDataAgentGetConfigRType=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";(0,h.default)(this,e),this.sid=t,this.databasetype=i,this.databasename=n,this.databaseuser=r,this.databasepwd=s,this.databaseip=a,this.databaseport=o}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.databasetype),e.writeString(this.databasename),e.writeString(this.databaseuser),e.writeString(this.databasepwd),e.writeString(this.databaseip),e.writeString(this.databaseport)}},{key:"_read",value:function(e){this.sid=e.readString(),this.databasetype=e.readString(),this.databasename=e.readString(),this.databaseuser=e.readString(),this.databasepwd=e.readString(),this.databaseip=e.readString(),this.databaseport=e.readString()}}],[{key:"minWireSize",get:function(){return 7}}]),e}(),Je.defineStruct(D.MdsDataAgentGetConfigRType,!0,!0),D.MdsDataAgentDatachangeType=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;(0,h.default)(this,e),this.a=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.a)}},{key:"_read",value:function(e){this.a=e.readInt()}}],[{key:"minWireSize",get:function(){return 4}}]),e}(),Je.defineStruct(D.MdsDataAgentDatachangeType,!0,!1),D.MdsDataAgentGetDataType=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.sid=t,this.tablename=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.tablename)}},{key:"_read",value:function(e){this.sid=e.readString(),this.tablename=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Je.defineStruct(D.MdsDataAgentGetDataType,!0,!0),D.MdsDataAgentGetTerminalVideoIpType=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,h.default)(this,e),this.sid=t,this.employeeid=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.employeeid)}},{key:"_read",value:function(e){this.sid=e.readString(),this.employeeid=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),Je.defineStruct(D.MdsDataAgentGetTerminalVideoIpType,!0,!0),D.MdsDataAgentGetTerminalVideoIpRType=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.sid=t,this.employeeid=i,this.videoip=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.sid),e.writeString(this.employeeid),e.writeString(this.videoip)}},{key:"_read",value:function(e){this.sid=e.readString(),this.employeeid=e.readString(),this.videoip=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Je.defineStruct(D.MdsDataAgentGetTerminalVideoIpRType,!0,!0),D.BindTerminalT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,h.default)(this,e),this.number=t,this.type=i}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.number),e.writeInt(this.type)}},{key:"_read",value:function(e){this.number=e.readString(),this.type=e.readInt()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),Je.defineStruct(D.BindTerminalT,!0,!0),Je.defineSequence(D,"BindTerminalSeqHelper","Dispatcher.BindTerminalT",!1),D.BindTerminalRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.ret=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.ret)}},{key:"_read",value:function(e){this.ret=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Je.defineStruct(D.BindTerminalRT,!0,!0),D.AllStateT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.type=t,this.group=i,this.employeeid=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.type),e.writeString(this.group),e.writeString(this.employeeid)}},{key:"_read",value:function(e){this.type=e.readString(),this.group=e.readString(),this.employeeid=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Je.defineStruct(D.AllStateT,!0,!0),D.AllStateRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D.RegisterState.RegisterStateNone,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D.CallState.CallStateNone,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";(0,h.default)(this,e),this.employeeid=t,this.rstate=i,this.cstate=n,this.othernumber=r,this.othername=s}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.employeeid),D.RegisterState._write(e,this.rstate),D.CallState._write(e,this.cstate),e.writeString(this.othernumber),e.writeString(this.othername)}},{key:"_read",value:function(e){this.employeeid=e.readString(),this.rstate=D.RegisterState._read(e),this.cstate=D.CallState._read(e),this.othernumber=e.readString(),this.othername=e.readString()}}],[{key:"minWireSize",get:function(){return 5}}]),e}(),Je.defineStruct(D.AllStateRT,!0,!0),Je.defineSequence(D,"AllStateRSeqHelper","Dispatcher.AllStateRT",!1),D.SetNightServiceT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.nightnumber=t,this.starttime=i,this.endtime=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.nightnumber),e.writeString(this.starttime),e.writeString(this.endtime)}},{key:"_read",value:function(e){this.nightnumber=e.readString(),this.starttime=e.readString(),this.endtime=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Je.defineStruct(D.SetNightServiceT,!0,!0),D.SetNightServiceRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.dummy=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.dummy)}},{key:"_read",value:function(e){this.dummy=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Je.defineStruct(D.SetNightServiceRT,!0,!0),D.GetNightServiceRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,h.default)(this,e),this.nightnumber=t,this.starttime=i,this.endtime=n}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.nightnumber),e.writeString(this.starttime),e.writeString(this.endtime)}},{key:"_read",value:function(e){this.nightnumber=e.readString(),this.starttime=e.readString(),this.endtime=e.readString()}}],[{key:"minWireSize",get:function(){return 3}}]),e}(),Je.defineStruct(D.GetNightServiceRT,!0,!0),D.GetNightServiceT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.number=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.number)}},{key:"_read",value:function(e){this.number=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Je.defineStruct(D.GetNightServiceT,!0,!0),D.TerminalDetailT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.number=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.number)}},{key:"_read",value:function(e){this.number=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Je.defineStruct(D.TerminalDetailT,!0,!0),D.TerminalDetailRT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,f=arguments.length>11&&void 0!==arguments[11]?arguments[11]:"",g=arguments.length>12&&void 0!==arguments[12]?arguments[12]:0,p=arguments.length>13&&void 0!==arguments[13]?arguments[13]:0,v=arguments.length>14&&void 0!==arguments[14]?arguments[14]:0,m=arguments.length>15&&void 0!==arguments[15]?arguments[15]:"",y=arguments.length>16&&void 0!==arguments[16]?arguments[16]:"",_=arguments.length>17&&void 0!==arguments[17]?arguments[17]:"",S=arguments.length>18&&void 0!==arguments[18]?arguments[18]:0,I=arguments.length>19&&void 0!==arguments[19]?arguments[19]:"",w=arguments.length>20&&void 0!==arguments[20]?arguments[20]:0;(0,h.default)(this,e),this.id=t,this.employeeId=i,this.password=n,this.employeeLevel=r,this.departId=s,this.roleId=a,this.name=o,this.addTime=c,this.modifyTime=u,this.theState=l,this.theType=d,this.remark=f,this.latitude=g,this.longitude=p,this.isRecord=v,this.monName=m,this.monPasswd=y,this.monIp=_,this.monPort=S,this.monFlag=I,this.isVideo=w}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeInt(this.id),e.writeString(this.employeeId),e.writeString(this.password),e.writeInt(this.employeeLevel),e.writeInt(this.departId),e.writeInt(this.roleId),e.writeString(this.name),e.writeString(this.addTime),e.writeString(this.modifyTime),e.writeInt(this.theState),e.writeInt(this.theType),e.writeString(this.remark),e.writeDouble(this.latitude),e.writeDouble(this.longitude),e.writeInt(this.isRecord),e.writeString(this.monName),e.writeString(this.monPasswd),e.writeString(this.monIp),e.writeInt(this.monPort),e.writeString(this.monFlag),e.writeInt(this.isVideo)}},{key:"_read",value:function(e){this.id=e.readInt(),this.employeeId=e.readString(),this.password=e.readString(),this.employeeLevel=e.readInt(),this.departId=e.readInt(),this.roleId=e.readInt(),this.name=e.readString(),this.addTime=e.readString(),this.modifyTime=e.readString(),this.theState=e.readInt(),this.theType=e.readInt(),this.remark=e.readString(),this.latitude=e.readDouble(),this.longitude=e.readDouble(),this.isRecord=e.readInt(),this.monName=e.readString(),this.monPasswd=e.readString(),this.monIp=e.readString(),this.monPort=e.readInt(),this.monFlag=e.readString(),this.isVideo=e.readInt()}}],[{key:"minWireSize",get:function(){return 62}}]),e}(),Je.defineStruct(D.TerminalDetailRT,!1,!0),D.GetSessionEventT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,h.default)(this,e),this.dummy=t}return(0,f.default)(e,[{key:"_write",value:function(e){e.writeString(this.dummy)}},{key:"_read",value:function(e){this.dummy=e.readString()}}],[{key:"minWireSize",get:function(){return 1}}]),e}(),Je.defineStruct(D.GetSessionEventT,!0,!0);D.IFCSrv=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i,null,[{key:"_iceImplements",get:function(){return[D.CommSrv,D.RegisterOP,D.CallingOP,D.ConfigureOP,D.VideoOP,D.GisOP,D.PttOP,D.MessageOP,D.CallingVOP,D.PrePlanOP,D.FaxOP,D.DecoderOP,D.McuOP,D.PublishOP,D.BusinessOP,D.RailWayOP]}}]),i}(i.Ice.Object),D.IFCSrvPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i,null,[{key:"_implements",get:function(){return[D.CommSrvPrx,D.RegisterOPPrx,D.CallingOPPrx,D.ConfigureOPPrx,D.VideoOPPrx,D.GisOPPrx,D.PttOPPrx,D.MessageOPPrx,D.CallingVOPPrx,D.PrePlanOPPrx,D.FaxOPPrx,D.DecoderOPPrx,D.McuOPPrx,D.PublishOPPrx,D.BusinessOPPrx,D.RailWayOPPrx]}}]),i}(i.Ice.ObjectPrx),Je.defineOperations(D.IFCSrv,D.IFCSrvPrx,["::Dispatcher::BusinessOP","::Dispatcher::CallingOP","::Dispatcher::CallingVOP","::Dispatcher::CommSrv","::Dispatcher::ConfigureOP","::Dispatcher::DecoderOP","::Dispatcher::FaxOP","::Dispatcher::FileOP","::Dispatcher::GisOP","::Dispatcher::IFCSrv","::Dispatcher::McuOP","::Dispatcher::MessageOP","::Dispatcher::PrePlanOP","::Dispatcher::PttOP","::Dispatcher::PublishOP","::Dispatcher::RailWayOP","::Dispatcher::RegisterOP","::Dispatcher::VideoOP","::Ice::Object"],9,{IFCReqBindNumber:[,,,,[D.BindTerminalRT],[[D.Identity],["Dispatcher.BindTerminalSeqHelper"]],,[D.Error],,],IFCReqGetAllState:[,,,,["Dispatcher.AllStateRSeqHelper"],[[D.Identity],[D.AllStateT]],,[D.Error],,],IFCReqSetNightService:[,,,,[D.SetNightServiceRT],[[D.Identity],[D.SetNightServiceT]],,[D.Error],,],IFCReqSetNightServiceByJson:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetNightService:[,,,,[D.GetNightServiceRT],[[D.Identity],[D.GetNightServiceT]],,[D.Error],,],IFCReqGetUserDetail:[,,,,[D.TerminalDetailRT],[[D.Identity],[D.TerminalDetailT]],,[D.Error],,],IFCReqGetUserDetailByJson:[,,,,[7],[[D.Identity],[7]],,[D.Error],,],IFCReqGetSessionEvt:[,2,2,,,[[D.Identity],[D.GetSessionEventT]],,,,],IFCReqGetUserConfig:[,2,2,,,[[7],[D.MdsDataAgentGetConfigType]],,,,],IFCReqDataChange:[,2,2,,,[[7],[D.MdsDataAgentDatachangeType]],,,,],IFCReqMonitorSession:[,2,2,,,[[7],[D.MdsStateAgentMonitorSessionType]],,,,],IFCReqMonitorDevice:[,2,2,,,[[7],[D.MdsStateAgentMonitorDeviceType]],,,,],IFCReqAgentGetUserVideoIP:[,2,2,,,[[7],[D.MdsDataAgentGetTerminalVideoIpType]],,,,]});D.MDCCli=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i,null,[{key:"_iceImplements",get:function(){return[D.CommCli,D.RegisterCB,D.CallingCB,D.ConfigureCB,D.VideoCB,D.GisCB,D.PttCB,D.MessageCB,D.CallingVCB,D.PrePlanCB,D.FaxCB,D.StateCB,D.DecoderCB,D.McuCB,D.PublishCB]}}]),i}(i.Ice.Object),D.MDCCliPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i,null,[{key:"_implements",get:function(){return[D.CommCliPrx,D.RegisterCBPrx,D.CallingCBPrx,D.ConfigureCBPrx,D.VideoCBPrx,D.GisCBPrx,D.PttCBPrx,D.MessageCBPrx,D.CallingVCBPrx,D.PrePlanCBPrx,D.FaxCBPrx,D.StateCBPrx,D.DecoderCBPrx,D.McuCBPrx,D.PublishCBPrx]}}]),i}(i.Ice.ObjectPrx),Je.defineOperations(D.MDCCli,D.MDCCliPrx,["::Dispatcher::CallingCB","::Dispatcher::CallingVCB","::Dispatcher::CommCli","::Dispatcher::ConfigureCB","::Dispatcher::DecoderCB","::Dispatcher::FaxCB","::Dispatcher::FileCB","::Dispatcher::GisCB","::Dispatcher::MDCCli","::Dispatcher::McuCB","::Dispatcher::MessageCB","::Dispatcher::PrePlanCB","::Dispatcher::PttCB","::Dispatcher::PublishCB","::Dispatcher::RegisterCB","::Dispatcher::StateCB","::Dispatcher::VideoCB","::Ice::Object"],8);i.Ice._ModuleRegistry;var Xe,Ye=i.Ice.Slice;D.MobileOP=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i,null,[{key:"_iceImplements",get:function(){return[D.RegisterOP,D.PttOP,D.VideoOP,D.CallingOP,D.MessageOP,D.GisOP,D.CallingVOP,D.ConfigureOP]}}]),i}(i.Ice.Object),D.MobileOPPrx=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.apply(this,arguments)}return(0,f.default)(i,null,[{key:"_implements",get:function(){return[D.RegisterOPPrx,D.PttOPPrx,D.VideoOPPrx,D.CallingOPPrx,D.MessageOPPrx,D.GisOPPrx,D.CallingVOPPrx,D.ConfigureOPPrx]}}]),i}(i.Ice.ObjectPrx),Ye.defineOperations(D.MobileOP,D.MobileOPPrx,["::Dispatcher::CallingOP","::Dispatcher::CallingVOP","::Dispatcher::ConfigureOP","::Dispatcher::FileOP","::Dispatcher::GisOP","::Dispatcher::MessageOP","::Dispatcher::MobileOP","::Dispatcher::PttOP","::Dispatcher::RegisterOP","::Dispatcher::VideoOP","::Ice::Object"],6),function(e){e[e["Normal"]=0]="Normal",e[e["PTT"]=1]="PTT"}(Xe||(Xe={}));var Ze=function(){function t(){(0,h.default)(this,t),this.enable=!0}return(0,f.default)(t,[{key:"log",value:function(t){this.enable&&(t=this.getNowFormatDate()+" : "+t,e("log",t," at util/webrtc.js:12869"))}},{key:"warn",value:function(t){this.enable&&(t=this.getNowFormatDate()+" : "+t,e("warn",t," at util/webrtc.js:12875"))}},{key:"error",value:function(t){this.enable&&(t=this.getNowFormatDate()+" : "+t,e("error",t," at util/webrtc.js:12881"))}},{key:"getNowFormatDate",value:function(){var e=new Date,t=e.getMonth()+1,i=e.getDate(),n=e.getFullYear()+"/"+t+"/"+i+" "+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds();return n}}],[{key:"getInstance",value:function(){return null==t.sInstance&&(t.sInstance=new t),t.sInstance}}]),t}();Ze.sInstance=null;var Qe,et,tt,it,nt,rt=function(){function e(){(0,h.default)(this,e),this.handleMode=t.HandleMode.Normal,this.audioInputDeviceConfig={id:""},this.videoInputDeviceConfig={id:"",width:0,height:0,frameRate:100}}return(0,f.default)(e,[{key:"currentNumber",get:function(){switch(this.handleMode){case t.HandleMode.Left:return this.leftPhone;case t.HandleMode.Right:return this.rightPhone;default:break}return this.number}}],[{key:"getInstance",value:function(){return null==e.s_instance&&(e.s_instance=new e),e.s_instance}}]),e}();(function(e){e[e["Local"]=0]="Local",e[e["RecoderServer"]=1]="RecoderServer"})(Qe||(Qe={})),function(e){e[e["Other"]=0]="Other",e[e["Dispatcher"]=1]="Dispatcher",e[e["APP"]=2]="APP",e[e["SIP"]=3]="SIP",e[e["Monitor"]=4]="Monitor",e[e["OutlineMonitorPhone"]=5]="OutlineMonitorPhone",e[e["OutlineTelePhone"]=6]="OutlineTelePhone",e[e["TianTong"]=7]="TianTong",e[e["Device323"]=8]="Device323",e[e["Wade"]=9]="Wade",e[e["StationGroup"]=10]="StationGroup",e[e["RelayGateway"]=11]="RelayGateway",e[e["OutlineCar"]=12]="OutlineCar",e[e["MeshDevice"]=13]="MeshDevice"}(et||(et={})),function(e){e[e["Out"]=0]="Out",e[e["In"]=1]="In"}(tt||(tt={})),function(e){e[e["None"]=0]="None",e[e["Init"]=1]="Init",e[e["Normal"]=2]="Normal",e[e["Callout"]=3]="Callout",e[e["Incoming"]=4]="Incoming",e[e["Ringing"]=5]="Ringing",e[e["Connect"]=6]="Connect",e[e["Hold"]=7]="Hold",e[e["Busy"]=8]="Busy",e[e["Offhook"]=9]="Offhook",e[e["Release"]=10]="Release",e[e["Unspeak"]=11]="Unspeak",e[e["Speak"]=12]="Speak",e[e["Queue"]=13]="Queue",e[e["Unhold"]=14]="Unhold",e[e["Zombie"]=15]="Zombie"}(it||(it={})),function(e){e[e["None"]=0]="None",e[e["Single"]=1]="Single",e[e["Group"]=2]="Group",e[e["Report"]=3]="Report",e[e["Broadcast"]=4]="Broadcast",e[e["Conference"]=5]="Conference",e[e["Interpose"]=6]="Interpose",e[e["Forceremove"]=7]="Forceremove",e[e["Monitor"]=8]="Monitor",e[e["Switch"]=9]="Switch",e[e["Urgent"]=10]="Urgent",e[e["Intercom"]=11]="Intercom",e[e["Tempintercom"]=12]="Tempintercom",e[e["VideoBug"]=13]="VideoBug",e[e["MCUMetting"]=14]="MCUMetting",e[e["SOS"]=15]="SOS",e[e["TransferVideo"]=16]="TransferVideo",e[e["TransferVideoToMCU"]=17]="TransferVideoToMCU"}(nt||(nt={}));var st,at,ot=(0,f.default)((function e(){(0,h.default)(this,e);var i={number:"0",otherNumber:"0",otherName:"0",callType:nt.None,state:it.None,otherMark:"",otherLatitude:0,otherLongitude:0,direction:tt.Out,sessionId:""};this.state={registState:t.RegistState.Unregisted,callState:i}}));(function(e){e[e["regStateChange"]=0]="regStateChange",e[e["CallStateChange"]=1]="CallStateChange",e[e["SessionStateChange"]=2]="SessionStateChange",e[e["ServerDisconnect"]=3]="ServerDisconnect",e[e["ServerConnectd"]=4]="ServerConnectd",e[e["SessionMemberChange"]=5]="SessionMemberChange",e[e["PttStateSpeaker"]=6]="PttStateSpeaker",e[e["GisInfo"]=7]="GisInfo",e[e["MsgReceived"]=8]="MsgReceived",e[e["FileMsgReceived"]=9]="FileMsgReceived",e[e["SessionSendToCreaterState"]=10]="SessionSendToCreaterState",e[e["PttWaiting"]=11]="PttWaiting",e[e["PttReject"]=12]="PttReject",e[e["registKickout"]=13]="registKickout",e[e["pushAudioToRTSP"]=14]="pushAudioToRTSP"})(st||(st={})),function(e){e[e["nUnavailable"]=0]="nUnavailable",e[e["nDisconnect"]=1]="nDisconnect",e[e["nConnected"]=2]="nConnected",e[e["nPublished"]=3]="nPublished"}(at||(at={}));var ct=function(e){(0,g.default)(n,e);var i=_(n);function n(){var e;return(0,h.default)(this,n),e=i.apply(this,arguments),e._logger=Ze.getInstance(),e._lasthbTime=0,e}return(0,f.default)(n,[{key:"IFCNotifyForceLogout2",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyGisThirdDataEvt",value:function(e,t){}},{key:"IFCNotifyGisHistoryEvt",value:function(e,t){}},{key:"onPrePlanEv",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyForceLogout",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifySessionStateEvt",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifySessionStateEvt2",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyConfMemberStateEvt",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyCallStateEvt",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyAudioPlayStateEvt",value:function(e,t){}},{key:"IFCNotifyVideoBugEvt",value:function(e,t){}},{key:"IFCNotifyVideoBugEvt2",value:function(e,t){}},{key:"IFCNotifyPlayVideoEvt",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyGisInfoEvt",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyGisInfoEvt2",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyPhoneMsgEvt",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyGroupInfoEvt",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyReqRightResultEvt",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyUploadEvt",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyDeleteFileEvt",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyMsgEvt",value:function(e,t){this._eventEmitter.emit(st.MsgReceived.toString(),JSON.stringify(e))}},{key:"IFCNotifyMsgDelEvt",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifySendVideoEvt",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyGetVideoEvt",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyFaxEvt",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyNewFaxEvt",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyUserStateEvt",value:function(e,t){throw new Error("Method not implemented.")}},{key:"IFCNotifyPublishMsgEvt",value:function(e,i){var n=JSON.parse(e.subMsg);switch(e.subHeader){case"Employee.State.Reg":var r=t.RegistState.Unregisted;switch(n[0].state){case"1":r=t.RegistState.Registed;break;case"2":r=t.RegistState.Unregisted;break;default:break}this._eventEmitter.emit(st.regStateChange.toString(),n[0].employeeid,r);break;case"Employee.State.Call":var s=ut.convertIceCallType(n[0].calltype),a=ut.convertIceCallState(n[0].state),o=tt.Out;"2"==n[0].direct&&(o=tt.In);var c={number:n[0].employeeid,otherNumber:n[0].othernumber,otherName:n[0].othername,callType:s,state:a,otherLatitude:n[0].other_lat,otherLongitude:n[0].other_lon,otherMark:n[0].other_mark,direction:o,sessionId:n[0].cid};this._eventEmitter.emit(st.CallStateChange.toString(),n[0].employeeid,c);break;default:break}}},{key:"IFCNotifyFixMsgEvt",value:function(e,t){var i="IFCNotifyFixMsgEvt header: "+e.subHeader+", msg: "+e.subMsg;switch(this._logger.log(i),e.subHeader){case"Session.State.Change":i="IFCNotifyFixMsgEvt header: "+e.subHeader+", msg: "+e.subMsg;this._logger.log(i),this._eventEmitter.emit(st.SessionStateChange.toString(),e.subMsg);break;case"Session.Member.Change":this._eventEmitter.emit(st.SessionMemberChange.toString(),e.subMsg);break;case"Ptt.Waiting":this._eventEmitter.emit(st.PttWaiting.toString(),e.subMsg);break;case"Ptt.Reject":this._eventEmitter.emit(st.PttReject.toString(),e.subMsg);break;case"Ptt.State.Speaker":this._eventEmitter.emit(st.PttStateSpeaker.toString(),e.subMsg);break;case"GIS.Position.Change":this._eventEmitter.emit(st.GisInfo.toString(),e.subMsg);break;case"FileMsg.OnReceive":this._eventEmitter.emit(st.FileMsgReceived.toString(),e.subMsg);break;case"Session.SendToCreater.State":this._eventEmitter.emit(st.SessionSendToCreaterState.toString(),e.subMsg);break;case"Regist.Kickout.Event":this._eventEmitter.emit(st.registKickout.toString(),e.subMsg);break;case"Push.Call.Audio.To.Other":this._eventEmitter.emit(st.pushAudioToRTSP.toString(),e.subMsg);break;default:break}}},{key:"IFCNotifyPublishHBEvt",value:function(e,t){this._lasthbTime=Date.now()}},{key:"lasthbTime",get:function(){return 0==this._lasthbTime&&(this._lasthbTime=Date.now()),this._lasthbTime}}]),n}(D.MDCCli),ut=function(n){(0,g.default)(o,n);var a=_(o);function o(){var e;return(0,h.default)(this,o),e=a.call(this),e._dispatcherPrx=null,e._caller="1000",e._iceStatus=at.nUnavailable,e._isCheckIceNetworck=!1,e._hbCount=0,e._logger=Ze.getInstance(),e._sendHBTime=0,e.started=!1,e}return(0,f.default)(o,[{key:"iceInit",value:function(){var e=i.Ice.createProperties();e.setProperty("Ice.ACM.Close","0");var t=new i.Ice.InitializationData;t.properties=e,this._iceCommunicator=i.Ice.initialize(t),this._iceStatus=at.nDisconnect}},{key:"connect",value:function(){var e=(0,d.default)(s.default.mark((function e(){var t,n;return s.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._proxy=this._iceCommunicator.stringToProxy("IFCSrv:wss -r /"+this._resourceUrl+" -h "+this._serverIP+" -p "+this._serverPort),this._caller=this._username,this._proxy.ice_timeout(1e4),1e4,this._proxy=this._proxy.ice_invocationTimeout(1e4),this._proxy=this._proxy.ice_twoway(),this._dispatcherPrx=D.IFCSrvPrx.uncheckedCast(this._proxy),e.next=9,this._iceCommunicator.createObjectAdapter("");case 9:return t=e.sent,n=new i.Ice.Identity(this._caller,"MDCCli"),this._myid=new D.Identity(this._caller),this._myReceiver=new ct,this._myReceiver._delegate=this._delegate,this._myReceiver._eventEmitter=this,t.add(this._myReceiver,n),e.prev=16,e.next=19,this._dispatcherPrx.ice_getConnection();case 19:this._connection=e.sent,this._connection.setAdapter(t),e.next=27;break;case 23:return e.prev=23,e.t0=e["catch"](16),this._logger.error("connect error: "+e.t0),e.abrupt("return");case 27:this._iceStatus=at.nConnected;case 28:case"end":return e.stop()}}),e,this,[[16,23]])})));return function(){return e.apply(this,arguments)}}()},{key:"sendHeartBeat",value:function(){var e=this;null!=this._dispatcherPrx&&this._iceStatus==at.nPublished&&(this._logger.log("sendhb"),this._dispatcherPrx.IFCReqPublishHB(this._myid,120).catch((function(t){e._logger.warn("IFCReqPublishHB error: "+t)})),this._sendHBTime=Date.now())}},{key:"publishInfo",value:function(){var e=new D.SubInfos;e.Infos=new Array;var t=new D.SubInfo;t.subHeader=D.EventPttStateSpeaker,e.Infos.push(t);var i=new D.SubInfo;i.subHeader=D.EventEmployeeStateReg,e.Infos.push(i);var n=new D.SubInfo;n.subHeader=D.EventEmployeeStateCall,e.Infos.push(n),this._dispatcherPrx.IFCReqPublishMsg(this._myid,e),this._iceStatus=at.nPublished,this.emit(st.ServerConnectd.toString())}},{key:"checkIceNetwork",value:function(){if(o.getInstance()._isCheckIceNetworck){if(null!=o.getInstance()._myReceiver&&o.getInstance()._sendHBTime>0){var e=Date.now()-o.getInstance()._myReceiver.lasthbTime,i=Date.now()-o.getInstance()._sendHBTime;e>8e4&&e>i&&(o.getInstance()._logger.warn("hbTimeout!!! lasthbTime:"+o.getInstance()._myReceiver.lasthbTime+", timeout: "+e+", sendHBTimeSpan: "+i),o.getInstance()._iceStatus=at.nDisconnect,o.getInstance().emit(st.ServerDisconnect.toString()))}o.getInstance()._iceStatus==at.nUnavailable&&(o.getInstance()._logger.log("checkIceNetwork nUnavailable"),o.getInstance().iceInit(),o.getInstance()._logger.log("checkIceNetwork nUnavailable1")),o.getInstance()._iceStatus==at.nDisconnect&&(o.getInstance()._logger.log("checkIceNetwork nDisconnect"),o.getInstance().connect(),o.getInstance()._logger.log("checkIceNetwork nDisconnect1")),o.getInstance()._iceStatus==at.nConnected&&(o.getInstance()._logger.log("checkIceNetwork nConnected"),os.getInstance().registState==t.RegistState.Registed&&o.getInstance().publishInfo(),o.getInstance()._logger.log("checkIceNetwork nConnected1")),o.getInstance().sendHeartBeat()}o.getInstance()._isCheckIceNetworck&&setTimeout(o.getInstance().checkIceNetwork,5e3)}},{key:"regist",value:function(e,t,i,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";this._serverIP=e,this._serverPort=t,this._username=i,this._isCheckIceNetworck=!0,this._delegate=n,this._resourceUrl=r,this.checkIceNetwork()}},{key:"unRegist",value:function(){this._isCheckIceNetworck=!1;try{this._iceStatus==at.nPublished&&(this._dispatcherPrx.IFCReqUnpublishMsg(this._myid),this._iceStatus=at.nConnected),null!=this._dispatcherPrx&&(this._dispatcherPrx=null)}catch(e){this._logger.log(e)}this._iceStatus=at.nUnavailable}},{key:"getGroupTree",value:function(){var e=(0,d.default)(s.default.mark((function e(){var t,i,n;return s.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=new D.TreeT,t.groupnum="",t.userId=this._caller,e.next=5,this._dispatcherPrx.IFCReqGetOrganization(this._myid,t);case 5:i=e.sent;try{n=JSON.stringify(i.roots),this._logger.log(n)}catch(r){}return e.abrupt("return","");case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getRootGroups",value:function(){var e=this,t=new D.TreeT;return t.groupnum="",t.userId=this._caller,this._dispatcherPrx.IFCReqGetOrganization(this._myid,t).then((function(t){var i=new Array;return t.roots.forEach((function(t){var n=e.convertICEGroup(t);i.push(n)})),Promise.resolve(i)}))}},{key:"getGroupWithUsersById",value:function(e){var t=this,i=new D.TreeT;return i.type=-1,i.groupnum=e,i.userId=this._caller,this._dispatcherPrx.IFCReqGetOrganization(this._myid,i).then((function(e){if(t._logger.log(JSON.stringify(e)),e.roots.length>0){var i=t.convertICEGroup(e.roots.pop());return Promise.resolve(i)}}))}},{key:"getGroupWithUsersJsonById",value:function(t){var i=this,n=new D.TreeT;return n.type=-1,n.groupnum=t,n.userId=this._caller,this._dispatcherPrx.IFCReqGetOrganizationByJson(this._myid,n).then((function(t){var n=JSON.parse(t);if(n.length>0){var r=i.getParaInfo(n.pop());return e("log","\u83b7\u53d6group--\u300b",r," at util/webrtc.js:13881"),i._logger.log(JSON.stringify(r)),Promise.resolve(r)}}))}},{key:"getParaInfo",value:function(e){var t={id:null,name:null,type:null,level:null,parentnum:null,groupNumber:null,membercount:null,user:[]};return t.id=e.Groupid,t.name=e.groupname,t.type=e.type,t.level=e.glevel,t.parentnum=e.parentnum,t.groupNumber=e.groupnum,t.membercount=e.membercount,e.user.forEach((function(e){var i={userid:null,username:null,type:null,subtype:null,othernumber:null,othername:null};i.userid=e.userid,i.username=e.username,i.type=e.type,i.userid=e.userid,i.subtype=e.subtype,i.othernumber=e.othernumber,i.othername=e.othername,t.user.push(i)})),t}},{key:"getLocalVideos",value:function(){var e=this,t=new D.TreeT;return t.type=7,t.userId=this._caller,this._dispatcherPrx.IFCReqGetLocalUserByType(this._myid,t).then((function(t){e._logger.warn("getlocalVideo: "+JSON.stringify(t));var i=new Array;return t.roots.forEach((function(t){var n=e.getMonitorsByGroup(t);n.forEach((function(e){var t=!1;i.forEach((function(i){i.number==e.number&&(t=!0)})),t||i.push(e)}))})),Promise.resolve(i)}))}},{key:"get28281Groups",value:function(){var e=this,t=new D.GetFXDeviceT;return t.getdetail=!1,this._dispatcherPrx.IFCReqGet28181Devices(this._myid,t).then((function(t){var i=new Array;return e._logger.log(JSON.stringify(t)),t.forEach((function(t){var n=Array();t.Orgs.forEach((function(t){var i=e.convertICE28281Group(t);n.push(i)}));var r={id:t.id,name:t.name,subGroups:n};i.push(r),e._logger.log(t.name)})),Promise.resolve(i)}))}},{key:"getMonitors28281ByGroupId",value:function(e,t){var i=this,n=new D.GetFXDeviceDetailT;return n.fxDeviceid=e,n.orgid=t,this._dispatcherPrx.IFCReqGet28181DeviceDetail(this._myid,n).then((function(e){var t=Array();return e.forEach((function(e){e.Orgs.forEach((function(e){e.Numbers.forEach((function(e){var i={number:e.num,name:e.name,state:e.status};t.push(i)}))}))})),i._logger.log(JSON.stringify(e)),Promise.resolve(t)}))}},{key:"getMonitorsByGroup",value:function(e){var t=this,i=new Array;return e.user.forEach((function(e){var t={number:e.userid,name:e.username};i.push(t)})),e.group.forEach((function(e){var n=t.getMonitorsByGroup(e);n.forEach((function(e){i.push(e)}))})),i}},{key:"convertICEGroup",value:function(e){var i=this,n=new Array;e.group.forEach((function(e){var t=i.convertICEGroup(e);n.push(t)}));var r=new Array;e.user.forEach((function(e){var n=new ot;n.id=e.userid,n.name=e.username,n.number=e.userid;var s=o.getUserTypeByIceCode(e.type);n.type=s;var a=t.RegistState.Unregisted;switch(e.rstate){case D.RegisterState.RegisterStateLogin:a=t.RegistState.Registed;break;case D.RegisterState.RegisterStateLogout:a=t.RegistState.Unregisted;break;default:break}var c=o.isAlwaysOnlineByICeUserType(e.type);c&&(a=t.RegistState.Registed),n.state.registState=a,n.state.callState.otherNumber=e.othernumber,n.state.callState.otherName=e.othername,n.state.callState.number=e.username,n.state.callState.state=o.convertIceCallState(e.cstate.value.toString()),r.push(n),i._logger.log(n.number)}));var s=Xe.Normal;e.type==D.GroupType.GroupTypeIntercomgroup&&(s=Xe.PTT);var a={id:e.id.toString(),name:e.groupname,groupNumber:e.groupnum,level:e.level,type:s,subGroups:n,subUser:r};return this._logger.log(a.name),a}},{key:"convertICE28281Group",value:function(e){var t=this,i=new Array;e.Orgs.forEach((function(e){var n=t.convertICE28281Group(e);i.push(n)}));new Array;var n={id:e.id.toString(),name:e.name,subGroups:i};return n}},{key:"makecall",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.makecall1(rt.getInstance().currentNumber,e,t,i)}},{key:"makecallByLeftPhone",value:function(e,t){return this.makecall1(rt.getInstance().leftPhone,e,t)}},{key:"makecallByRightPhone",value:function(e,t){return this.makecall1(rt.getInstance().rightPhone,e,t)}},{key:"makecall1",value:function(e,t,i){var n=this;return navigator.mediaDevices.enumerateDevices().then((function(r){r.forEach((function(e){"videoinput"==e.kind&&e.label}));var s=new D.CreateConfT;s.caller=e;var a=new D.CalleeT(t),o=new Array;return s.member=o,s.member.push(a),s.ctype=D.CallType.CallTypeSingle2,s.isVideo=i?D.MediaType.MediaTypeVideo:D.MediaType.MediaTypeAudio,n._dispatcherPrx.IFCReqCreateConf(n._myid,s).then((function(e){return n._logger.log("IFCReqCreateConf: "+JSON.stringify(e)),Promise.resolve(e.cid)})).catch((function(e){return Promise.reject(e)}))}))}},{key:"createConference",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._caller,n=new D.CreateConfT;n.caller=i;var r=new Array;return e.forEach((function(e){var t=new D.CalleeT(e);r.push(t)})),n.member=r,n.ctype=D.CallType.CallTypeTemporary,n.isVideo=t?D.MediaType.MediaTypeVideo:D.MediaType.MediaTypeAudio,n.sessname="MT"+Date.parse((new Date).toString()),n.sessnum=this._caller+Date.parse((new Date).toString()),this._dispatcherPrx.IFCReqCreateConf(this._myid,n)}},{key:"startTempIntercom",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._caller,i=new D.CreateConfT;i.caller=t;var n=new Array;return e.forEach((function(e){var t=new D.CalleeT(e);n.push(t)})),i.member=n,i.ctype=D.CallType.CallTypeTmpintercom,i.isVideo=D.MediaType.MediaTypeAudio,i.sessname="tmpIntercom"+Date.parse((new Date).toString()),i.sessnum=this._caller+Date.parse((new Date).toString()),this._dispatcherPrx.IFCReqCreateConf(this._myid,i)}},{key:"startBroadcast",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._caller,i=new D.CreateConfT;i.caller=t;var n=new Array;return e.forEach((function(e){var t=new D.CalleeT(e);n.push(t)})),i.member=n,i.ctype=D.CallType.CallTypeBroadcast,i.sessname="broadcast"+Date.parse((new Date).toString()),i.sessnum=this._caller+Date.parse((new Date).toString()),this._dispatcherPrx.IFCReqCreateConf(this._myid,i)}},{key:"applySpeak",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._caller,i=new D.PttReqRightT;return i.caller=t,i.groupnum=e,i.messageinfo="req:ptt_request_speak_right",this._dispatcherPrx.IFCReqApplyRight(this._myid,i)}},{key:"releaseSpeak",value:function(e){var t=new D.PttReqRightT;return t.caller=this._caller,t.groupnum=e,t.messageinfo="req:ptt_cancle_speak_right",this._dispatcherPrx.IFCReqApplyRight(this._myid,t)}},{key:"conferenceAddMember",value:function(e,t){try{var i=new D.AddMemberT;return i.cid=e,i.number=t,i.astype=D.AnswerType.AnswerTypeMan,this._dispatcherPrx.IFCReqAddMember(this._myid,i)}catch(n){this._logger.log(n)}}},{key:"conferenceDeleteMember",value:function(){var e=(0,d.default)(s.default.mark((function e(t,i){var n;return s.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,n=new D.DelMemberT,n.cid=t,n.number=i,e.next=6,this._dispatcherPrx.IFCReqDelMember(this._myid,n);case 6:e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),this._logger.log(e.t0);case 11:return e.prev=11,e.finish(11);case 13:case"end":return e.stop()}}),e,this,[[0,8,11,13]])})));return function(t,i){return e.apply(this,arguments)}}()},{key:"endConference",value:function(e){var t=new D.ForceEndConfeT;return t.cid=e,this._dispatcherPrx.IFCReqEndConf(this._myid,t)}},{key:"conferenceGetVideo",value:function(e,t){try{var i='{"sid":"bob","cid":"'+e+'","recv_id":"'+this._caller+'","ip":"","port":"","source_id":"'+t+'","codec":"","stream":"","framerate":"","agentid":"'+this._caller+'"}';return this._dispatcherPrx.IFCReqWebrtcGetVideo(this._myid,i)}catch(n){this._logger.log(n.toString())}}},{key:"conferenceGetVideoMCU",value:function(e,t){try{var i='{"sid":"bob","cid":"'+e+'","recv_id":"'+this._caller+'","ip":"","port":"","source_id":"'+t+'","codec":"","stream":"","framerate":"","agentid":"'+this._caller+'","single_video":"1"}';return this._dispatcherPrx.IFCReqWebrtcGetVideo(this._myid,i)}catch(n){this._logger.log(n.toString())}}},{key:"conferencePushMember",value:function(e,t){var i=new D.PushVideoT;return i.cid=e,i.employeeid=t,i.IsPush=D.PushVideoType.PushVideoTypePush,this._dispatcherPrx.IFCReqPushVideo(this._myid,i)}},{key:"conferenceunPushMember",value:function(e,t){var i=new D.PushVideoT;return i.cid=e,i.employeeid=t,i.IsPush=D.PushVideoType.PushVideoTypeUnpush,this._dispatcherPrx.IFCReqPushVideo(this._myid,i)}},{key:"startAttended",value:function(e){var t={nightnumber:e,starttime:"",endtime:""};return this._dispatcherPrx.IFCReqSetNightServiceByJson(this._myid,JSON.stringify(t))}},{key:"getUnattendedState",value:function(){var e={number:rt.getInstance().number};return this._dispatcherPrx.IFCReqGetUserDetailByJson(this._myid,JSON.stringify(e)).then((function(e){var t=JSON.parse(e),i=t.nightnumber;return Promise.resolve(i)})).catch((function(e){return null==e&&(e={error:"unkown"}),Promise.reject(e)}))}},{key:"bindPhoneHandle",value:function(e,t){var i=new Array,n=new D.BindTerminalT;n.number=this._caller,i.push(n);var r=new D.BindTerminalT;r.number=e,i.push(r);var s=new D.BindTerminalT;return s.number=t,i.push(s),this._dispatcherPrx.IFCReqBindNumber(this._myid,i)}},{key:"switch",value:function(e,t,i){var n=new D.CallCommonT;return n.cid=e,n.caller=t,n.called=i,this._dispatcherPrx.IFCReqCallTransfer(this._myid,n)}},{key:"SubsituteCall",value:function(e,t){var i=new D.CallCommonT;return i.cid=t,i.caller=this._caller,i.called=e,this._dispatcherPrx.IFCReqCallPickup(this._myid,i)}},{key:"transferVideo",value:function(e,t,i){var n=new D.TransferVideoT;n.srccid=e,n.srcnumber=t;var r=new Array;return i.forEach((function(e){var t=new D.OrderCalledT;t.called=e;var i=new D.OrderDetailT;i.number=e,i.index=1,i.ringtime=30,t.details=new Array,t.details.push(i),r.push(t)})),n.calleds=r,this._dispatcherPrx.IFCReqTransferVideo(this._myid,n)}},{key:"getUserDetail",value:function(){var e=new D.TerminalDetailT(this._caller);return this._dispatcherPrx.IFCReqGetUserDetail(this._myid,e)}},{key:"getUserDetailByNumber",value:function(e){var t=new D.TerminalDetailT(e);return this._dispatcherPrx.IFCReqGetUserDetail(this._myid,t)}},{key:"getUserDetailByNumber1",value:function(e){var t={number:e};return this._dispatcherPrx.IFCReqGetUserDetailByJson(this._myid,JSON.stringify(t))}},{key:"getConfMembers",value:function(e){var t=new D.AllCallMemberT;return t.cid=e,this._dispatcherPrx.IFCReqGetAllMember1(this._myid,t)}},{key:"getConfMembers1",value:function(e){return this._dispatcherPrx.IFCReqGetAllMember2(this._myid,e)}},{key:"forceInterposeCall",value:function(e,t){var i=new D.CallCommonT;return i.called=t,i.caller=rt.getInstance().currentNumber,i.cid=e,this._dispatcherPrx.IFCReqForceInsert(this._myid,i)}},{key:"forceRemoveOther",value:function(e,t){var i=new D.CallCommonT;return i.called=t,i.caller=rt.getInstance().currentNumber,i.cid=e,this._dispatcherPrx.IFCReqForceDemolition(this._myid,i)}},{key:"forceRemoveCall",value:function(e,t){var i=new D.CallCommonT;return i.called=t,i.caller=this._caller,i.cid=e,this._dispatcherPrx.IFCReqForceBreak(this._myid,i)}},{key:"MonitorCall",value:function(e,t){var i=new D.CallCommonT;return i.called=t,i.caller=this._caller,i.cid=e,this._dispatcherPrx.IFCReqMonitor(this._myid,i)}},{key:"GetUserSessions",value:function(e){var t=new D.GetAllSession1T;return t.employeeid=e,t.cType=D.CallType.CallTypeNone,this._dispatcherPrx.IFCReqGetAllSessions2(this._myid,t)}},{key:"GetUserSessions1",value:function(e,t){var i=new D.GetAllSession1T;return i.employeeid=e,i.cType=D.CallType.valueOf(t),this._dispatcherPrx.IFCReqGetAllSessions2(this._myid,i)}},{key:"allowSpeak",value:function(e,t,i){var n=new D.SpeakerT;n.employeeid=t,n.cid=e;var r=D.SpeakType.SpeakTypeUnmute;return r=i?D.SpeakType.SpeakTypeUnmute:D.SpeakType.SpeakTypeMute,n.speakertypea=r,this._dispatcherPrx.IFCReqForbiddenTalk(this._myid,n)}},{key:"allowListen",value:function(e,t,i){var n=new D.HearT;n.number=t,n.cid=e;var r=D.HearType.HearTypeUnmute;return r=i?D.HearType.HearTypeUnmute:D.HearType.HearTypeMute,n.hear=r,this._dispatcherPrx.IFCReqForbiddenHear(this._myid,n)}},{key:"muteLocalMic",value:function(e,t,i){var n=new D.MuteLocalTrackT;return n.cid=e,n.number=t,n.mute=i,this._dispatcherPrx.IFCReqMuteLocalMic(this._myid,n)}},{key:"muteLocalCamera",value:function(e,t,i){var n=new D.MuteLocalTrackT;return n.cid=e,n.number=t,n.mute=i,this._dispatcherPrx.IFCReqMuteLocalCamera(this._myid,n)}},{key:"hold",value:function(e){var t=new D.PushCallToQueueT1;return t.cid=e,t.member=this._username,this._dispatcherPrx.IFCReqPushCallToQueue2(this._myid,t)}},{key:"unHold",value:function(e){var t=new D.PullQueueCallT;return t.cid=e,t.caller=this._caller,this._dispatcherPrx.IFCReqPullCallFromQueue(this._myid,t)}},{key:"PTZMoveY",value:function(e,t,i,n){return this.PTZMove(e,D.VideoControlType.VideoControlTypeY,t,i,n)}},{key:"PTZMoveX",value:function(e,t,i,n){return this.PTZMove(e,D.VideoControlType.VideoControlTypeX,t,i,n)}},{key:"PTZZoom",value:function(e,t,i,n){return this.PTZMove(e,D.VideoControlType.VideoControlTypeZoom,t,i,n)}},{key:"PTZMoveLR",value:function(e,t,i,n){return this.PTZMove(e,D.VideoControlType.VideoControlTypeLR,t,i,n)}},{key:"PTZFocus",value:function(e,t,i,n){return this.PTZMove(e,D.VideoControlType.VideoControlTypeFocus,t,i,n)}},{key:"PTZMove",value:function(e,t,i,n,r){var s=new D.CameraNumberControl;return s.number=e,s.TimeOut=r,s.IsStart=n,s.step=i,s.ctype=t,this._dispatcherPrx.IFCReqCameraControlByNumber(this._myid,s)}},{key:"SipPhoneVideoBug",value:function(e,t,i){var n=new D.SipPhoneVideoBugT;n.called=e,n.caller=this._caller;var r="*7*";return r+=t?"1":"2",r+="0",r+=i?"1":"2",n.codec=r,this._dispatcherPrx.IFCReqPhoneVideoBug(this._myid,n)}},{key:"getDecoderDevices",value:function(){return this._dispatcherPrx.IFCReqGetDecoderDevice(this._myid)}},{key:"getDecoderDeviceConfig",value:function(e){var t=new D.GetDisplayCfg;return t.Decoderid=e,this._dispatcherPrx.IFCReqGetDisplayConfig2(this._myid,t)}},{key:"getDecoderChannelState",value:function(e,t){var i=new D.opChannelStatus;return i.Decoderid=e,i.Channel=t,this._dispatcherPrx.IFCReqGetChannelDecodeState(this._myid,i)}},{key:"setDecoderWindows",value:function(e,t){return this._dispatcherPrx.IFCReqSetWindows(this._myid,e,t)}},{key:"startDecoderWall",value:function(e,t,i,n){var r=new D.opDecoderInfo;return r.Decoderid=e,r.Channel=t,r.disNumber=n,r.cid=i,this._dispatcherPrx.IFCReqStartDecode(this._myid,r)}},{key:"stopDecoderWall",value:function(e,t){var i=new D.opDecoderByVideoInfo;return i.Decoderid=e,i.Channel=t,i.VideoChannel="",i.VideoIP="",i.VideoPort="1",i.VideoPwd="",i.VideoType=D.emVideoDeviceType.VDTDHIPC,i.VideoUser="",this._dispatcherPrx.IFCReqStopDecodeByVideoInfo(this._myid,i)}},{key:"uploadGISInfo",value:function(e,t,i){var n=new D.GisInfoT;return n.latitude=e,n.longitude=t,n.grmc=i,n.time="",this._dispatcherPrx.IFCReqReportGisInfo(this._myid,n)}},{key:"setGisTrace",value:function(e){var t=new Array;return e.forEach((function(e){var i=new D.GisTraceT;i.dstid=e,i.space="",i.flag=D.GisTraceType.GisTraceTypeSub,t.push(i)})),this._dispatcherPrx.IFCReqTraceGisInfo(this._myid,t)}},{key:"cancelGisTrace",value:function(e){var t=new Array;return e.forEach((function(e){var i=new D.GisTraceT;i.dstid=e,i.space="",i.flag=D.GisTraceType.GisTraceTypeUnsub,t.push(i)})),this._dispatcherPrx.IFCReqTraceGisInfo(this._myid,t)}},{key:"getGisHistory",value:function(e,t,i){var n=new D.GisInfoByTimeT;return n.employeeid=e,n.begin=t,n.end=i,n.type=0,this._dispatcherPrx.IFCReqGetGisInfoByTime2(this._myid,n)}},{key:"getGisHistoryPage",value:function(e,t,i,n,r){var s={employeeid:e,begin:t,end:i,type:0,pagesize:n,pageindex:r};return this._dispatcherPrx.IFCReqGetGisInfoByTimeByJson2(this._myid,JSON.stringify(s))}},{key:"getGisInfoByRectangle",value:function(e,t,i,n,r){var s=new D.GisInfoByRectangleT;return s.a=e,s.b=t,s.c=i,s.d=n,s.type=r,this._dispatcherPrx.IFCReqGetGisInfoByRectangle2(this._myid,s)}},{key:"getGisInfoByEllipse",value:function(e,t,i,n,r){var s=new D.GisInfoByEllipseT;return s.a=e,s.b=t,s.c=i,s.d=n,s.type=r,this._dispatcherPrx.IFCReqGetGisInfoByEllipse2(this._myid,s)}},{key:"getGisPosition",value:function(e){var t=new D.GetPositionT1;return t.employeeid=e,this._dispatcherPrx.IFCReqGetGisInfoByJson(this._myid,t).then((function(e){var t=JSON.parse(e),i=o.isAlwaysOnlineByICeUserType(t[0].type);return i&&(t[0].regstate=1),Promise.resolve(JSON.stringify(t))})).catch((function(e){return Promise.reject(e)}))}},{key:"SendMsg",value:function(e,t){try{var i=new D.MessageT;return i.message.body=e,i.receiver=new Array,t.forEach((function(e){i.receiver.push(e)})),this._dispatcherPrx.IFCReqMsg(this._myid,i)}catch(n){return this._logger.log("IceConn error:"+n),Promise.reject(n)}}},{key:"getOfflineMsg",value:function(e){var t=new D.GetOldMsgFileT;return t.getnum=e,t.employeeid=this._caller,this._dispatcherPrx.IFCReqGetOldMsgFile(this._myid,t)}},{key:"SetFileRecieved",value:function(e,t){var i=new D.FileReceivedT;return i.fid=e,i.employeeid=t,this._dispatcherPrx.IFCReqFileReceived(this._myid,i)}},{key:"SetMessageRecevied",value:function(e,t){var i=new D.MessageReceivedT;return i.msgid=e,i.employeeid=t,this._dispatcherPrx.IFCReqMsgReceived(this._myid,i)}},{key:"SetUploadFileResult",value:function(e,t){var i=new D.UploadEventT;return i.fid=e,i.state=D.FileState.valueOf(t),this._dispatcherPrx.IFCNotifyUploadFileEvt(this._myid,i)}},{key:"ApplyUploadFile",value:function(e,t,i){var n=new D.ApplyUploadT;return n.file.fname=e,n.file.ftype=D.FileType.valueOf(i),n.recv=t,this._dispatcherPrx.IFCReqapPlayUploadFile(this._myid,n)}},{key:"getPlanInfo",value:function(){return this._dispatcherPrx.IFCReqSelectPreplan2(this._myid,"")}},{key:"startPlan",value:function(e){var t=new D.PrePlanStartT;return t.planId=e,t.caller=rt.getInstance().number,this._dispatcherPrx.IFCReqStartPreplan(this._myid,t)}},{key:"createShecduleConf",value:function(e,t,i,n){var r=1;t&&(r=2);var s="";e.forEach((function(e){""!=s&&(s+=","),s+=e}));var a={meeting_name:n,cid:"",media_type:r,start_time:this.dateFormat(i,"yyyy-MM-dd hh:mm:ss"),call_type:5,dnsprefix:"",members:s},o=JSON.stringify(a);return this._logger.warn("schedule members: "+o),this._dispatcherPrx.IFCReqCreateScheduleConf(this._myid,o)}},{key:"fixScheduleConf",value:function(e,t,i,n,r){var s=1;i&&(s=2);var a="";t.forEach((function(e){""!=a&&(a+=","),a+=e}));var o={meeting_name:r,cid:e,media_type:s,start_time:this.dateFormat(n,"yyyy-MM-dd hh:mm:ss"),call_type:5,dnsprefix:"",members:a},c=JSON.stringify(o);return this._logger.warn("schedule members: "+c),this._dispatcherPrx.IFCReqFixScheduleConf(this._myid,c)}},{key:"getScheduleConf",value:function(){var e={employeeID:rt.getInstance().number};return this._dispatcherPrx.IFCReqGetScheduleConf(this._myid,JSON.stringify(e))}},{key:"deleteScheduleConf",value:function(e){var t={cid:e};return this._dispatcherPrx.IFCReqDeleteScheduleConf(this._myid,JSON.stringify(t))}},{key:"dateFormat",value:function(e,t){void 0==e&&void 0==t?(e=new Date,t="yyyy-MM-dd HH:mm:ss"):"string"==typeof e?(t=e,e=new Date):void 0===t&&(t="yyyy-MM-dd HH:mm:ss");var i={y:e.getFullYear()+"",M:e.getMonth()+1+"",d:e.getDate()+"",H:e.getHours(),m:e.getMinutes()+"",s:e.getSeconds()+"",q:Math.floor((e.getMonth()+3)/3)+"",f:e.getMilliseconds()+""};i["h"]=i["H"]+"",i["H"]+="";for(var n="yMdHhmsqf",r="",s="",a=0,o=0;a<n.length;a++)if(o=t.indexOf(n[a]),!(o<0)){for(r="";o<t.length;o++){if(t[o]!=n[a])break;r+=n[a]}if(r.length>0){if(r.length==i[n[a]].length)s=i[n[a]];else if(r.length>i[n[a]].length)s="f"==n[a]?i[n[a]]+this.charString("0",r.length-i[n[a]].length):this.charString("0",r.length-i[n[a]].length)+i[n[a]];else switch(n[a]){case"y":s=i[n[a]].substr(i[n[a]].length-r.length);break;case"f":s=i[n[a]].substr(0,r.length);break;default:s=i[n[a]];break}t=t.replace(r,s)}}return t}},{key:"charString",value:function(e,t){var i="";while(t--)i+=e;return i}},{key:"hangup",value:function(e){arguments.length>1&&void 0!==arguments[1]||rt.getInstance().currentNumber;var t=new D.HangupT;return t.cid=e,this._dispatcherPrx.IFCReqHangup(this._myid,t)}},{key:"hangupSession",value:function(e){var t=new D.HangupT;return t.cid=e,this._dispatcherPrx.IFCReqHangup(this._myid,t)}},{key:"requestSendVideoByJson",value:function(e){var t=this,i={cid:e,sid:"",employeeid:rt.getInstance().number,ip:"255.255.255.255",port:"",codec:"",stream:"",framerate:"",agentid:"",proto:"sip"},n=JSON.stringify(i);return this._logger.warn(" requestSendVideoByJson para: "+n),this._dispatcherPrx.IFCReqSendVideoByJson(this._myid,n).then((function(e){t._logger.warn("IFCReqSendVideoByJson success: "+e)})).catch((function(e){t._logger.error("IFCReqSendVideoByJson fail: "+JSON.stringify(e))}))}},{key:"getSmsGis",value:function(e){return this._dispatcherPrx.IFCReqGetSmsGis(this._myid,e)}},{key:"getSmsGisRepeat",value:function(e,t){return this._dispatcherPrx.IFCReqGetSmsGisRepeat(this._myid,e,t.toString())}},{key:"negotiatedTransfer",value:function(e,t,i,n){var r=new D.NegoTransferT;return r.cid1=e,r.cid2=t,r.call1=i,r.call2=n,r.number=rt.getInstance().currentNumber,this._dispatcherPrx.IFCReqNegoTransfer(this._myid,r)}},{key:"getVersion",value:function(){var e=new D.GetVersionT;return this._dispatcherPrx.IFCReqGetVersion(this._myid,e)}},{key:"getCompanyName",value:function(){return this._dispatcherPrx.IFCReqGetConfigByKey(this._myid,"CompanyName")}},{key:"getKeyframe",value:function(e,t){var i=new D.GetKeyFrameT;return i.cid=e,i.employeeid=t,this._dispatcherPrx.IFCReqGetKeyFrame(this._myid,i)}},{key:"getAllRegistedUsers",value:function(){var e=this;return this.getRootGroups().then((function(t){var i="";return t.forEach((function(e){(function e(t){i=""==i?t.groupNumber:i+","+t.groupNumber,null!=t.subGroups&&t.subGroups.length>0&&t.subGroups.forEach((function(t){e(t)}))})(e)})),e._dispatcherPrx.IFCReqAllUserRegState(e._myid,i)}))}},{key:"getAllRegistedUsersById",value:function(e){var t="";return e.forEach((function(e){""!=t&&(t+=","),t+=e})),this._dispatcherPrx.IFCReqAllUserRegState(this._myid,t)}},{key:"getLoginState",value:function(e){return this._dispatcherPrx.IFCReqLoginState(this._myid,e)}},{key:"forceKickOut",value:function(e){var t=new D.ForceKickOutT;return t.Employeeid=e,t.LoginUUID=rt.getInstance().uuid,this._dispatcherPrx.IFCReqForceLogout(this._myid,t)}},{key:"IFCReqCheckSessionIsRuning",value:function(e){var t={cid:e};return this._dispatcherPrx.IFCReqCheckSessionIsRuning(this._myid,JSON.stringify(t))}},{key:"IFCReqCreateConfByJson",value:function(e){return this._dispatcherPrx.IFCReqCreateConfByJson(this._myid,e)}},{key:"startFileBroadcast",value:function(e,t,i){var n="";i.forEach((function(e){""!=n&&(n+=","),n+=e}));var r={caller:this._username,fid:e,playCount:t,members:n};return this._dispatcherPrx.IFCReqCreateFileBroadcastConf(this._myid,JSON.stringify(r))}},{key:"getFileBroadcastState",value:function(e){var t={EmployeeID:e};return this._dispatcherPrx.IFCReqGetFileBroadcastState(this._myid,JSON.stringify(t))}},{key:"PushStartCallAudio",value:function(e,t,i){var n={cid:e,url:t,force_acodec:i};return this._dispatcherPrx.IFCReqPushStartCallAudio(this._myid,JSON.stringify(n))}},{key:"PushStopCallAudio",value:function(e){var t={cid:e};return this._dispatcherPrx.IFCReqPushStopCallAudio(this._myid,JSON.stringify(t))}},{key:"ReqRecordScreen",value:function(e){var t={cid:e};return this._dispatcherPrx.IFCReqRecordScreenByWebrtc(this._myid,JSON.stringify(t))}},{key:"reqChangePasswd",value:function(e,t,i){var n=new D.ChangePassWordT;return n.Employeeid=e,n.oldPassWord=t,n.newPassWord=i,this._dispatcherPrx.IFCReqChangePasswd(this._myid,n)}},{key:"reqChangeVideoCodec",value:function(e,t){var i={cid:e,numbers:t};return this._dispatcherPrx.IFCReqChangeVideoCodec(this._myid,JSON.stringify(i))}},{key:"reqStartShareScreen",value:function(e){var t={cid:e};return this._dispatcherPrx.IFCReqStartShareScreen(this._myid,JSON.stringify(t))}},{key:"reqEndShareScreen",value:function(e){var t={cid:e};return this._dispatcherPrx.IFCReqEndShareScreen(this._myid,JSON.stringify(t))}}],[{key:"getInstance",value:function(){return null==o.instance&&(o.instance=new o),o.instance}},{key:"convertIceCallState",value:function(e){var t=it.None;switch(e){case"1":t=it.Init;break;case"2":t=it.Normal;break;case"3":t=it.Callout;break;case"4":t=it.Incoming;break;case"5":t=it.Ringing;break;case"6":t=it.Connect;break;case"7":t=it.Hold;break;case"8":t=it.Busy;break;case"9":t=it.Offhook;break;case"10":t=it.Release;break;case"11":t=it.Unspeak;break;case"12":t=it.Speak;break;case"13":t=it.Queue;break;case"14":t=it.Unhold;break;case"15":t=it.Zombie;break;default:break}return t}},{key:"convertIceCallState1",value:function(e){var t=r.None;switch(e){case"1":t=r.Init;break;case"2":t=r.Normal;break;case"3":t=r.Callout;break;case"4":t=r.Incoming;break;case"5":t=r.Ringing;break;case"6":t=r.Connect;break;case"7":t=r.Hold;break;case"10":t=r.Release;break;case"13":t=r.Hold;break;case"14":t=r.Unhold;break;default:break}return t}},{key:"convertIceCallType",value:function(e){var t=nt.None;switch(e){case"1":t=nt.Single;break;case"2":t=nt.Group;break;case"3":t=nt.Report;break;case"4":t=nt.Broadcast;break;case"5":t=nt.Conference;break;case"6":t=nt.Interpose;break;case"7":t=nt.Interpose;break;case"8":t=nt.Monitor;break;case"9":t=nt.Intercom;break;case"10":t=nt.Switch;break;case"11":t=nt.Urgent;break;case"12":t=nt.Single;break;case"13":t=nt.Tempintercom;break;case"14":t=nt.VideoBug;break;case"15":t=nt.MCUMetting;break;case"16":t=nt.SOS;break;case"17":t=nt.TransferVideo;break;case"18":t=nt.TransferVideoToMCU;break;default:break}return t}},{key:"getUserTypeByIceCode",value:function(e){var t=et.Other;switch(e){case 0:t=et.Dispatcher;break;case 1:break;case 2:t=et.SIP;break;case 3:break;case 7:t=et.Monitor;break;case 5:break;case 6:t=et.APP;break;case 8:break;case 110:t=et.OutlineMonitorPhone;break;case 111:t=et.OutlineTelePhone;break;case 20:t=et.TianTong;break;case 9:t=et.Device323;break;case 17:t=et.Wade;break;case 10:t=et.StationGroup;break;case 14:t=et.RelayGateway;break;case 18:t=et.OutlineCar;break;case 21:t=et.MeshDevice;break;default:break}return t}},{key:"isAlwaysOnlineByICeUserType",value:function(e){var t=!1;e>=100&&(t=!0);var i=o.getUserTypeByIceCode(e);switch(i){case et.OutlineMonitorPhone:case et.OutlineTelePhone:case et.Wade:case et.StationGroup:case et.Device323:case et.RelayGateway:case et.Monitor:t=!0;break}return t}}]),o}(y);ut.instance=null;var lt;function dt(e){return e.sdp=function(e,t){var i=new RegExp("m="+t+".*$","gm"),n=new RegExp("^a=group:.*$","gm");if(i.test(e)){var r;e=e.split(/^m=/gm).filter((function(e){if(e.substr(0,t.length)===t){if(r=e.match(/^a=mid:.*$/gm),r){var i=r[0].match(/:.+$/g);i&&(r=i[0].substr(1))}return!1}return!0})).join("m=");var s=e.match(n);if(s&&1===s.length){var a=s[0],o=new RegExp(" *"+r+"[^ ]*","g");a=a.replace(o,""),e=e.split(n).join(a)}}return e}(e.sdp||"","video"),Promise.resolve(e)}(function(e){e.ACK="ACK",e.BYE="BYE",e.CANCEL="CANCEL",e.INFO="INFO",e.INVITE="INVITE",e.MESSAGE="MESSAGE",e.NOTIFY="NOTIFY",e.OPTIONS="OPTIONS",e.REGISTER="REGISTER",e.UPDATE="UPDATE",e.SUBSCRIBE="SUBSCRIBE",e.PUBLISH="PUBLISH",e.REFER="REFER",e.PRACK="PRACK"})(lt||(lt={}));var ht=function(){function e(t){for(var i in(0,h.default)(this,e),this.parameters={},t)t.hasOwnProperty(i)&&this.setParam(i,t[i])}return(0,f.default)(e,[{key:"setParam",value:function(e,t){e&&(this.parameters[e.toLowerCase()]="undefined"===typeof t||null===t?null:t.toString())}},{key:"getParam",value:function(e){if(e)return this.parameters[e.toLowerCase()]}},{key:"hasParam",value:function(e){return!!e&&!!this.parameters.hasOwnProperty(e.toLowerCase())}},{key:"deleteParam",value:function(e){if(e=e.toLowerCase(),this.parameters.hasOwnProperty(e)){var t=this.parameters[e];return delete this.parameters[e],t}}},{key:"clearParams",value:function(){this.parameters={}}}]),e}(),ft=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){var s;return(0,h.default)(this,i),s=t.call(this,r),s.uri=e,s._displayName=n,s}return(0,f.default)(i,[{key:"friendlyName",get:function(){return this.displayName||this.uri.aor}},{key:"displayName",get:function(){return this._displayName},set:function(e){this._displayName=e}},{key:"clone",value:function(){return new i(this.uri.clone(),this._displayName,JSON.parse(JSON.stringify(this.parameters)))}},{key:"toString",value:function(){var e=this.displayName||"0"===this.displayName?'"'+this.displayName+'" ':"";for(var t in e+="<"+this.uri.toString()+">",this.parameters)this.parameters.hasOwnProperty(t)&&(e+=";"+t,null!==this.parameters[t]&&(e+="="+this.parameters[t]));return e}}]),i}(ht),gt=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r,s,a,o){var c;if((0,h.default)(this,i),c=t.call(this,a),c.headers={},!r)throw new TypeError('missing or invalid "host" parameter');for(var u in e=e||"sip",o)o.hasOwnProperty(u)&&c.setHeader(u,o[u]);return c.raw={scheme:e,user:n,host:r,port:s},c.normal={scheme:e.toLowerCase(),user:n,host:r.toLowerCase(),port:s},c}return(0,f.default)(i,[{key:"scheme",get:function(){return this.normal.scheme},set:function(e){this.raw.scheme=e,this.normal.scheme=e.toLowerCase()}},{key:"user",get:function(){return this.normal.user},set:function(e){this.normal.user=this.raw.user=e}},{key:"host",get:function(){return this.normal.host},set:function(e){this.raw.host=e,this.normal.host=e.toLowerCase()}},{key:"aor",get:function(){return this.normal.user+"@"+this.normal.host}},{key:"port",get:function(){return this.normal.port},set:function(e){this.normal.port=this.raw.port=e}},{key:"setHeader",value:function(e,t){this.headers[this.headerize(e)]=t instanceof Array?t:[t]}},{key:"getHeader",value:function(e){if(e)return this.headers[this.headerize(e)]}},{key:"hasHeader",value:function(e){return!!e&&!!this.headers.hasOwnProperty(this.headerize(e))}},{key:"deleteHeader",value:function(e){if(e=this.headerize(e),this.headers.hasOwnProperty(e)){var t=this.headers[e];return delete this.headers[e],t}}},{key:"clearHeaders",value:function(){this.headers={}}},{key:"clone",value:function(){return new i(this._raw.scheme,this._raw.user||"",this._raw.host,this._raw.port,JSON.parse(JSON.stringify(this.parameters)),JSON.parse(JSON.stringify(this.headers)))}},{key:"toRaw",value:function(){return this._toString(this._raw)}},{key:"toString",value:function(){return this._toString(this._normal)}},{key:"_normal",get:function(){return this.normal}},{key:"_raw",get:function(){return this.raw}},{key:"_toString",value:function(e){var t=e.scheme+":";for(var i in e.scheme.toLowerCase().match("^sips?$")||(t+="//"),e.user&&(t+=this.escapeUser(e.user)+"@"),t+=e.host,(e.port||0===e.port)&&(t+=":"+e.port),this.parameters)this.parameters.hasOwnProperty(i)&&(t+=";"+i,null!==this.parameters[i]&&(t+="="+this.parameters[i]));var n=[];for(var r in this.headers)if(this.headers.hasOwnProperty(r))for(var s in this.headers[r])this.headers[r].hasOwnProperty(s)&&n.push(r+"="+this.headers[r][s]);return n.length>0&&(t+="?"+n.join("&")),t}},{key:"escapeUser",value:function(e){var t;try{t=decodeURIComponent(e)}catch(i){throw i}return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%2B/gi,"+").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}},{key:"headerize",value:function(e){for(var t={"Call-Id":"Call-ID",Cseq:"CSeq","Min-Se":"Min-SE",Rack:"RAck",Rseq:"RSeq","Www-Authenticate":"WWW-Authenticate"},i=e.toLowerCase().replace(/_/g,"-").split("-"),n=i.length,r="",s=0;s<n;s++)0!==s&&(r+="-"),r+=i[s].charAt(0).toUpperCase()+i[s].substring(1);return t[r]&&(r=t[r]),r}}]),i}(ht),pt=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r,s){var a;return(0,h.default)(this,i),a=t.call(this),a.message=e,a.expected=n,a.found=r,a.location=s,a.name="SyntaxError","function"===typeof Error.captureStackTrace&&Error.captureStackTrace((0,u.default)(a),i),a}return(0,f.default)(i,null,[{key:"buildMessage",value:function(e,t){function i(e){return e.charCodeAt(0).toString(16).toUpperCase()}function n(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function r(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function s(e){switch(e.type){case"literal":return'"'+n(e.text)+'"';case"class":var t=e.parts.map((function(e){return Array.isArray(e)?r(e[0])+"-"+r(e[1]):r(e)}));return"["+(e.inverted?"^":"")+t+"]";case"any":return"any character";case"end":return"end of input";case"other":return e.description}}return"Expected "+function(e){var t,i,n=e.map(s);if(n.sort(),n.length>0){for(t=1,i=1;t<n.length;t++)n[t-1]!==n[t]&&(n[i]=n[t],i++);n.length=i}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(e)+" but "+function(e){return e?'"'+n(e)+'"':"end of input"}(t)+" found."}}]),i}((0,l.default)(Error));var vt,mt=function(e,t){t=void 0!==t?t:{};var i,n={},r={Contact:119,Name_Addr_Header:156,Record_Route:176,Request_Response:81,SIP_URI:45,Subscription_State:186,Supported:191,Require:182,Via:194,absoluteURI:84,Call_ID:118,Content_Disposition:130,Content_Length:135,Content_Type:136,CSeq:146,displayName:122,Event:149,From:151,host:52,Max_Forwards:154,Min_SE:213,Proxy_Authenticate:157,quoted_string:40,Refer_To:178,Replaces:179,Session_Expires:210,stun_URI:217,To:192,turn_URI:223,uuid:226,WWW_Authenticate:209,challenge:158,sipfrag:230,Referred_By:231},s=119,a=["\r\n",v("\r\n",!1),/^[0-9]/,m([["0","9"]],!1,!1),/^[a-zA-Z]/,m([["a","z"],["A","Z"]],!1,!1),/^[0-9a-fA-F]/,m([["0","9"],["a","f"],["A","F"]],!1,!1),/^[\0-\xFF]/,m([["\0","\xff"]],!1,!1),/^["]/,m(['"'],!1,!1)," ",v(" ",!1),"\t",v("\t",!1),/^[a-zA-Z0-9]/,m([["a","z"],["A","Z"],["0","9"]],!1,!1),";",v(";",!1),"/",v("/",!1),"?",v("?",!1),":",v(":",!1),"@",v("@",!1),"&",v("&",!1),"=",v("=",!1),"+",v("+",!1),"$",v("$",!1),",",v(",",!1),"-",v("-",!1),"_",v("_",!1),".",v(".",!1),"!",v("!",!1),"~",v("~",!1),"*",v("*",!1),"'",v("'",!1),"(",v("(",!1),")",v(")",!1),"%",v("%",!1),function(){return" "},function(){return":"},/^[!-~]/,m([["!","~"]],!1,!1),/^[\x80-\uFFFF]/,m([["\x80","\uffff"]],!1,!1),/^[\x80-\xBF]/,m([["\x80","\xbf"]],!1,!1),/^[a-f]/,m([["a","f"]],!1,!1),"`",v("`",!1),"<",v("<",!1),">",v(">",!1),"\\",v("\\",!1),"[",v("[",!1),"]",v("]",!1),"{",v("{",!1),"}",v("}",!1),function(){return"*"},function(){return"/"},function(){return"="},function(){return"("},function(){return")"},function(){return">"},function(){return"<"},function(){return","},function(){return";"},function(){return":"},function(){return'"'},/^[!-']/,m([["!","'"]],!1,!1),/^[*-[]/,m([["*","["]],!1,!1),/^[\]-~]/,m([["]","~"]],!1,!1),function(e){return e},/^[#-[]/,m([["#","["]],!1,!1),/^[\0-\t]/,m([["\0","\t"]],!1,!1),/^[\x0B-\f]/,m([["\v","\f"]],!1,!1),/^[\x0E-\x7F]/,m([["\x0e","\x7f"]],!1,!1),function(){t=t||{data:{}},t.data.uri=new gt(t.data.scheme,t.data.user,t.data.host,t.data.port),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port},function(){t=t||{data:{}},t.data.uri=new gt(t.data.scheme,t.data.user,t.data.host,t.data.port,t.data.uri_params,t.data.uri_headers),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port,delete t.data.uri_params,"SIP_URI"===t.startRule&&(t.data=t.data.uri)},"sips",v("sips",!0),"sip",v("sip",!0),function(e){t=t||{data:{}},t.data.scheme=e},function(){t=t||{data:{}},t.data.user=decodeURIComponent(g().slice(0,-1))},function(){t=t||{data:{}},t.data.password=g()},function(){return t=t||{data:{}},t.data.host=g(),t.data.host},function(){return t=t||{data:{}},t.data.host_type="domain",g()},/^[a-zA-Z0-9_\-]/,m([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),/^[a-zA-Z0-9\-]/,m([["a","z"],["A","Z"],["0","9"],"-"],!1,!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",g()},"::",v("::",!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",g()},function(){return t=t||{data:{}},t.data.host_type="IPv4",g()},"25",v("25",!1),/^[0-5]/,m([["0","5"]],!1,!1),"2",v("2",!1),/^[0-4]/,m([["0","4"]],!1,!1),"1",v("1",!1),/^[1-9]/,m([["1","9"]],!1,!1),function(e){return t=t||{data:{}},e=parseInt(e.join("")),t.data.port=e,e},"transport=",v("transport=",!0),"udp",v("udp",!0),"tcp",v("tcp",!0),"sctp",v("sctp",!0),"tls",v("tls",!0),function(e){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params["transport"]=e.toLowerCase()},"user=",v("user=",!0),"phone",v("phone",!0),"ip",v("ip",!0),function(e){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params["user"]=e.toLowerCase()},"method=",v("method=",!0),function(e){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params["method"]=e},"ttl=",v("ttl=",!0),function(e){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params["ttl"]=e},"maddr=",v("maddr=",!0),function(e){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params["maddr"]=e},"lr",v("lr",!0),function(){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params["lr"]=void 0},function(e,i){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),i=null===i?void 0:i[1],t.data.uri_params[e.toLowerCase()]=i},function(e,i){e=e.join("").toLowerCase(),i=i.join(""),t=t||{data:{}},t.data.uri_headers||(t.data.uri_headers={}),t.data.uri_headers[e]?t.data.uri_headers[e].push(i):t.data.uri_headers[e]=[i]},function(){t=t||{data:{}},"Refer_To"===t.startRule&&(t.data.uri=new gt(t.data.scheme,t.data.user,t.data.host,t.data.port,t.data.uri_params,t.data.uri_headers),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port,delete t.data.uri_params)},"//",v("//",!1),function(){t=t||{data:{}},t.data.scheme=g()},v("SIP",!0),function(){t=t||{data:{}},t.data.sip_version=g()},"INVITE",v("INVITE",!1),"ACK",v("ACK",!1),"VXACH",v("VXACH",!1),"OPTIONS",v("OPTIONS",!1),"BYE",v("BYE",!1),"CANCEL",v("CANCEL",!1),"REGISTER",v("REGISTER",!1),"SUBSCRIBE",v("SUBSCRIBE",!1),"NOTIFY",v("NOTIFY",!1),"REFER",v("REFER",!1),"PUBLISH",v("PUBLISH",!1),function(){return t=t||{data:{}},t.data.method=g(),t.data.method},function(e){t=t||{data:{}},t.data.status_code=parseInt(e.join(""))},function(){t=t||{data:{}},t.data.reason_phrase=g()},function(){t=t||{data:{}},t.data=g()},function(){var e,i;for(t=t||{data:{}},i=t.data.multi_header.length,e=0;e<i;e++)if(null===t.data.multi_header[e].parsed){t.data=null;break}null!==t.data?t.data=t.data.multi_header:t.data=-1},function(){var e;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{e=new ft(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch(i){e=null}t.data.multi_header.push({position:c,offset:p().start.offset,parsed:e})},function(e){e=g().trim(),'"'===e[0]&&(e=e.substring(1,e.length-1)),t=t||{data:{}},t.data.displayName=e},"q",v("q",!0),function(e){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params["q"]=e},"expires",v("expires",!0),function(e){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params["expires"]=e},function(e){return parseInt(e.join(""))},"0",v("0",!1),function(){return parseFloat(g())},function(e,i){t=t||{data:{}},t.data.params||(t.data.params={}),i=null===i?void 0:i[1],t.data.params[e.toLowerCase()]=i},"render",v("render",!0),"session",v("session",!0),"icon",v("icon",!0),"alert",v("alert",!0),function(){t=t||{data:{}},"Content_Disposition"===t.startRule&&(t.data.type=g().toLowerCase())},"handling",v("handling",!0),"optional",v("optional",!0),"required",v("required",!0),function(e){t=t||{data:{}},t.data=parseInt(e.join(""))},function(){t=t||{data:{}},t.data=g()},"text",v("text",!0),"image",v("image",!0),"audio",v("audio",!0),"video",v("video",!0),"application",v("application",!0),"message",v("message",!0),"multipart",v("multipart",!0),"x-",v("x-",!0),function(e){t=t||{data:{}},t.data.value=parseInt(e.join(""))},function(e){t=t||{data:{}},t.data=e},function(e){t=t||{data:{}},t.data.event=e.toLowerCase()},function(){t=t||{data:{}};var e=t.data.tag;t.data=new ft(t.data.uri,t.data.displayName,t.data.params),e&&t.data.setParam("tag",e)},"tag",v("tag",!0),function(e){t=t||{data:{}},t.data.tag=e},function(e){t=t||{data:{}},t.data=parseInt(e.join(""))},function(e){t=t||{data:{}},t.data=e},function(){t=t||{data:{}},t.data=new ft(t.data.uri,t.data.displayName,t.data.params)},"digest",v("Digest",!0),"realm",v("realm",!0),function(e){t=t||{data:{}},t.data.realm=e},"domain",v("domain",!0),"nonce",v("nonce",!0),function(e){t=t||{data:{}},t.data.nonce=e},"opaque",v("opaque",!0),function(e){t=t||{data:{}},t.data.opaque=e},"stale",v("stale",!0),"true",v("true",!0),function(){t=t||{data:{}},t.data.stale=!0},"false",v("false",!0),function(){t=t||{data:{}},t.data.stale=!1},"algorithm",v("algorithm",!0),"md5",v("MD5",!0),"md5-sess",v("MD5-sess",!0),function(e){t=t||{data:{}},t.data.algorithm=e.toUpperCase()},"qop",v("qop",!0),"auth-int",v("auth-int",!0),"auth",v("auth",!0),function(e){t=t||{data:{}},t.data.qop||(t.data.qop=[]),t.data.qop.push(e.toLowerCase())},function(e){t=t||{data:{}},t.data.value=parseInt(e.join(""))},function(){var e,i;for(t=t||{data:{}},i=t.data.multi_header.length,e=0;e<i;e++)if(null===t.data.multi_header[e].parsed){t.data=null;break}null!==t.data?t.data=t.data.multi_header:t.data=-1},function(){var e;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{e=new ft(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch(i){e=null}t.data.multi_header.push({position:c,offset:p().start.offset,parsed:e})},function(){t=t||{data:{}},t.data=new ft(t.data.uri,t.data.displayName,t.data.params)},function(){t=t||{data:{}},t.data.replaces_from_tag&&t.data.replaces_to_tag||(t.data=-1)},function(){t=t||{data:{}},t.data={call_id:t.data}},"from-tag",v("from-tag",!0),function(e){t=t||{data:{}},t.data.replaces_from_tag=e},"to-tag",v("to-tag",!0),function(e){t=t||{data:{}},t.data.replaces_to_tag=e},"early-only",v("early-only",!0),function(){t=t||{data:{}},t.data.early_only=!0},function(e,t){return t},function(e,t){return function(e,t){return[e].concat(t)}(e,t)},function(e){t=t||{data:{}},"Require"===t.startRule&&(t.data=e||[])},function(e){t=t||{data:{}},t.data.value=parseInt(e.join(""))},"active",v("active",!0),"pending",v("pending",!0),"terminated",v("terminated",!0),function(){t=t||{data:{}},t.data.state=g()},"reason",v("reason",!0),function(e){t=t||{data:{}},"undefined"!==typeof e&&(t.data.reason=e)},function(e){t=t||{data:{}},"undefined"!==typeof e&&(t.data.expires=e)},"retry_after",v("retry_after",!0),function(e){t=t||{data:{}},"undefined"!==typeof e&&(t.data.retry_after=e)},"deactivated",v("deactivated",!0),"probation",v("probation",!0),"rejected",v("rejected",!0),"timeout",v("timeout",!0),"giveup",v("giveup",!0),"noresource",v("noresource",!0),"invariant",v("invariant",!0),function(e){t=t||{data:{}},"Supported"===t.startRule&&(t.data=e||[])},function(){t=t||{data:{}};var e=t.data.tag;t.data=new ft(t.data.uri,t.data.displayName,t.data.params),e&&t.data.setParam("tag",e)},"ttl",v("ttl",!0),function(e){t=t||{data:{}},t.data.ttl=e},"maddr",v("maddr",!0),function(e){t=t||{data:{}},t.data.maddr=e},"received",v("received",!0),function(e){t=t||{data:{}},t.data.received=e},"branch",v("branch",!0),function(e){t=t||{data:{}},t.data.branch=e},"rport",v("rport",!0),function(e){t=t||{data:{}},"undefined"!==typeof e&&(t.data.rport=e.join(""))},function(e){t=t||{data:{}},t.data.protocol=e},v("UDP",!0),v("TCP",!0),v("TLS",!0),v("SCTP",!0),function(e){t=t||{data:{}},t.data.transport=e},function(){t=t||{data:{}},t.data.host=g()},function(e){t=t||{data:{}},t.data.port=parseInt(e.join(""))},function(e){return parseInt(e.join(""))},function(e){t=t||{data:{}},"Session_Expires"===t.startRule&&(t.data.deltaSeconds=e)},"refresher",v("refresher",!1),"uas",v("uas",!1),"uac",v("uac",!1),function(e){t=t||{data:{}},"Session_Expires"===t.startRule&&(t.data.refresher=e)},function(e){t=t||{data:{}},"Min_SE"===t.startRule&&(t.data=e)},"stuns",v("stuns",!0),"stun",v("stun",!0),function(e){t=t||{data:{}},t.data.scheme=e},function(e){t=t||{data:{}},t.data.host=e},"?transport=",v("?transport=",!1),"turns",v("turns",!0),"turn",v("turn",!0),function(e){t=t||{data:{}},t.data.transport=e},function(){t=t||{data:{}},t.data=g()},"Referred-By",v("Referred-By",!1),"b",v("b",!1),"cid",v("cid",!1)],o=[I('2 ""6 7!'),I('4"""5!7#'),I('4$""5!7%'),I('4&""5!7\''),I(";'.# &;("),I('4(""5!7)'),I('4*""5!7+'),I('2,""6,7-'),I('2.""6.7/'),I('40""5!71'),I('22""6273.\x89 &24""6475.} &26""6677.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),I(";).# &;,"),I('2F""6F7G.} &2H""6H7I.q &2J""6J7K.e &2L""6L7M.Y &2N""6N7O.M &2P""6P7Q.A &2R""6R7S.5 &2T""6T7U.) &2V""6V7W'),I('%%2X""6X7Y/5#;#/,$;#/#$+#)(#\'#("\'#&\'#/"!&,)'),I('%%$;$0#*;$&/,#; /#$+")("\'#&\'#." &"/=#$;$/&#0#*;$&&&#/\'$8":Z" )("\'#&\'#'),I(';.." &"'),I("%$;'.# &;(0)*;'.# &;(&/?#28\"\"6879/0$;//'$8#:[# )(#'#(\"'#&'#"),I('%%$;2/&#0#*;2&&&#/g#$%$;.0#*;.&/,#;2/#$+")("\'#&\'#0=*%$;.0#*;.&/,#;2/#$+")("\'#&\'#&/#$+")("\'#&\'#/"!&,)'),I('4\\""5!7].# &;3'),I('4^""5!7_'),I('4`""5!7a'),I(';!.) &4b""5!7c'),I('%$;).\x95 &2F""6F7G.\x89 &2J""6J7K.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O/\x9e#0\x9b*;).\x95 &2F""6F7G.\x89 &2J""6J7K.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O&&&#/"!&,)'),I('%$;).\x89 &2F""6F7G.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O/\x92#0\x8f*;).\x89 &2F""6F7G.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O&&&#/"!&,)'),I('2T""6T7U.\xe3 &2V""6V7W.\xd7 &2f""6f7g.\xcb &2h""6h7i.\xbf &2:""6:7;.\xb3 &2D""6D7E.\xa7 &22""6273.\x9b &28""6879.\x8f &2j""6j7k.\x83 &;&.} &24""6475.q &2l""6l7m.e &2n""6n7o.Y &26""6677.M &2>""6>7?.A &2p""6p7q.5 &2r""6r7s.) &;\'.# &;('),I('%$;).\u012b &2F""6F7G.\u011f &2J""6J7K.\u0113 &2L""6L7M.\u0107 &2X""6X7Y.\xfb &2P""6P7Q.\xef &2H""6H7I.\xe3 &2@""6@7A.\xd7 &2d""6d7e.\xcb &2R""6R7S.\xbf &2N""6N7O.\xb3 &2T""6T7U.\xa7 &2V""6V7W.\x9b &2f""6f7g.\x8f &2h""6h7i.\x83 &28""6879.w &2j""6j7k.k &;&.e &24""6475.Y &2l""6l7m.M &2n""6n7o.A &26""6677.5 &2p""6p7q.) &2r""6r7s/\u0134#0\u0131*;).\u012b &2F""6F7G.\u011f &2J""6J7K.\u0113 &2L""6L7M.\u0107 &2X""6X7Y.\xfb &2P""6P7Q.\xef &2H""6H7I.\xe3 &2@""6@7A.\xd7 &2d""6d7e.\xcb &2R""6R7S.\xbf &2N""6N7O.\xb3 &2T""6T7U.\xa7 &2V""6V7W.\x9b &2f""6f7g.\x8f &2h""6h7i.\x83 &28""6879.w &2j""6j7k.k &;&.e &24""6475.Y &2l""6l7m.M &2n""6n7o.A &26""6677.5 &2p""6p7q.) &2r""6r7s&&&#/"!&,)'),I("%;//?#2P\"\"6P7Q/0$;//'$8#:t# )(#'#(\"'#&'#"),I("%;//?#24\"\"6475/0$;//'$8#:u# )(#'#(\"'#&'#"),I("%;//?#2>\"\"6>7?/0$;//'$8#:v# )(#'#(\"'#&'#"),I("%;//?#2T\"\"6T7U/0$;//'$8#:w# )(#'#(\"'#&'#"),I("%;//?#2V\"\"6V7W/0$;//'$8#:x# )(#'#(\"'#&'#"),I('%2h""6h7i/0#;//\'$8":y" )("\'#&\'#'),I('%;//6#2f""6f7g/\'$8":z" )("\'#&\'#'),I("%;//?#2D\"\"6D7E/0$;//'$8#:{# )(#'#(\"'#&'#"),I("%;//?#22\"\"6273/0$;//'$8#:|# )(#'#(\"'#&'#"),I("%;//?#28\"\"6879/0$;//'$8#:}# )(#'#(\"'#&'#"),I("%;//0#;&/'$8\":~\" )(\"'#&'#"),I("%;&/0#;//'$8\":~\" )(\"'#&'#"),I("%;=/T#$;G.) &;K.# &;F0/*;G.) &;K.# &;F&/,$;>/#$+#)(#'#(\"'#&'#"),I('4\x7f""5!7\x80.A &4\x81""5!7\x82.5 &4\x83""5!7\x84.) &;3.# &;.'),I("%%;//Q#;&/H$$;J.# &;K0)*;J.# &;K&/,$;&/#$+$)($'#(#'#(\"'#&'#/\"!&,)"),I("%;//]#;&/T$%$;J.# &;K0)*;J.# &;K&/\"!&,)/1$;&/($8$:\x85$!!)($'#(#'#(\"'#&'#"),I(';..G &2L""6L7M.; &4\x86""5!7\x87./ &4\x83""5!7\x84.# &;3'),I('%2j""6j7k/J#4\x88""5!7\x89.5 &4\x8a""5!7\x8b.) &4\x8c""5!7\x8d/#$+")("\'#&\'#'),I("%;N/M#28\"\"6879/>$;O.\" &\"/0$;S/'$8$:\x8e$ )($'#(#'#(\"'#&'#"),I("%;N/d#28\"\"6879/U$;O.\" &\"/G$;S/>$;_/5$;l.\" &\"/'$8&:\x8f& )(&'#(%'#($'#(#'#(\"'#&'#"),I('%3\x90""5$7\x91.) &3\x92""5#7\x93/\' 8!:\x94!! )'),I('%;P/]#%28""6879/,#;R/#$+")("\'#&\'#." &"/6$2:""6:7;/\'$8#:\x95# )(#\'#("\'#&\'#'),I("$;+.) &;-.# &;Q/2#0/*;+.) &;-.# &;Q&&&#"),I('2<""6<7=.q &2>""6>7?.e &2@""6@7A.Y &2B""6B7C.M &2D""6D7E.A &22""6273.5 &26""6677.) &24""6475'),I('%$;+._ &;-.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E0e*;+._ &;-.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E&/& 8!:\x96! )'),I('%;T/J#%28""6879/,#;^/#$+")("\'#&\'#." &"/#$+")("\'#&\'#'),I("%;U.) &;\\.# &;X/& 8!:\x97! )"),I('%$%;V/2#2J""6J7K/#$+")("\'#&\'#0<*%;V/2#2J""6J7K/#$+")("\'#&\'#&/D#;W/;$2J""6J7K." &"/\'$8#:\x98# )(#\'#("\'#&\'#'),I('$4\x99""5!7\x9a/,#0)*4\x99""5!7\x9a&&&#'),I('%4$""5!7%/?#$4\x9b""5!7\x9c0)*4\x9b""5!7\x9c&/#$+")("\'#&\'#'),I('%2l""6l7m/?#;Y/6$2n""6n7o/\'$8#:\x9d# )(#\'#("\'#&\'#'),I('%%;Z/\xb3#28""6879/\xa4$;Z/\x9b$28""6879/\x8c$;Z/\x83$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+-)(-\'#(,\'#(+\'#(*\'#()\'#((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u0790 &%2\x9e""6\x9e7\x9f/\xa4#;Z/\x9b$28""6879/\x8c$;Z/\x83$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+,)(,\'#(+\'#(*\'#()\'#((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u06f9 &%2\x9e""6\x9e7\x9f/\x8c#;Z/\x83$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*\'#()\'#((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u067a &%2\x9e""6\x9e7\x9f/t#;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+()((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u0613 &%2\x9e""6\x9e7\x9f/\\#;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+&)(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u05c4 &%2\x9e""6\x9e7\x9f/D#;Z/;$28""6879/,$;[/#$+$)($\'#(#\'#("\'#&\'#.\u058d &%2\x9e""6\x9e7\x9f/,#;[/#$+")("\'#&\'#.\u056e &%2\x9e""6\x9e7\x9f/,#;Z/#$+")("\'#&\'#.\u054f &%;Z/\x9b#2\x9e""6\x9e7\x9f/\x8c$;Z/\x83$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$++)(+\'#(*\'#()\'#((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u04c7 &%;Z/\xaa#%28""6879/,#;Z/#$+")("\'#&\'#." &"/\x83$2\x9e""6\x9e7\x9f/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*\'#()\'#((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u0430 &%;Z/\xb9#%28""6879/,#;Z/#$+")("\'#&\'#." &"/\x92$%28""6879/,#;Z/#$+")("\'#&\'#." &"/k$2\x9e""6\x9e7\x9f/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+))()\'#((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u038a &%;Z/\xc8#%28""6879/,#;Z/#$+")("\'#&\'#." &"/\xa1$%28""6879/,#;Z/#$+")("\'#&\'#." &"/z$%28""6879/,#;Z/#$+")("\'#&\'#." &"/S$2\x9e""6\x9e7\x9f/D$;Z/;$28""6879/,$;[/#$+()((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u02d5 &%;Z/\xd7#%28""6879/,#;Z/#$+")("\'#&\'#." &"/\xb0$%28""6879/,#;Z/#$+")("\'#&\'#." &"/\x89$%28""6879/,#;Z/#$+")("\'#&\'#." &"/b$%28""6879/,#;Z/#$+")("\'#&\'#." &"/;$2\x9e""6\x9e7\x9f/,$;[/#$+\')(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u0211 &%;Z/\xfe#%28""6879/,#;Z/#$+")("\'#&\'#." &"/\xd7$%28""6879/,#;Z/#$+")("\'#&\'#." &"/\xb0$%28""6879/,#;Z/#$+")("\'#&\'#." &"/\x89$%28""6879/,#;Z/#$+")("\'#&\'#." &"/b$%28""6879/,#;Z/#$+")("\'#&\'#." &"/;$2\x9e""6\x9e7\x9f/,$;Z/#$+()((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u0126 &%;Z/\u011c#%28""6879/,#;Z/#$+")("\'#&\'#." &"/\xf5$%28""6879/,#;Z/#$+")("\'#&\'#." &"/\xce$%28""6879/,#;Z/#$+")("\'#&\'#." &"/\xa7$%28""6879/,#;Z/#$+")("\'#&\'#." &"/\x80$%28""6879/,#;Z/#$+")("\'#&\'#." &"/Y$%28""6879/,#;Z/#$+")("\'#&\'#." &"/2$2\x9e""6\x9e7\x9f/#$+()((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#/& 8!:\xa0! )'),I('%;#/M#;#." &"/?$;#." &"/1$;#." &"/#$+$)($\'#(#\'#("\'#&\'#'),I("%;Z/;#28\"\"6879/,$;Z/#$+#)(#'#(\"'#&'#.# &;\\"),I("%;]/o#2J\"\"6J7K/`$;]/W$2J\"\"6J7K/H$;]/?$2J\"\"6J7K/0$;]/'$8':\xa1' )(''#(&'#(%'#($'#(#'#(\"'#&'#"),I('%2\xa2""6\xa27\xa3/2#4\xa4""5!7\xa5/#$+")("\'#&\'#.\x98 &%2\xa6""6\xa67\xa7/;#4\xa8""5!7\xa9/,$;!/#$+#)(#\'#("\'#&\'#.j &%2\xaa""6\xaa7\xab/5#;!/,$;!/#$+#)(#\'#("\'#&\'#.B &%4\xac""5!7\xad/,#;!/#$+")("\'#&\'#.# &;!'),I('%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%\'#($\'#(#\'#("\'#&\'#/\' 8!:\xae!! )'),I('$%22""6273/,#;`/#$+")("\'#&\'#0<*%22""6273/,#;`/#$+")("\'#&\'#&'),I(";a.A &;b.; &;c.5 &;d./ &;e.) &;f.# &;g"),I('%3\xaf""5*7\xb0/a#3\xb1""5#7\xb2.G &3\xb3""5#7\xb4.; &3\xb5""5$7\xb6./ &3\xb7""5#7\xb8.# &;6/($8":\xb9"! )("\'#&\'#'),I('%3\xba""5%7\xbb/I#3\xbc""5%7\xbd./ &3\xbe""5"7\xbf.# &;6/($8":\xc0"! )("\'#&\'#'),I('%3\xc1""5\'7\xc2/1#;\x90/($8":\xc3"! )("\'#&\'#'),I('%3\xc4""5$7\xc5/1#;\xf0/($8":\xc6"! )("\'#&\'#'),I('%3\xc7""5&7\xc8/1#;T/($8":\xc9"! )("\'#&\'#'),I('%3\xca""5"7\xcb/N#%2>""6>7?/,#;6/#$+")("\'#&\'#." &"/\'$8":\xcc" )("\'#&\'#'),I('%;h/P#%2>""6>7?/,#;i/#$+")("\'#&\'#." &"/)$8":\xcd""! )("\'#&\'#'),I('%$;j/&#0#*;j&&&#/"!&,)'),I('%$;j/&#0#*;j&&&#/"!&,)'),I(";k.) &;+.# &;-"),I('2l""6l7m.e &2n""6n7o.Y &24""6475.M &28""6879.A &2<""6<7=.5 &2@""6@7A.) &2B""6B7C'),I('%26""6677/n#;m/e$$%2<""6<7=/,#;m/#$+")("\'#&\'#0<*%2<""6<7=/,#;m/#$+")("\'#&\'#&/#$+#)(#\'#("\'#&\'#'),I('%;n/A#2>""6>7?/2$;o/)$8#:\xce#"" )(#\'#("\'#&\'#'),I("$;p.) &;+.# &;-/2#0/*;p.) &;+.# &;-&&&#"),I("$;p.) &;+.# &;-0/*;p.) &;+.# &;-&"),I('2l""6l7m.e &2n""6n7o.Y &24""6475.M &26""6677.A &28""6879.5 &2@""6@7A.) &2B""6B7C'),I(";\x91.# &;r"),I("%;\x90/G#;'/>$;s/5$;'/,$;\x84/#$+%)(%'#($'#(#'#(\"'#&'#"),I(";M.# &;t"),I("%;\x7f/E#28\"\"6879/6$;u.# &;x/'$8#:\xcf# )(#'#(\"'#&'#"),I('%;v.# &;w/J#%26""6677/,#;\x83/#$+")("\'#&\'#." &"/#$+")("\'#&\'#'),I('%2\xd0""6\xd07\xd1/:#;\x80/1$;w." &"/#$+#)(#\'#("\'#&\'#'),I('%24""6475/,#;{/#$+")("\'#&\'#'),I("%;z/3#$;y0#*;y&/#$+\")(\"'#&'#"),I(";*.) &;+.# &;-"),I(';+.\x8f &;-.\x89 &22""6273.} &26""6677.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),I('%;|/e#$%24""6475/,#;|/#$+")("\'#&\'#0<*%24""6475/,#;|/#$+")("\'#&\'#&/#$+")("\'#&\'#'),I('%$;~0#*;~&/e#$%22""6273/,#;}/#$+")("\'#&\'#0<*%22""6273/,#;}/#$+")("\'#&\'#&/#$+")("\'#&\'#'),I("$;~0#*;~&"),I(';+.w &;-.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),I('%%;"/\x87#$;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K0M*;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K&/#$+")("\'#&\'#/& 8!:\xd2! )'),I(";\x81.# &;\x82"),I('%%;O/2#2:""6:7;/#$+")("\'#&\'#." &"/,#;S/#$+")("\'#&\'#." &"'),I('$;+.\x83 &;-.} &2B""6B7C.q &2D""6D7E.e &22""6273.Y &28""6879.M &2:""6:7;.A &2<""6<7=.5 &2>""6>7?.) &2@""6@7A/\x8c#0\x89*;+.\x83 &;-.} &2B""6B7C.q &2D""6D7E.e &22""6273.Y &28""6879.M &2:""6:7;.A &2<""6<7=.5 &2>""6>7?.) &2@""6@7A&&&#'),I("$;y0#*;y&"),I('%3\x92""5#7\xd3/q#24""6475/b$$;!/&#0#*;!&&&#/L$2J""6J7K/=$$;!/&#0#*;!&&&#/\'$8%:\xd4% )(%\'#($\'#(#\'#("\'#&\'#'),I('2\xd5""6\xd57\xd6'),I('2\xd7""6\xd77\xd8'),I('2\xd9""6\xd97\xda'),I('2\xdb""6\xdb7\xdc'),I('2\xdd""6\xdd7\xde'),I('2\xdf""6\xdf7\xe0'),I('2\xe1""6\xe17\xe2'),I('2\xe3""6\xe37\xe4'),I('2\xe5""6\xe57\xe6'),I('2\xe7""6\xe77\xe8'),I('2\xe9""6\xe97\xea'),I("%;\x85.Y &;\x86.S &;\x88.M &;\x89.G &;\x8a.A &;\x8b.; &;\x8c.5 &;\x8f./ &;\x8d.) &;\x8e.# &;6/& 8!:\xeb! )"),I("%;\x84/G#;'/>$;\x92/5$;'/,$;\x94/#$+%)(%'#($'#(#'#(\"'#&'#"),I("%;\x93/' 8!:\xec!! )"),I("%;!/5#;!/,$;!/#$+#)(#'#(\"'#&'#"),I("%$;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(0G*;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(&/& 8!:\xed! )"),I("%;\xb6/Y#$%;A/,#;\xb6/#$+\")(\"'#&'#06*%;A/,#;\xb6/#$+\")(\"'#&'#&/#$+\")(\"'#&'#"),I('%;9/N#%2:""6:7;/,#;9/#$+")("\'#&\'#." &"/\'$8":\xee" )("\'#&\'#'),I("%;:.c &%;\x98/Y#$%;A/,#;\x98/#$+\")(\"'#&'#06*%;A/,#;\x98/#$+\")(\"'#&'#&/#$+\")(\"'#&'#/& 8!:\xef! )"),I("%;L.# &;\x99/]#$%;B/,#;\x9b/#$+\")(\"'#&'#06*%;B/,#;\x9b/#$+\")(\"'#&'#&/'$8\":\xf0\" )(\"'#&'#"),I("%;\x9a.\" &\"/>#;@/5$;M/,$;?/#$+$)($'#(#'#(\"'#&'#"),I("%%;6/Y#$%;./,#;6/#$+\")(\"'#&'#06*%;./,#;6/#$+\")(\"'#&'#&/#$+\")(\"'#&'#.# &;H/' 8!:\xf1!! )"),I(";\x9c.) &;\x9d.# &;\xa0"),I("%3\xf2\"\"5!7\xf3/:#;</1$;\x9f/($8#:\xf4#! )(#'#(\"'#&'#"),I("%3\xf5\"\"5'7\xf6/:#;</1$;\x9e/($8#:\xf7#! )(#'#(\"'#&'#"),I("%$;!/&#0#*;!&&&#/' 8!:\xf8!! )"),I('%2\xf9""6\xf97\xfa/o#%2J""6J7K/M#;!." &"/?$;!." &"/1$;!." &"/#$+$)($\'#(#\'#("\'#&\'#." &"/\'$8":\xfb" )("\'#&\'#'),I('%;6/J#%;</,#;\xa1/#$+")("\'#&\'#." &"/)$8":\xfc""! )("\'#&\'#'),I(";6.) &;T.# &;H"),I("%;\xa3/Y#$%;B/,#;\xa4/#$+\")(\"'#&'#06*%;B/,#;\xa4/#$+\")(\"'#&'#&/#$+\")(\"'#&'#"),I('%3\xfd""5&7\xfe.G &3\xff""5\'7\u0100.; &3\u0101""5$7\u0102./ &3\u0103""5%7\u0104.# &;6/& 8!:\u0105! )'),I(";\xa5.# &;\xa0"),I('%3\u0106""5(7\u0107/M#;</D$3\u0108""5(7\u0109./ &3\u010a""5(7\u010b.# &;6/#$+#)(#\'#("\'#&\'#'),I("%;6/Y#$%;A/,#;6/#$+\")(\"'#&'#06*%;A/,#;6/#$+\")(\"'#&'#&/#$+\")(\"'#&'#"),I("%$;!/&#0#*;!&&&#/' 8!:\u010c!! )"),I("%;\xa9/& 8!:\u010d! )"),I("%;\xaa/k#;;/b$;\xaf/Y$$%;B/,#;\xb0/#$+\")(\"'#&'#06*%;B/,#;\xb0/#$+\")(\"'#&'#&/#$+$)($'#(#'#(\"'#&'#"),I(";\xab.# &;\xac"),I('3\u010e""5$7\u010f.S &3\u0110""5%7\u0111.G &3\u0112""5%7\u0113.; &3\u0114""5%7\u0115./ &3\u0116""5+7\u0117.# &;\xad'),I('3\u0118""5\'7\u0119./ &3\u011a""5)7\u011b.# &;\xad'),I(";6.# &;\xae"),I('%3\u011c""5"7\u011d/,#;6/#$+")("\'#&\'#'),I(";\xad.# &;6"),I("%;6/5#;</,$;\xb1/#$+#)(#'#(\"'#&'#"),I(";6.# &;H"),I("%;\xb3/5#;./,$;\x90/#$+#)(#'#(\"'#&'#"),I("%$;!/&#0#*;!&&&#/' 8!:\u011e!! )"),I("%;\x9e/' 8!:\u011f!! )"),I('%;\xb6/^#$%;B/,#;\xa0/#$+")("\'#&\'#06*%;B/,#;\xa0/#$+")("\'#&\'#&/($8":\u0120"!!)("\'#&\'#'),I('%%;7/e#$%2J""6J7K/,#;7/#$+")("\'#&\'#0<*%2J""6J7K/,#;7/#$+")("\'#&\'#&/#$+")("\'#&\'#/"!&,)'),I("%;L.# &;\x99/]#$%;B/,#;\xb8/#$+\")(\"'#&'#06*%;B/,#;\xb8/#$+\")(\"'#&'#&/'$8\":\u0121\" )(\"'#&'#"),I(";\xb9.# &;\xa0"),I("%3\u0122\"\"5#7\u0123/:#;</1$;6/($8#:\u0124#! )(#'#(\"'#&'#"),I("%$;!/&#0#*;!&&&#/' 8!:\u0125!! )"),I("%;\x9e/' 8!:\u0126!! )"),I("%$;\x9a0#*;\x9a&/x#;@/o$;M/f$;?/]$$%;B/,#;\xa0/#$+\")(\"'#&'#06*%;B/,#;\xa0/#$+\")(\"'#&'#&/'$8%:\u0127% )(%'#($'#(#'#(\"'#&'#"),I(";\xbe"),I("%3\u0128\"\"5&7\u0129/k#;./b$;\xc1/Y$$%;A/,#;\xc1/#$+\")(\"'#&'#06*%;A/,#;\xc1/#$+\")(\"'#&'#&/#$+$)($'#(#'#(\"'#&'#.# &;\xbf"),I("%;6/k#;./b$;\xc0/Y$$%;A/,#;\xc0/#$+\")(\"'#&'#06*%;A/,#;\xc0/#$+\")(\"'#&'#&/#$+$)($'#(#'#(\"'#&'#"),I("%;6/;#;</2$;6.# &;H/#$+#)(#'#(\"'#&'#"),I(";\xc2.G &;\xc4.A &;\xc6.; &;\xc8.5 &;\xc9./ &;\xca.) &;\xcb.# &;\xc0"),I("%3\u012a\"\"5%7\u012b/5#;</,$;\xc3/#$+#)(#'#(\"'#&'#"),I("%;I/' 8!:\u012c!! )"),I("%3\u012d\"\"5&7\u012e/\x97#;</\x8e$;D/\x85$;\xc5/|$$%$;'/&#0#*;'&&&#/,#;\xc5/#$+\")(\"'#&'#0C*%$;'/&#0#*;'&&&#/,#;\xc5/#$+\")(\"'#&'#&/,$;E/#$+&)(&'#(%'#($'#(#'#(\"'#&'#"),I(";t.# &;w"),I("%3\u012f\"\"5%7\u0130/5#;</,$;\xc7/#$+#)(#'#(\"'#&'#"),I("%;I/' 8!:\u0131!! )"),I("%3\u0132\"\"5&7\u0133/:#;</1$;I/($8#:\u0134#! )(#'#(\"'#&'#"),I('%3\u0135""5%7\u0136/]#;</T$%3\u0137""5$7\u0138/& 8!:\u0139! ).4 &%3\u013a""5%7\u013b/& 8!:\u013c! )/#$+#)(#\'#("\'#&\'#'),I('%3\u013d""5)7\u013e/R#;</I$3\u013f""5#7\u0140./ &3\u0141""5(7\u0142.# &;6/($8#:\u0143#! )(#\'#("\'#&\'#'),I('%3\u0144""5#7\u0145/\x93#;</\x8a$;D/\x81$%;\xcc/e#$%2D""6D7E/,#;\xcc/#$+")("\'#&\'#0<*%2D""6D7E/,#;\xcc/#$+")("\'#&\'#&/#$+")("\'#&\'#/,$;E/#$+%)(%\'#($\'#(#\'#("\'#&\'#'),I('%3\u0146""5(7\u0147./ &3\u0148""5$7\u0149.# &;6/\' 8!:\u014a!! )'),I("%;6/Y#$%;A/,#;6/#$+\")(\"'#&'#06*%;A/,#;6/#$+\")(\"'#&'#&/#$+\")(\"'#&'#"),I("%;\xcf/G#;./>$;\xcf/5$;./,$;\x90/#$+%)(%'#($'#(#'#(\"'#&'#"),I("%$;!/&#0#*;!&&&#/' 8!:\u014b!! )"),I("%;\xd1/]#$%;A/,#;\xd1/#$+\")(\"'#&'#06*%;A/,#;\xd1/#$+\")(\"'#&'#&/'$8\":\u014c\" )(\"'#&'#"),I("%;\x99/]#$%;B/,#;\xa0/#$+\")(\"'#&'#06*%;B/,#;\xa0/#$+\")(\"'#&'#&/'$8\":\u014d\" )(\"'#&'#"),I('%;L.O &;\x99.I &%;@." &"/:#;t/1$;?." &"/#$+#)(#\'#("\'#&\'#/]#$%;B/,#;\xa0/#$+")("\'#&\'#06*%;B/,#;\xa0/#$+")("\'#&\'#&/\'$8":\u014e" )("\'#&\'#'),I("%;\xd4/]#$%;B/,#;\xd5/#$+\")(\"'#&'#06*%;B/,#;\xd5/#$+\")(\"'#&'#&/'$8\":\u014f\" )(\"'#&'#"),I("%;\x96/& 8!:\u0150! )"),I('%3\u0151""5(7\u0152/:#;</1$;6/($8#:\u0153#! )(#\'#("\'#&\'#.g &%3\u0154""5&7\u0155/:#;</1$;6/($8#:\u0156#! )(#\'#("\'#&\'#.: &%3\u0157""5*7\u0158/& 8!:\u0159! ).# &;\xa0'),I('%%;6/k#$%;A/2#;6/)$8":\u015a""$ )("\'#&\'#0<*%;A/2#;6/)$8":\u015a""$ )("\'#&\'#&/)$8":\u015b""! )("\'#&\'#." &"/\' 8!:\u015c!! )'),I("%;\xd8/Y#$%;A/,#;\xd8/#$+\")(\"'#&'#06*%;A/,#;\xd8/#$+\")(\"'#&'#&/#$+\")(\"'#&'#"),I("%;\x99/Y#$%;B/,#;\xa0/#$+\")(\"'#&'#06*%;B/,#;\xa0/#$+\")(\"'#&'#&/#$+\")(\"'#&'#"),I("%$;!/&#0#*;!&&&#/' 8!:\u015d!! )"),I("%;\xdb/Y#$%;B/,#;\xdc/#$+\")(\"'#&'#06*%;B/,#;\xdc/#$+\")(\"'#&'#&/#$+\")(\"'#&'#"),I('%3\u015e""5&7\u015f.; &3\u0160""5\'7\u0161./ &3\u0162""5*7\u0163.# &;6/& 8!:\u0164! )'),I("%3\u0165\"\"5&7\u0166/:#;</1$;\xdd/($8#:\u0167#! )(#'#(\"'#&'#.} &%3\xf5\"\"5'7\xf6/:#;</1$;\x9e/($8#:\u0168#! )(#'#(\"'#&'#.P &%3\u0169\"\"5+7\u016a/:#;</1$;\x9e/($8#:\u016b#! )(#'#(\"'#&'#.# &;\xa0"),I('3\u016c""5+7\u016d.k &3\u016e""5)7\u016f._ &3\u0170""5(7\u0171.S &3\u0172""5\'7\u0173.G &3\u0174""5&7\u0175.; &3\u0176""5*7\u0177./ &3\u0178""5)7\u0179.# &;6'),I(';1." &"'),I('%%;6/k#$%;A/2#;6/)$8":\u015a""$ )("\'#&\'#0<*%;A/2#;6/)$8":\u015a""$ )("\'#&\'#&/)$8":\u015b""! )("\'#&\'#." &"/\' 8!:\u017a!! )'),I("%;L.# &;\x99/]#$%;B/,#;\xe1/#$+\")(\"'#&'#06*%;B/,#;\xe1/#$+\")(\"'#&'#&/'$8\":\u017b\" )(\"'#&'#"),I(";\xb9.# &;\xa0"),I("%;\xe3/Y#$%;A/,#;\xe3/#$+\")(\"'#&'#06*%;A/,#;\xe3/#$+\")(\"'#&'#&/#$+\")(\"'#&'#"),I("%;\xea/k#;./b$;\xed/Y$$%;B/,#;\xe4/#$+\")(\"'#&'#06*%;B/,#;\xe4/#$+\")(\"'#&'#&/#$+$)($'#(#'#(\"'#&'#"),I(";\xe5.; &;\xe6.5 &;\xe7./ &;\xe8.) &;\xe9.# &;\xa0"),I("%3\u017c\"\"5#7\u017d/:#;</1$;\xf0/($8#:\u017e#! )(#'#(\"'#&'#"),I("%3\u017f\"\"5%7\u0180/:#;</1$;T/($8#:\u0181#! )(#'#(\"'#&'#"),I("%3\u0182\"\"5(7\u0183/F#;</=$;\\.) &;Y.# &;X/($8#:\u0184#! )(#'#(\"'#&'#"),I("%3\u0185\"\"5&7\u0186/:#;</1$;6/($8#:\u0187#! )(#'#(\"'#&'#"),I("%3\u0188\"\"5%7\u0189/A#;</8$$;!0#*;!&/($8#:\u018a#! )(#'#(\"'#&'#"),I("%;\xeb/G#;;/>$;6/5$;;/,$;\xec/#$+%)(%'#($'#(#'#(\"'#&'#"),I('%3\x92""5#7\xd3.# &;6/\' 8!:\u018b!! )'),I('%3\xb1""5#7\u018c.G &3\xb3""5#7\u018d.; &3\xb7""5#7\u018e./ &3\xb5""5$7\u018f.# &;6/\' 8!:\u0190!! )'),I('%;\xee/D#%;C/,#;\xef/#$+")("\'#&\'#." &"/#$+")("\'#&\'#'),I("%;U.) &;\\.# &;X/& 8!:\u0191! )"),I('%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%\'#($\'#(#\'#("\'#&\'#/\' 8!:\u0192!! )'),I('%%;!/?#;!." &"/1$;!." &"/#$+#)(#\'#("\'#&\'#/\' 8!:\u0193!! )'),I(";\xbe"),I('%;\x9e/^#$%;B/,#;\xf3/#$+")("\'#&\'#06*%;B/,#;\xf3/#$+")("\'#&\'#&/($8":\u0194"!!)("\'#&\'#'),I(";\xf4.# &;\xa0"),I('%2\u0195""6\u01957\u0196/L#;</C$2\u0197""6\u01977\u0198.) &2\u0199""6\u01997\u019a/($8#:\u019b#! )(#\'#("\'#&\'#'),I('%;\x9e/^#$%;B/,#;\xa0/#$+")("\'#&\'#06*%;B/,#;\xa0/#$+")("\'#&\'#&/($8":\u019c"!!)("\'#&\'#'),I("%;6/5#;0/,$;\xf7/#$+#)(#'#(\"'#&'#"),I("$;2.) &;4.# &;.0/*;2.) &;4.# &;.&"),I("$;%0#*;%&"),I("%;\xfa/;#28\"\"6879/,$;\xfb/#$+#)(#'#(\"'#&'#"),I('%3\u019d""5%7\u019e.) &3\u019f""5$7\u01a0/\' 8!:\u01a1!! )'),I('%;\xfc/J#%28""6879/,#;^/#$+")("\'#&\'#." &"/#$+")("\'#&\'#'),I("%;\\.) &;X.# &;\x82/' 8!:\u01a2!! )"),I(';".S &;!.M &2F""6F7G.A &2J""6J7K.5 &2H""6H7I.) &2N""6N7O'),I('2L""6L7M.\x95 &2B""6B7C.\x89 &2<""6<7=.} &2R""6R7S.q &2T""6T7U.e &2V""6V7W.Y &2P""6P7Q.M &2@""6@7A.A &2D""6D7E.5 &22""6273.) &2>""6>7?'),I('%;\u0100/b#28""6879/S$;\xfb/J$%2\u01a3""6\u01a37\u01a4/,#;\xec/#$+")("\'#&\'#." &"/#$+$)($\'#(#\'#("\'#&\'#'),I('%3\u01a5""5%7\u01a6.) &3\u01a7""5$7\u01a8/\' 8!:\u01a1!! )'),I('%3\xb1""5#7\xb2.6 &3\xb3""5#7\xb4.* &$;+0#*;+&/\' 8!:\u01a9!! )'),I("%;\u0104/\x87#2F\"\"6F7G/x$;\u0103/o$2F\"\"6F7G/`$;\u0103/W$2F\"\"6F7G/H$;\u0103/?$2F\"\"6F7G/0$;\u0105/'$8):\u01aa) )()'#(('#(''#(&'#(%'#($'#(#'#(\"'#&'#"),I("%;#/>#;#/5$;#/,$;#/#$+$)($'#(#'#(\"'#&'#"),I("%;\u0103/,#;\u0103/#$+\")(\"'#&'#"),I("%;\u0103/5#;\u0103/,$;\u0103/#$+#)(#'#(\"'#&'#"),I("%;q/T#$;m0#*;m&/D$%; /,#;\xf8/#$+\")(\"'#&'#.\" &\"/#$+#)(#'#(\"'#&'#"),I('%2\u01ab""6\u01ab7\u01ac.) &2\u01ad""6\u01ad7\u01ae/w#;0/n$;\u0108/e$$%;B/2#;\u0109.# &;\xa0/#$+")("\'#&\'#0<*%;B/2#;\u0109.# &;\xa0/#$+")("\'#&\'#&/#$+$)($\'#(#\'#("\'#&\'#'),I(";\x99.# &;L"),I("%2\u01af\"\"6\u01af7\u01b0/5#;</,$;\u010a/#$+#)(#'#(\"'#&'#"),I("%;D/S#;,/J$2:\"\"6:7;/;$;,.# &;T/,$;E/#$+%)(%'#($'#(#'#(\"'#&'#")],c=0,u=0,l=[{line:1,column:1}],d=0,h=[],f=0;if(void 0!==t.startRule){if(!(t.startRule in r))throw new Error("Can't start parsing from rule \""+t.startRule+'".');s=r[t.startRule]}function g(){return e.substring(u,c)}function p(){return _(u,c)}function v(e,t){return{type:"literal",text:e,ignoreCase:t}}function m(e,t,i){return{type:"class",parts:e,inverted:t,ignoreCase:i}}function y(t){var i,n=l[t];if(n)return n;i=t-1;while(!l[i])i--;n=l[i],n={line:n.line,column:n.column};while(i<t)10===e.charCodeAt(i)?(n.line++,n.column=1):n.column++,i++;return l[t]=n,n}function _(e,t){var i=y(e),n=y(t);return{start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:n.line,column:n.column}}}function S(e){c<d||(c>d&&(d=c,h=[]),h.push(e))}function I(e){return e.split("").map((function(e){return e.charCodeAt(0)-32}))}if(t.data={},i=function t(i){var r,s=o[i],l=0,d=[],h=s.length,g=[],p=[];while(1){while(l<h)switch(s[l]){case 0:p.push(a[s[l+1]]),l+=2;break;case 1:p.push(void 0),l++;break;case 2:p.push(null),l++;break;case 3:p.push(n),l++;break;case 4:p.push([]),l++;break;case 5:p.push(c),l++;break;case 6:p.pop(),l++;break;case 7:c=p.pop(),l++;break;case 8:p.length-=s[l+1],l+=2;break;case 9:p.splice(-2,1),l++;break;case 10:p[p.length-2].push(p.pop()),l++;break;case 11:p.push(p.splice(p.length-s[l+1],s[l+1])),l+=2;break;case 12:p.push(e.substring(p.pop(),c)),l++;break;case 13:g.push(h),d.push(l+3+s[l+1]+s[l+2]),p[p.length-1]?(h=l+3+s[l+1],l+=3):(h=l+3+s[l+1]+s[l+2],l+=3+s[l+1]);break;case 14:g.push(h),d.push(l+3+s[l+1]+s[l+2]),p[p.length-1]===n?(h=l+3+s[l+1],l+=3):(h=l+3+s[l+1]+s[l+2],l+=3+s[l+1]);break;case 15:g.push(h),d.push(l+3+s[l+1]+s[l+2]),p[p.length-1]!==n?(h=l+3+s[l+1],l+=3):(h=l+3+s[l+1]+s[l+2],l+=3+s[l+1]);break;case 16:p[p.length-1]!==n?(g.push(h),d.push(l),h=l+2+s[l+1],l+=2):l+=2+s[l+1];break;case 17:g.push(h),d.push(l+3+s[l+1]+s[l+2]),e.length>c?(h=l+3+s[l+1],l+=3):(h=l+3+s[l+1]+s[l+2],l+=3+s[l+1]);break;case 18:g.push(h),d.push(l+4+s[l+2]+s[l+3]),e.substr(c,a[s[l+1]].length)===a[s[l+1]]?(h=l+4+s[l+2],l+=4):(h=l+4+s[l+2]+s[l+3],l+=4+s[l+2]);break;case 19:g.push(h),d.push(l+4+s[l+2]+s[l+3]),e.substr(c,a[s[l+1]].length).toLowerCase()===a[s[l+1]]?(h=l+4+s[l+2],l+=4):(h=l+4+s[l+2]+s[l+3],l+=4+s[l+2]);break;case 20:g.push(h),d.push(l+4+s[l+2]+s[l+3]),a[s[l+1]].test(e.charAt(c))?(h=l+4+s[l+2],l+=4):(h=l+4+s[l+2]+s[l+3],l+=4+s[l+2]);break;case 21:p.push(e.substr(c,s[l+1])),c+=s[l+1],l+=2;break;case 22:p.push(a[s[l+1]]),c+=a[s[l+1]].length,l+=2;break;case 23:p.push(n),0===f&&S(a[s[l+1]]),l+=2;break;case 24:u=p[p.length-1-s[l+1]],l+=2;break;case 25:u=c,l++;break;case 26:r=s.slice(l+4,l+4+s[l+3]).map((function(e){return p[p.length-1-e]})),p.splice(p.length-s[l+2],s[l+2],a[s[l+1]].apply(null,r)),l+=4+s[l+3];break;case 27:p.push(t(s[l+1])),l+=2;break;case 28:f++,l++;break;case 29:f--,l++;break;default:throw new Error("Invalid opcode: "+s[l]+".")}if(!(g.length>0))break;h=g.pop(),l=d.pop()}return p[0]}(s),i!==n&&c===e.length)return i;throw i!==n&&c<e.length&&S(function(){return{type:"end"}}()),function(e,t,i){return new pt(pt.buildMessage(e,t),e,t,i)}(h,d<e.length?e.charAt(d):null,d<e.length?_(d,d+1):_(d,d))};function yt(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32,i="",n=0;n<e;n++){var r=Math.floor(Math.random()*t);i+=r.toString(t)}return i}function _t(e){return kt[e]||""}function St(){return yt(10)}function It(e){for(var t={"Call-Id":"Call-ID",Cseq:"CSeq","Min-Se":"Min-SE",Rack:"RAck",Rseq:"RSeq","Www-Authenticate":"WWW-Authenticate"},i=e.toLowerCase().replace(/_/g,"-").split("-"),n=i.length,r="",s=0;s<n;s++)0!==s&&(r+="-"),r+=i[s].charAt(0).toUpperCase()+i[s].substring(1);return t[r]&&(r=t[r]),r}function wt(e){return encodeURIComponent(e).replace(/%[A-F\d]{2}/g,"U").length}(function(e){e.parse=function(e,t){var i={startRule:t};try{mt(e,i)}catch(n){i.data=-1}return i.data},e.nameAddrHeaderParse=function(t){var i=e.parse(t,"Name_Addr_Header");return-1!==i?i:void 0},e.URIParse=function(t){var i=e.parse(t,"SIP_URI");return-1!==i?i:void 0}})(vt||(vt={}));var kt={100:"Trying",180:"Ringing",181:"Call Is Being Forwarded",182:"Queued",183:"Session Progress",199:"Early Dialog Terminated",200:"OK",202:"Accepted",204:"No Notification",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",305:"Use Proxy",380:"Alternative Service",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",410:"Gone",412:"Conditional Request Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Unsupported URI Scheme",417:"Unknown Resource-Priority",420:"Bad Extension",421:"Extension Required",422:"Session Interval Too Small",423:"Interval Too Brief",428:"Use Identity Header",429:"Provide Referrer Identity",430:"Flow Failed",433:"Anonymity Disallowed",436:"Bad Identity-Info",437:"Unsupported Certificate",438:"Invalid Identity Header",439:"First Hop Lacks Outbound Support",440:"Max-Breadth Exceeded",469:"Bad Info Package",470:"Consent Needed",478:"Unresolvable Destination",480:"Temporarily Unavailable",481:"Call/Transaction Does Not Exist",482:"Loop Detected",483:"Too Many Hops",484:"Address Incomplete",485:"Ambiguous",486:"Busy Here",487:"Request Terminated",488:"Not Acceptable Here",489:"Bad Event",491:"Request Pending",493:"Undecipherable",494:"Security Agreement Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Server Time-out",505:"Version Not Supported",513:"Message Too Large",580:"Precondition Failure",600:"Busy Everywhere",603:"Decline",604:"Does Not Exist Anywhere",606:"Not Acceptable"},Ct=function(){function e(){(0,h.default)(this,e),this.headers={}}return(0,f.default)(e,[{key:"addHeader",value:function(e,t){var i={raw:t};e=It(e),this.headers[e]?this.headers[e].push(i):this.headers[e]=[i]}},{key:"getHeader",value:function(e){var t=this.headers[It(e)];if(t)return t[0]?t[0].raw:void 0}},{key:"getHeaders",value:function(e){var t=this.headers[It(e)],i=[];if(!t)return[];var n,r=m(t);try{for(r.s();!(n=r.n()).done;){var s=n.value;i.push(s.raw)}}catch(a){r.e(a)}finally{r.f()}return i}},{key:"hasHeader",value:function(e){return!!this.headers[It(e)]}},{key:"parseHeader",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e=It(e),this.headers[e]&&!(t>=this.headers[e].length)){var i=this.headers[e][t],n=i.raw;if(i.parsed)return i.parsed;var r=vt.parse(n,e.replace(/-/g,"_"));return-1===r?void this.headers[e].splice(t,1):(i.parsed=r,r)}}},{key:"s",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.parseHeader(e,t)}},{key:"setHeader",value:function(e,t){this.headers[It(e)]=[{raw:t}]}},{key:"toString",value:function(){return this.data}}]),e}(),bt=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.call(this)}return(0,f.default)(i)}(Ct),Et=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.call(this)}return(0,f.default)(i)}(Ct),Tt=function(){function e(t,i,n,r,s,a,o){(0,h.default)(this,e),this.headers={},this.extraHeaders=[],this.options=e.getDefaultOptions(),s&&(this.options=Object.assign(Object.assign({},this.options),s),this.options.optionTags&&this.options.optionTags.length&&(this.options.optionTags=this.options.optionTags.slice()),this.options.routeSet&&this.options.routeSet.length&&(this.options.routeSet=this.options.routeSet.slice())),a&&a.length&&(this.extraHeaders=a.slice()),o&&(this.body={body:o.content,contentType:o.contentType}),this.method=t,this.ruri=i.clone(),this.fromURI=n.clone(),this.fromTag=this.options.fromTag?this.options.fromTag:St(),this.from=e.makeNameAddrHeader(this.fromURI,this.options.fromDisplayName,this.fromTag),this.toURI=r.clone(),this.toTag=this.options.toTag,this.to=e.makeNameAddrHeader(this.toURI,this.options.toDisplayName,this.toTag),this.callId=this.options.callId?this.options.callId:this.options.callIdPrefix+yt(15),this.cseq=this.options.cseq,this.setHeader("route",this.options.routeSet),this.setHeader("via",""),this.setHeader("to",this.to.toString()),this.setHeader("from",this.from.toString()),this.setHeader("cseq",this.cseq+" "+this.method),this.setHeader("call-id",this.callId),this.setHeader("max-forwards","70")}return(0,f.default)(e,[{key:"getHeader",value:function(e){var t=this.headers[It(e)];if(t){if(t[0])return t[0]}else{var i,n=new RegExp("^\\s*"+e+"\\s*:","i"),r=m(this.extraHeaders);try{for(r.s();!(i=r.n()).done;){var s=i.value;if(n.test(s))return s.substring(s.indexOf(":")+1).trim()}}catch(a){r.e(a)}finally{r.f()}}}},{key:"getHeaders",value:function(e){var t=[],i=this.headers[It(e)];if(i){var n,r=m(i);try{for(r.s();!(n=r.n()).done;){var s=n.value;t.push(s)}}catch(l){r.e(l)}finally{r.f()}}else{var a,o=new RegExp("^\\s*"+e+"\\s*:","i"),c=m(this.extraHeaders);try{for(c.s();!(a=c.n()).done;){var u=a.value;o.test(u)&&t.push(u.substring(u.indexOf(":")+1).trim())}}catch(l){c.e(l)}finally{c.f()}}return t}},{key:"hasHeader",value:function(e){if(this.headers[It(e)])return!0;var t,i=new RegExp("^\\s*"+e+"\\s*:","i"),n=m(this.extraHeaders);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(i.test(r))return!0}}catch(s){n.e(s)}finally{n.f()}return!1}},{key:"setHeader",value:function(e,t){this.headers[It(e)]=t instanceof Array?t:[t]}},{key:"setViaHeader",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"WSS";this.options.hackViaTcp&&(t="TCP");var i="SIP/2.0/"+t;i+=" "+this.options.viaHost+";branch="+e,this.options.forceRport&&(i+=";rport"),this.setHeader("via",i),this.branch=e}},{key:"toString",value:function(){var e="";for(var t in e+=this.method+" "+this.ruri.toRaw()+" SIP/2.0\r\n",this.headers)if(this.headers[t]){var i,n=m(this.headers[t]);try{for(n.s();!(i=n.n()).done;){var r=i.value;e+=t+": "+r+"\r\n"}}catch(c){n.e(c)}finally{n.f()}}var s,a=m(this.extraHeaders);try{for(a.s();!(s=a.n()).done;){var o=s.value;e+=o.trim()+"\r\n"}}catch(c){a.e(c)}finally{a.f()}return e+="Supported: "+this.options.optionTags.join(", ")+"\r\n",e+="User-Agent: "+this.options.userAgentString+"\r\n",this.body?"string"===typeof this.body?(e+="Content-Length: "+wt(this.body)+"\r\n\r\n",e+=this.body):this.body.body&&this.body.contentType?(e+="Content-Type: "+this.body.contentType+"\r\n",e+="Content-Length: "+wt(this.body.body)+"\r\n\r\n",e+=this.body.body):e+="Content-Length: 0\r\n\r\n":e+="Content-Length: 0\r\n\r\n",e}}],[{key:"getDefaultOptions",value:function(){return{callId:"",callIdPrefix:"",cseq:1,toDisplayName:"",toTag:"",fromDisplayName:"",fromTag:"",forceRport:!1,hackViaTcp:!1,optionTags:["outbound"],routeSet:[],userAgentString:"sip.js",viaHost:""}}},{key:"makeNameAddrHeader",value:function(e,t,i){var n={};return i&&(n.tag=i),new ft(e,t,n)}}]),e}();function xt(e){var t="string"===typeof e?e:e.body,i="string"===typeof e?"application/sdp":e.contentType,n=Mt(i),r={contentDisposition:n,contentType:i,content:t};return r}function Pt(e){var t,i,n;if(e instanceof bt&&e.body){var r=e.parseHeader("Content-Disposition");t=r?r.type:void 0,i=e.parseHeader("Content-Type"),n=e.body}if(e instanceof Et&&e.body){var s=e.parseHeader("Content-Disposition");t=s?s.type:void 0,i=e.parseHeader("Content-Type"),n=e.body}if(e instanceof Tt&&e.body)if(t=e.getHeader("Content-Disposition"),i=e.getHeader("Content-Type"),"string"===typeof e.body){if(!i)throw new Error("Header content type header does not equal body content type.");n=e.body}else{if(i&&i!==e.body.contentType)throw new Error("Header content type header does not equal body content type.");i=e.body.contentType,n=e.body.body}if(Rt(e)&&(t=e.contentDisposition,i=e.contentType,n=e.content),n){if(i&&!t&&(t=Mt(i)),!t)throw new Error("Content disposition undefined.");if(!i)throw new Error("Content type undefined.");return{contentDisposition:t,contentType:i,content:n}}}function Rt(e){return!(!e||"string"!==typeof e.content||"string"!==typeof e.contentType||void 0!==e.contentDisposition)||"string"===typeof e.contentDisposition}function Mt(e){return"application/sdp"===e?"session":"render"}"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof n||"undefined"!==typeof self&&self;function Dt(e,t){return t={exports:{}},e(t,t.exports),t.exports}var Ot,At=Dt((function(e,t){(function(t,i){e.exports=function(){var e=e||function(e,t){var i=Object.create||function(){function e(){}return function(t){var i;return e.prototype=t,i=new e,e.prototype=null,i}}(),n={},r=n.lib={},s=r.Base=function(){return{extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=r.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,i=e.words,n=this.sigBytes,r=e.sigBytes;if(this.clamp(),n%4)for(var s=0;s<r;s++){var a=i[s>>>2]>>>24-s%4*8&255;t[n+s>>>2]|=a<<24-(n+s)%4*8}else for(s=0;s<r;s+=4)t[n+s>>>2]=i[s>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,i=this.sigBytes;t[i>>>2]&=4294967295<<32-i%4*8,t.length=e.ceil(i/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var i,n=[],r=function(t){t=t;var i=987654321,n=4294967295;return function(){i=36969*(65535&i)+(i>>16)&n,t=18e3*(65535&t)+(t>>16)&n;var r=(i<<16)+t&n;return r/=4294967296,r+=.5,r*(e.random()>.5?1:-1)}},s=0;s<t;s+=4){var o=r(4294967296*(i||e.random()));i=987654071*o(),n.push(4294967296*o()|0)}return new a.init(n,t)}}),o=n.enc={},c=o.Hex={stringify:function(e){for(var t=e.words,i=e.sigBytes,n=[],r=0;r<i;r++){var s=t[r>>>2]>>>24-r%4*8&255;n.push((s>>>4).toString(16)),n.push((15&s).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,i=[],n=0;n<t;n+=2)i[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new a.init(i,t/2)}},u=o.Latin1={stringify:function(e){for(var t=e.words,i=e.sigBytes,n=[],r=0;r<i;r++){var s=t[r>>>2]>>>24-r%4*8&255;n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){for(var t=e.length,i=[],n=0;n<t;n++)i[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new a.init(i,t)}},l=o.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},d=r.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var i=this._data,n=i.words,r=i.sigBytes,s=this.blockSize,o=4*s,c=r/o;c=t?e.ceil(c):e.max((0|c)-this._minBufferSize,0);var u=c*s,l=e.min(4*u,r);if(u){for(var d=0;d<u;d+=s)this._doProcessBlock(n,d);var h=n.splice(0,u);i.sigBytes-=l}return new a.init(h,l)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),h=(r.Hasher=d.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},blockSize:16,_createHelper:function(e){return function(t,i){return new e.init(i).finalize(t)}},_createHmacHelper:function(e){return function(t,i){return new h.HMAC.init(e,i).finalize(t)}}}),n.algo={});return n}(Math);return e}()})()})),Ft=Dt((function(e,t){(function(t,i){e.exports=function(e){return function(t){var i=e,n=i.lib,r=n.WordArray,s=n.Hasher,a=i.algo,o=[];(function(){for(var e=0;e<64;e++)o[e]=4294967296*t.abs(t.sin(e+1))|0})();var c=a.MD5=s.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var n=t+i,r=e[n];e[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var s=this._hash.words,a=e[t+0],c=e[t+1],f=e[t+2],g=e[t+3],p=e[t+4],v=e[t+5],m=e[t+6],y=e[t+7],_=e[t+8],S=e[t+9],I=e[t+10],w=e[t+11],k=e[t+12],C=e[t+13],b=e[t+14],E=e[t+15],T=s[0],x=s[1],P=s[2],R=s[3];T=u(T,x,P,R,a,7,o[0]),R=u(R,T,x,P,c,12,o[1]),P=u(P,R,T,x,f,17,o[2]),x=u(x,P,R,T,g,22,o[3]),T=u(T,x,P,R,p,7,o[4]),R=u(R,T,x,P,v,12,o[5]),P=u(P,R,T,x,m,17,o[6]),x=u(x,P,R,T,y,22,o[7]),T=u(T,x,P,R,_,7,o[8]),R=u(R,T,x,P,S,12,o[9]),P=u(P,R,T,x,I,17,o[10]),x=u(x,P,R,T,w,22,o[11]),T=u(T,x,P,R,k,7,o[12]),R=u(R,T,x,P,C,12,o[13]),P=u(P,R,T,x,b,17,o[14]),x=u(x,P,R,T,E,22,o[15]),T=l(T,x,P,R,c,5,o[16]),R=l(R,T,x,P,m,9,o[17]),P=l(P,R,T,x,w,14,o[18]),x=l(x,P,R,T,a,20,o[19]),T=l(T,x,P,R,v,5,o[20]),R=l(R,T,x,P,I,9,o[21]),P=l(P,R,T,x,E,14,o[22]),x=l(x,P,R,T,p,20,o[23]),T=l(T,x,P,R,S,5,o[24]),R=l(R,T,x,P,b,9,o[25]),P=l(P,R,T,x,g,14,o[26]),x=l(x,P,R,T,_,20,o[27]),T=l(T,x,P,R,C,5,o[28]),R=l(R,T,x,P,f,9,o[29]),P=l(P,R,T,x,y,14,o[30]),x=l(x,P,R,T,k,20,o[31]),T=d(T,x,P,R,v,4,o[32]),R=d(R,T,x,P,_,11,o[33]),P=d(P,R,T,x,w,16,o[34]),x=d(x,P,R,T,b,23,o[35]),T=d(T,x,P,R,c,4,o[36]),R=d(R,T,x,P,p,11,o[37]),P=d(P,R,T,x,y,16,o[38]),x=d(x,P,R,T,I,23,o[39]),T=d(T,x,P,R,C,4,o[40]),R=d(R,T,x,P,a,11,o[41]),P=d(P,R,T,x,g,16,o[42]),x=d(x,P,R,T,m,23,o[43]),T=d(T,x,P,R,S,4,o[44]),R=d(R,T,x,P,k,11,o[45]),P=d(P,R,T,x,E,16,o[46]),x=d(x,P,R,T,f,23,o[47]),T=h(T,x,P,R,a,6,o[48]),R=h(R,T,x,P,y,10,o[49]),P=h(P,R,T,x,b,15,o[50]),x=h(x,P,R,T,v,21,o[51]),T=h(T,x,P,R,k,6,o[52]),R=h(R,T,x,P,g,10,o[53]),P=h(P,R,T,x,I,15,o[54]),x=h(x,P,R,T,c,21,o[55]),T=h(T,x,P,R,_,6,o[56]),R=h(R,T,x,P,E,10,o[57]),P=h(P,R,T,x,m,15,o[58]),x=h(x,P,R,T,C,21,o[59]),T=h(T,x,P,R,p,6,o[60]),R=h(R,T,x,P,w,10,o[61]),P=h(P,R,T,x,f,15,o[62]),x=h(x,P,R,T,S,21,o[63]),s[0]=s[0]+T|0,s[1]=s[1]+x|0,s[2]=s[2]+P|0,s[3]=s[3]+R|0},_doFinalize:function(){var e=this._data,i=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;i[r>>>5]|=128<<24-r%32;var s=t.floor(n/4294967296),a=n;i[15+(r+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),i[14+(r+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(i.length+1),this._process();for(var o=this._hash,c=o.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return o},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,i,n,r,s,a){var o=e+(t&i|~t&n)+r+a;return(o<<s|o>>>32-s)+t}function l(e,t,i,n,r,s,a){var o=e+(t&n|i&~n)+r+a;return(o<<s|o>>>32-s)+t}function d(e,t,i,n,r,s,a){var o=e+(t^i^n)+r+a;return(o<<s|o>>>32-s)+t}function h(e,t,i,n,r,s,a){var o=e+(i^(t|~n))+r+a;return(o<<s|o>>>32-s)+t}i.MD5=s._createHelper(c),i.HmacMD5=s._createHmacHelper(c)}(Math),e.MD5}(At)})()})),qt=function(){function e(t,i,n){(0,h.default)(this,e),this.logger=t.getLogger("sipjs.digestauthentication"),this.username=i,this.password=n,this.nc=0,this.ncHex="00000000"}return(0,f.default)(e,[{key:"authenticate",value:function(e,t,i){if(this.algorithm=t.algorithm,this.realm=t.realm,this.nonce=t.nonce,this.opaque=t.opaque,this.stale=t.stale,this.algorithm){if("MD5"!==this.algorithm)return this.logger.warn("challenge with Digest algorithm different than 'MD5', authentication aborted"),!1}else this.algorithm="MD5";if(!this.realm)return this.logger.warn("challenge without Digest realm, authentication aborted"),!1;if(!this.nonce)return this.logger.warn("challenge without Digest nonce, authentication aborted"),!1;if(t.qop)if(t.qop.indexOf("auth")>-1)this.qop="auth";else{if(!(t.qop.indexOf("auth-int")>-1))return this.logger.warn("challenge without Digest qop different than 'auth' or 'auth-int', authentication aborted"),!1;this.qop="auth-int"}else this.qop=void 0;return this.method=e.method,this.uri=e.ruri,this.cnonce=yt(12),this.nc+=1,this.updateNcHex(),4294967296===this.nc&&(this.nc=1,this.ncHex="00000001"),this.calculateResponse(i),!0}},{key:"toString",value:function(){var e=[];if(!this.response)throw new Error("response field does not exist, cannot generate Authorization header");return e.push("algorithm="+this.algorithm),e.push('username="'+this.username+'"'),e.push('realm="'+this.realm+'"'),e.push('nonce="'+this.nonce+'"'),e.push('uri="'+this.uri+'"'),e.push('response="'+this.response+'"'),this.opaque&&e.push('opaque="'+this.opaque+'"'),this.qop&&(e.push("qop="+this.qop),e.push('cnonce="'+this.cnonce+'"'),e.push("nc="+this.ncHex)),"Digest "+e.join(", ")}},{key:"updateNcHex",value:function(){var e=Number(this.nc).toString(16);this.ncHex="00000000".substr(0,8-e.length)+e}},{key:"calculateResponse",value:function(e){var t,i=Ft(this.username+":"+this.realm+":"+this.password);"auth"===this.qop?(t=Ft(this.method+":"+this.uri),this.response=Ft(i+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth:"+t)):"auth-int"===this.qop?(t=Ft(this.method+":"+this.uri+":"+Ft(e||"")),this.response=Ft(i+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth-int:"+t)):void 0===this.qop&&(t=Ft(this.method+":"+this.uri),this.response=Ft(i+":"+this.nonce+":"+t))}}]),e}();function Nt(e,t){if(t.statusCode<100||t.statusCode>699)throw new TypeError("Invalid statusCode: "+t.statusCode);var i=t.reasonPhrase?t.reasonPhrase:_t(t.statusCode),n="SIP/2.0 "+t.statusCode+" "+i+"\r\n";t.statusCode>=100&&t.statusCode,t.statusCode;var r="From: "+e.getHeader("From")+"\r\n",s="Call-ID: "+e.callId+"\r\n",a="CSeq: "+e.cseq+" "+e.method+"\r\n",o=e.getHeaders("via").reduce((function(e,t){return e+"Via: "+t+"\r\n"}),""),c="To: "+e.getHeader("to");if(t.statusCode>100&&!e.parseHeader("to").hasParam("tag")){var u=t.toTag;u||(u=St()),c+=";tag="+u}c+="\r\n";var l="";t.supported&&(l="Supported: "+t.supported.join(", ")+"\r\n");var d="";t.userAgent&&(d="User-Agent: "+t.userAgent+"\r\n");var h="";return t.extraHeaders&&(h=t.extraHeaders.reduce((function(e,t){return e+t.trim()+"\r\n"}),"")),n+=o,n+=r,n+=c,n+=a,n+=s,n+=l,n+=d,n+=h,t.body?(n+="Content-Type: "+t.body.contentType+"\r\n",n+="Content-Length: "+wt(t.body.content)+"\r\n\r\n",n+=t.body.content):n+="Content-Length: 0\r\n\r\n",{message:n}}(function(e){function t(e,t){var i=t,n=0,r=0;if(e.substring(i,i+2).match(/(^\r\n)/))return-2;while(0===n){if(r=e.indexOf("\r\n",i),-1===r)return r;!e.substring(r+2,r+4).match(/(^\r\n)/)&&e.charAt(r+2).match(/(^\s+)/)?i=r+2:n=r}return n}function i(e,t,i,n){var r,s=t.indexOf(":",i),a=t.substring(i,s).trim(),o=t.substring(s+1,n).trim();switch(a.toLowerCase()){case"via":case"v":e.addHeader("via",o),1===e.getHeaders("via").length?(r=e.parseHeader("Via"),r&&(e.via=r,e.viaBranch=r.branch)):r=0;break;case"from":case"f":e.setHeader("from",o),r=e.parseHeader("from"),r&&(e.from=r,e.fromTag=r.getParam("tag"));break;case"to":case"t":e.setHeader("to",o),r=e.parseHeader("to"),r&&(e.to=r,e.toTag=r.getParam("tag"));break;case"record-route":if(r=vt.parse(o,"Record_Route"),-1===r){r=void 0;break}if(!(r instanceof Array)){r=void 0;break}r.forEach((function(t){e.addHeader("record-route",o.substring(t.position,t.offset)),e.headers["Record-Route"][e.getHeaders("record-route").length-1].parsed=t.parsed}));break;case"call-id":case"i":e.setHeader("call-id",o),r=e.parseHeader("call-id"),r&&(e.callId=o);break;case"contact":case"m":if(r=vt.parse(o,"Contact"),-1===r){r=void 0;break}if(!(r instanceof Array)){r=void 0;break}r.forEach((function(t){e.addHeader("contact",o.substring(t.position,t.offset)),e.headers.Contact[e.getHeaders("contact").length-1].parsed=t.parsed}));break;case"content-length":case"l":e.setHeader("content-length",o),r=e.parseHeader("content-length");break;case"content-type":case"c":e.setHeader("content-type",o),r=e.parseHeader("content-type");break;case"cseq":e.setHeader("cseq",o),r=e.parseHeader("cseq"),r&&(e.cseq=r.value),e instanceof Et&&(e.method=r.method);break;case"max-forwards":e.setHeader("max-forwards",o),r=e.parseHeader("max-forwards");break;case"www-authenticate":e.setHeader("www-authenticate",o),r=e.parseHeader("www-authenticate");break;case"proxy-authenticate":e.setHeader("proxy-authenticate",o),r=e.parseHeader("proxy-authenticate");break;case"refer-to":case"r":e.setHeader("refer-to",o),r=e.parseHeader("refer-to"),r&&(e.referTo=r);break;default:e.addHeader(a.toLowerCase(),o),r=0}return void 0!==r||{error:"error parsing header '"+a+"'"}}e.getHeader=t,e.parseHeader=i,e.parseMessage=function(e,n){var r=0,s=e.indexOf("\r\n");if(-1!==s){var a,o=e.substring(0,s),c=vt.parse(o,"Request_Response");if(-1!==c){var u;c.status_code?(a=new Et,a.statusCode=c.status_code,a.reasonPhrase=c.reason_phrase):(a=new bt,a.method=c.method,a.ruri=c.uri),a.data=e,r=s+2;while(1){if(s=t(e,r),-2===s){u=r+2;break}if(-1===s)return void n.error("malformed message");var l=i(a,e,r,s);if(!0!==l)return void n.error(c.error);r=s+2}return a.hasHeader("content-length")?a.body=e.substr(u,Number(a.getHeader("content-length"))):a.body=e.substring(u),a}n.warn('error parsing first line of SIP message: "'+o+'"')}else n.warn("no CRLF found, not a SIP message, discarded")}})(Ot||(Ot={}));var Bt,Lt,Ht=function(){function e(t,i){(0,h.default)(this,e),this.core=t,this.dialogState=i,this.core.dialogs.set(this.id,this)}return(0,f.default)(e,[{key:"dispose",value:function(){this.core.dialogs.delete(this.id)}},{key:"id",get:function(){return this.dialogState.id}},{key:"early",get:function(){return this.dialogState.early}},{key:"callId",get:function(){return this.dialogState.callId}},{key:"localTag",get:function(){return this.dialogState.localTag}},{key:"remoteTag",get:function(){return this.dialogState.remoteTag}},{key:"localSequenceNumber",get:function(){return this.dialogState.localSequenceNumber}},{key:"remoteSequenceNumber",get:function(){return this.dialogState.remoteSequenceNumber}},{key:"localURI",get:function(){return this.dialogState.localURI}},{key:"remoteURI",get:function(){return this.dialogState.remoteURI}},{key:"remoteTarget",get:function(){return this.dialogState.remoteTarget}},{key:"routeSet",get:function(){return this.dialogState.routeSet}},{key:"secure",get:function(){return this.dialogState.secure}},{key:"userAgentCore",get:function(){return this.core}},{key:"confirm",value:function(){this.dialogState.early=!1}},{key:"receiveRequest",value:function(e){if(e.method!==lt.ACK){if(this.remoteSequenceNumber){if(e.cseq<=this.remoteSequenceNumber)throw new Error("Out of sequence in dialog request. Did you forget to call sequenceGuard()?");this.dialogState.remoteSequenceNumber=e.cseq}this.remoteSequenceNumber||(this.dialogState.remoteSequenceNumber=e.cseq)}}},{key:"recomputeRouteSet",value:function(e){this.dialogState.routeSet=e.getHeaders("record-route").reverse()}},{key:"createOutgoingRequestMessage",value:function(e,t){var i,n=this.remoteURI,r=this.remoteTag,s=this.localURI,a=this.localTag,o=this.callId;i=t&&t.cseq?t.cseq:this.dialogState.localSequenceNumber?this.dialogState.localSequenceNumber+=1:this.dialogState.localSequenceNumber=1;var c=this.remoteTarget,u=this.routeSet,l=t&&t.extraHeaders,d=t&&t.body,h=this.userAgentCore.makeOutgoingRequestMessage(e,c,s,n,{callId:o,cseq:i,fromTag:a,toTag:r,routeSet:u},l,d);return h}},{key:"sequenceGuard",value:function(e){return e.method===lt.ACK||(!(this.remoteSequenceNumber&&e.cseq<=this.remoteSequenceNumber)||(this.core.replyStateless(e,{statusCode:500}),!1))}}],[{key:"initialDialogStateForUserAgentClient",value:function(e,t){var i=t.getHeaders("record-route").reverse(),n=t.parseHeader("contact");if(!n)throw new Error("Contact undefined.");if(!(n instanceof ft))throw new Error("Contact not instance of NameAddrHeader.");var r=n.uri,s=e.cseq,a=e.callId,o=e.fromTag,c=t.toTag;if(!a)throw new Error("Call id undefined.");if(!o)throw new Error("From tag undefined.");if(!c)throw new Error("To tag undefined.");if(!e.from)throw new Error("From undefined.");if(!e.to)throw new Error("To undefined.");var u=e.from.uri,l=e.to.uri;if(!t.statusCode)throw new Error("Incoming response status code undefined.");var d=t.statusCode<200,h={id:a+o+c,early:d,callId:a,localTag:o,remoteTag:c,localSequenceNumber:s,remoteSequenceNumber:void 0,localURI:u,remoteURI:l,remoteTarget:r,routeSet:i,secure:!1};return h}},{key:"initialDialogStateForUserAgentServer",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,r=e.getHeaders("record-route"),s=e.parseHeader("contact");if(!s)throw new Error("Contact undefined.");if(!(s instanceof ft))throw new Error("Contact not instance of NameAddrHeader.");var a=s.uri,o=e.cseq,c=void 0,u=e.callId,l=t,d=e.fromTag,h=e.from.uri,f=e.to.uri,g={id:u+l+d,early:i,callId:u,localTag:l,remoteTag:d,localSequenceNumber:c,remoteSequenceNumber:o,localURI:f,remoteURI:h,remoteTarget:a,routeSet:r,secure:n};return g}}]),e}();(function(e){e["Initial"]="Initial",e["Early"]="Early",e["AckWait"]="AckWait",e["Confirmed"]="Confirmed",e["Terminated"]="Terminated"})(Bt||(Bt={})),function(e){e["Initial"]="Initial",e["HaveLocalOffer"]="HaveLocalOffer",e["HaveRemoteOffer"]="HaveRemoteOffer",e["Stable"]="Stable",e["Closed"]="Closed"}(Lt||(Lt={}));var Vt,Ut=500,jt={T1:Ut,T2:4e3,T4:5e3,TIMER_B:32e3,TIMER_D:0,TIMER_F:32e3,TIMER_H:32e3,TIMER_I:0,TIMER_J:0,TIMER_K:0,TIMER_L:32e3,TIMER_M:32e3,TIMER_N:32e3,PROVISIONAL_RESPONSE_INTERVAL:6e4},Gt=function(e){(0,g.default)(i,e);var t=_(i);function i(e){var n;return(0,h.default)(this,i),n=t.call(this,e),Object.setPrototypeOf((0,u.default)(n),(this instanceof i?this.constructor:void 0).prototype),n}return(0,f.default)(i)}((0,l.default)(Error)),zt=function(e){(0,g.default)(i,e);var t=_(i);function i(e){return(0,h.default)(this,i),t.call(this,e||"Transaction state error.")}return(0,f.default)(i)}(Gt),$t=function(e){(0,g.default)(i,e);var t=_(i);function i(e){return(0,h.default)(this,i),t.call(this,e||"Unspecified transport error.")}return(0,f.default)(i)}(Gt),Wt=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r,s,a){var o;return(0,h.default)(this,i),o=t.call(this),o._transport=e,o._user=n,o._id=r,o._state=s,o.logger=n.loggerFactory.getLogger(a,r),o.logger.debug("Constructing ".concat(o.typeToString()," with id ").concat(o.id,".")),o}return(0,f.default)(i,[{key:"dispose",value:function(){this.logger.debug("Destroyed ".concat(this.typeToString()," with id ").concat(this.id,"."))}},{key:"id",get:function(){return this._id}},{key:"kind",get:function(){throw new Error("Invalid kind.")}},{key:"state",get:function(){return this._state}},{key:"transport",get:function(){return this._transport}},{key:"on",value:function(e,t){return(0,c.default)((0,v.default)(i.prototype),"on",this).call(this,e,t)}},{key:"logTransportError",value:function(e,t){this.logger.error(e.message),this.logger.error("Transport error occurred in ".concat(this.typeToString()," with id ").concat(this.id,".")),this.logger.error(t)}},{key:"send",value:function(e){var t=this;return this.transport.send(e).catch((function(e){if(e instanceof $t)throw t.onTransportError(e),e;var i;throw i=e&&"string"===typeof e.message?new $t(e.message):new $t,t.onTransportError(i),i}))}},{key:"setState",value:function(e){this.logger.debug('State change to "'.concat(e,'" on ').concat(this.typeToString()," with id ").concat(this.id,".")),this._state=e,this._user.onStateChange&&this._user.onStateChange(e),this.emit("stateChanged")}},{key:"typeToString",value:function(){return"UnknownType"}}]),i}(y),Kt=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r,s,a){var o;(0,h.default)(this,i),o=t.call(this,n,r,i.makeId(e),s,a),o._request=e,o.user=r;var c=n.server&&n.server.scheme?n.server.scheme:void 0;return e.setViaHeader(o.id,c),o}return(0,f.default)(i,[{key:"request",get:function(){return this._request}},{key:"onRequestTimeout",value:function(){this.user.onRequestTimeout&&this.user.onRequestTimeout()}}],[{key:"makeId",value:function(e){if("CANCEL"===e.method){if(!e.branch)throw new Error("Outgoing CANCEL request without a branch.");return e.branch}return"z9hG4bK"+Math.floor(1e7*Math.random())}}]),i}(Wt);(function(e){e["Accepted"]="Accepted",e["Calling"]="Calling",e["Completed"]="Completed",e["Confirmed"]="Confirmed",e["Proceeding"]="Proceeding",e["Terminated"]="Terminated",e["Trying"]="Trying"})(Vt||(Vt={}));var Jt=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){var s;return(0,h.default)(this,i),s=t.call(this,e,n,r,Vt.Calling,"sip.transaction.ict"),s.ackRetransmissionCache=new Map,s.B=setTimeout((function(){return s.timer_B()}),jt.TIMER_B),s.send(e.toString()).catch((function(e){s.logTransportError(e,"Failed to send initial outgoing request.")})),s}return(0,f.default)(i,[{key:"dispose",value:function(){this.B&&(clearTimeout(this.B),this.B=void 0),this.D&&(clearTimeout(this.D),this.D=void 0),this.M&&(clearTimeout(this.M),this.M=void 0),(0,c.default)((0,v.default)(i.prototype),"dispose",this).call(this)}},{key:"kind",get:function(){return"ict"}},{key:"ackResponse",value:function(e){var t=this,i=e.toTag;if(!i)throw new Error("To tag undefined.");var n="z9hG4bK"+Math.floor(1e7*Math.random()),r=this.transport.server&&this.transport.server.scheme?this.transport.server.scheme:void 0;e.setViaHeader(n,r),this.ackRetransmissionCache.set(i,e),this.send(e.toString()).catch((function(e){t.logTransportError(e,"Failed to send ACK to 2xx response.")}))}},{key:"receiveResponse",value:function(e){var t=this,i=e.statusCode;if(!i||i<100||i>699)throw new Error("Invalid status code ".concat(i));switch(this.state){case Vt.Calling:if(i>=100&&i<=199)return this.stateTransition(Vt.Proceeding),void(this.user.receiveResponse&&this.user.receiveResponse(e));if(i>=200&&i<=299)return this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(Vt.Accepted),void(this.user.receiveResponse&&this.user.receiveResponse(e));if(i>=300&&i<=699)return this.stateTransition(Vt.Completed),this.ack(e),void(this.user.receiveResponse&&this.user.receiveResponse(e));break;case Vt.Proceeding:if(i>=100&&i<=199)return void(this.user.receiveResponse&&this.user.receiveResponse(e));if(i>=200&&i<=299)return this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(Vt.Accepted),void(this.user.receiveResponse&&this.user.receiveResponse(e));if(i>=300&&i<=699)return this.stateTransition(Vt.Completed),this.ack(e),void(this.user.receiveResponse&&this.user.receiveResponse(e));break;case Vt.Accepted:if(i>=200&&i<=299){if(!this.ackRetransmissionCache.has(e.toTag))return this.ackRetransmissionCache.set(e.toTag,void 0),void(this.user.receiveResponse&&this.user.receiveResponse(e));var n=this.ackRetransmissionCache.get(e.toTag);return n?void this.send(n.toString()).catch((function(e){t.logTransportError(e,"Failed to send retransmission of ACK to 2xx response.")})):void 0}break;case Vt.Completed:if(i>=300&&i<=699)return void this.ack(e);break;case Vt.Terminated:break;default:throw new Error("Invalid state ".concat(this.state))}var r="Received unexpected ".concat(i," response while in state ").concat(this.state,".");this.logger.warn(r)}},{key:"onTransportError",value:function(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(Vt.Terminated,!0)}},{key:"typeToString",value:function(){return"INVITE client transaction"}},{key:"ack",value:function(e){var t=this,i=this.request.ruri,n=this.request.callId,r=this.request.cseq,s=this.request.getHeader("from"),a=e.getHeader("to"),o=this.request.getHeader("via"),c=this.request.getHeader("route");if(!s)throw new Error("From undefined.");if(!a)throw new Error("To undefined.");if(!o)throw new Error("Via undefined.");var u="ACK ".concat(i," SIP/2.0\r\n");c&&(u+="Route: ".concat(c,"\r\n")),u+="Via: ".concat(o,"\r\n"),u+="To: ".concat(a,"\r\n"),u+="From: ".concat(s,"\r\n"),u+="Call-ID: ".concat(n,"\r\n"),u+="CSeq: ".concat(r," ACK\r\n"),u+="Max-Forwards: 70\r\n",u+="Content-Length: 0\r\n\r\n",this.send(u).catch((function(e){t.logTransportError(e,"Failed to send ACK to non-2xx response.")}))}},{key:"stateTransition",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=function(){throw new Error("Invalid state transition from ".concat(t.state," to ").concat(e))};switch(e){case Vt.Calling:n();break;case Vt.Proceeding:this.state!==Vt.Calling&&n();break;case Vt.Accepted:case Vt.Completed:this.state!==Vt.Calling&&this.state!==Vt.Proceeding&&n();break;case Vt.Terminated:this.state!==Vt.Calling&&this.state!==Vt.Accepted&&this.state!==Vt.Completed&&(i||n());break;default:n()}this.B&&(clearTimeout(this.B),this.B=void 0),Vt.Proceeding,e===Vt.Completed&&(this.D=setTimeout((function(){return t.timer_D()}),jt.TIMER_D)),e===Vt.Accepted&&(this.M=setTimeout((function(){return t.timer_M()}),jt.TIMER_M)),e===Vt.Terminated&&this.dispose(),this.setState(e)}},{key:"timer_A",value:function(){}},{key:"timer_B",value:function(){this.logger.debug("Timer B expired for INVITE client transaction ".concat(this.id,".")),this.state===Vt.Calling&&(this.onRequestTimeout(),this.stateTransition(Vt.Terminated))}},{key:"timer_D",value:function(){this.logger.debug("Timer D expired for INVITE client transaction ".concat(this.id,".")),this.state===Vt.Completed&&this.stateTransition(Vt.Terminated)}},{key:"timer_M",value:function(){this.logger.debug("Timer M expired for INVITE client transaction ".concat(this.id,".")),this.state===Vt.Accepted&&this.stateTransition(Vt.Terminated)}}]),i}(Kt),Xt=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r,s,a){var o;return(0,h.default)(this,i),o=t.call(this,n,r,e.viaBranch,s,a),o._request=e,o.user=r,o}return(0,f.default)(i,[{key:"request",get:function(){return this._request}}]),i}(Wt),Yt=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){return(0,h.default)(this,i),t.call(this,e,n,r,Vt.Proceeding,"sip.transaction.ist")}return(0,f.default)(i,[{key:"dispose",value:function(){this.stopProgressExtensionTimer(),this.H&&(clearTimeout(this.H),this.H=void 0),this.I&&(clearTimeout(this.I),this.I=void 0),this.L&&(clearTimeout(this.L),this.L=void 0),(0,c.default)((0,v.default)(i.prototype),"dispose",this).call(this)}},{key:"kind",get:function(){return"ist"}},{key:"receiveRequest",value:function(e){var t=this;switch(this.state){case Vt.Proceeding:if(e.method===lt.INVITE)return void(this.lastProvisionalResponse&&this.send(this.lastProvisionalResponse).catch((function(e){t.logTransportError(e,"Failed to send retransmission of provisional response.")})));break;case Vt.Accepted:if(e.method===lt.INVITE)return;break;case Vt.Completed:if(e.method===lt.INVITE){if(!this.lastFinalResponse)throw new Error("Last final response undefined.");return void this.send(this.lastFinalResponse).catch((function(e){t.logTransportError(e,"Failed to send retransmission of final response.")}))}if(e.method===lt.ACK)return void this.stateTransition(Vt.Confirmed);break;case Vt.Confirmed:if(e.method===lt.INVITE||e.method===lt.ACK)return;break;case Vt.Terminated:if(e.method===lt.INVITE||e.method===lt.ACK)return;break;default:throw new Error("Invalid state ".concat(this.state))}var i="INVITE server transaction received unexpected ".concat(e.method," request while in state ").concat(this.state,".");this.logger.warn(i)}},{key:"receiveResponse",value:function(e,t){var i=this;if(e<100||e>699)throw new Error("Invalid status code ".concat(e));switch(this.state){case Vt.Proceeding:if(e>=100&&e<=199)return this.lastProvisionalResponse=t,e>100&&this.startProgressExtensionTimer(),void this.send(t).catch((function(e){i.logTransportError(e,"Failed to send 1xx response.")}));if(e>=200&&e<=299)return this.lastFinalResponse=t,this.stateTransition(Vt.Accepted),void this.send(t).catch((function(e){i.logTransportError(e,"Failed to send 2xx response.")}));if(e>=300&&e<=699)return this.lastFinalResponse=t,this.stateTransition(Vt.Completed),void this.send(t).catch((function(e){i.logTransportError(e,"Failed to send non-2xx final response.")}));break;case Vt.Accepted:if(e>=200&&e<=299)return void this.send(t).catch((function(e){i.logTransportError(e,"Failed to send 2xx response.")}));break;case Vt.Completed:break;case Vt.Confirmed:break;case Vt.Terminated:break;default:throw new Error("Invalid state ".concat(this.state))}var n="INVITE server transaction received unexpected ".concat(e," response from TU while in state ").concat(this.state,".");throw this.logger.error(n),new Error(n)}},{key:"retransmitAcceptedResponse",value:function(){var e=this;this.state===Vt.Accepted&&this.lastFinalResponse&&this.send(this.lastFinalResponse).catch((function(t){e.logTransportError(t,"Failed to send 2xx response.")}))}},{key:"onTransportError",value:function(e){this.user.onTransportError&&this.user.onTransportError(e)}},{key:"typeToString",value:function(){return"INVITE server transaction"}},{key:"stateTransition",value:function(e){var t=this,i=function(){throw new Error("Invalid state transition from ".concat(t.state," to ").concat(e))};switch(e){case Vt.Proceeding:i();break;case Vt.Accepted:case Vt.Completed:this.state!==Vt.Proceeding&&i();break;case Vt.Confirmed:this.state!==Vt.Completed&&i();break;case Vt.Terminated:this.state!==Vt.Accepted&&this.state!==Vt.Completed&&this.state!==Vt.Confirmed&&i();break;default:i()}this.stopProgressExtensionTimer(),e===Vt.Accepted&&(this.L=setTimeout((function(){return t.timer_L()}),jt.TIMER_L)),e===Vt.Completed&&(this.H=setTimeout((function(){return t.timer_H()}),jt.TIMER_H)),e===Vt.Confirmed&&(this.I=setTimeout((function(){return t.timer_I()}),jt.TIMER_I)),e===Vt.Terminated&&this.dispose(),this.setState(e)}},{key:"startProgressExtensionTimer",value:function(){var e=this;void 0===this.progressExtensionTimer&&(this.progressExtensionTimer=setInterval((function(){if(e.logger.debug("Progress extension timer expired for INVITE server transaction ".concat(e.id,".")),!e.lastProvisionalResponse)throw new Error("Last provisional response undefined.");e.send(e.lastProvisionalResponse).catch((function(t){e.logTransportError(t,"Failed to send retransmission of provisional response.")}))}),jt.PROVISIONAL_RESPONSE_INTERVAL))}},{key:"stopProgressExtensionTimer",value:function(){void 0!==this.progressExtensionTimer&&(clearInterval(this.progressExtensionTimer),this.progressExtensionTimer=void 0)}},{key:"timer_G",value:function(){}},{key:"timer_H",value:function(){this.logger.debug("Timer H expired for INVITE server transaction ".concat(this.id,".")),this.state===Vt.Completed&&(this.logger.warn("ACK to negative final response was never received, terminating transaction."),this.stateTransition(Vt.Terminated))}},{key:"timer_I",value:function(){this.logger.debug("Timer I expired for INVITE server transaction ".concat(this.id,".")),this.stateTransition(Vt.Terminated)}},{key:"timer_L",value:function(){this.logger.debug("Timer L expired for INVITE server transaction ".concat(this.id,".")),this.state===Vt.Accepted&&this.stateTransition(Vt.Terminated)}}]),i}(Xt),Zt=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){var s;return(0,h.default)(this,i),s=t.call(this,e,n,r,Vt.Trying,"sip.transaction.nict"),s.F=setTimeout((function(){return s.timer_F()}),jt.TIMER_F),s.send(e.toString()).catch((function(e){s.logTransportError(e,"Failed to send initial outgoing request.")})),s}return(0,f.default)(i,[{key:"dispose",value:function(){this.F&&(clearTimeout(this.F),this.F=void 0),this.K&&(clearTimeout(this.K),this.K=void 0),(0,c.default)((0,v.default)(i.prototype),"dispose",this).call(this)}},{key:"kind",get:function(){return"nict"}},{key:"receiveResponse",value:function(e){var t=e.statusCode;if(!t||t<100||t>699)throw new Error("Invalid status code ".concat(t));switch(this.state){case Vt.Trying:if(t>=100&&t<=199)return this.stateTransition(Vt.Proceeding),void(this.user.receiveResponse&&this.user.receiveResponse(e));if(t>=200&&t<=699)return this.stateTransition(Vt.Completed),408===t?void this.onRequestTimeout():void(this.user.receiveResponse&&this.user.receiveResponse(e));break;case Vt.Proceeding:if(t>=100&&t<=199&&this.user.receiveResponse)return this.user.receiveResponse(e);if(t>=200&&t<=699)return this.stateTransition(Vt.Completed),408===t?void this.onRequestTimeout():void(this.user.receiveResponse&&this.user.receiveResponse(e));case Vt.Completed:return;case Vt.Terminated:return;default:throw new Error("Invalid state ".concat(this.state))}var i="Non-INVITE client transaction received unexpected ".concat(t," response while in state ").concat(this.state,".");this.logger.warn(i)}},{key:"onTransportError",value:function(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(Vt.Terminated,!0)}},{key:"typeToString",value:function(){return"non-INVITE client transaction"}},{key:"stateTransition",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=function(){throw new Error("Invalid state transition from ".concat(t.state," to ").concat(e))};switch(e){case Vt.Trying:n();break;case Vt.Proceeding:this.state!==Vt.Trying&&n();break;case Vt.Completed:this.state!==Vt.Trying&&this.state!==Vt.Proceeding&&n();break;case Vt.Terminated:this.state!==Vt.Trying&&this.state!==Vt.Proceeding&&this.state!==Vt.Completed&&(i||n());break;default:n()}e===Vt.Completed&&(this.F&&(clearTimeout(this.F),this.F=void 0),this.K=setTimeout((function(){return t.timer_K()}),jt.TIMER_K)),e===Vt.Terminated&&this.dispose(),this.setState(e)}},{key:"timer_F",value:function(){this.logger.debug("Timer F expired for non-INVITE client transaction ".concat(this.id,".")),this.state!==Vt.Trying&&this.state!==Vt.Proceeding||(this.onRequestTimeout(),this.stateTransition(Vt.Terminated))}},{key:"timer_K",value:function(){this.state===Vt.Completed&&this.stateTransition(Vt.Terminated)}}]),i}(Kt),Qt=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){return(0,h.default)(this,i),t.call(this,e,n,r,Vt.Trying,"sip.transaction.nist")}return(0,f.default)(i,[{key:"dispose",value:function(){this.J&&(clearTimeout(this.J),this.J=void 0),(0,c.default)((0,v.default)(i.prototype),"dispose",this).call(this)}},{key:"kind",get:function(){return"nist"}},{key:"receiveRequest",value:function(e){var t=this;switch(this.state){case Vt.Trying:break;case Vt.Proceeding:if(!this.lastResponse)throw new Error("Last response undefined.");this.send(this.lastResponse).catch((function(e){t.logTransportError(e,"Failed to send retransmission of provisional response.")}));break;case Vt.Completed:if(!this.lastResponse)throw new Error("Last response undefined.");this.send(this.lastResponse).catch((function(e){t.logTransportError(e,"Failed to send retransmission of final response.")}));break;case Vt.Terminated:break;default:throw new Error("Invalid state ".concat(this.state))}}},{key:"receiveResponse",value:function(e,t){var i=this;if(e<100||e>699)throw new Error("Invalid status code ".concat(e));if(e>100&&e<=199)throw new Error("Provisional response other than 100 not allowed.");switch(this.state){case Vt.Trying:if(this.lastResponse=t,e>=100&&e<200)return this.stateTransition(Vt.Proceeding),void this.send(t).catch((function(e){i.logTransportError(e,"Failed to send provisional response.")}));if(e>=200&&e<=699)return this.stateTransition(Vt.Completed),void this.send(t).catch((function(e){i.logTransportError(e,"Failed to send final response.")}));break;case Vt.Proceeding:if(this.lastResponse=t,e>=200&&e<=699)return this.stateTransition(Vt.Completed),void this.send(t).catch((function(e){i.logTransportError(e,"Failed to send final response.")}));break;case Vt.Completed:return;case Vt.Terminated:break;default:throw new Error("Invalid state ".concat(this.state))}var n="Non-INVITE server transaction received unexpected ".concat(e," response from TU while in state ").concat(this.state,".");throw this.logger.error(n),new Error(n)}},{key:"onTransportError",value:function(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(Vt.Terminated,!0)}},{key:"typeToString",value:function(){return"non-INVITE server transaction"}},{key:"stateTransition",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=function(){throw new Error("Invalid state transition from ".concat(t.state," to ").concat(e))};switch(e){case Vt.Trying:n();break;case Vt.Proceeding:this.state!==Vt.Trying&&n();break;case Vt.Completed:this.state!==Vt.Trying&&this.state!==Vt.Proceeding&&n();break;case Vt.Terminated:this.state!==Vt.Proceeding&&this.state!==Vt.Completed&&(i||n());break;default:n()}e===Vt.Completed&&(this.J=setTimeout((function(){return t.timer_J()}),jt.TIMER_J)),e===Vt.Terminated&&this.dispose(),this.setState(e)}},{key:"timer_J",value:function(){this.logger.debug("Timer J expired for NON-INVITE server transaction ".concat(this.id,".")),this.state===Vt.Completed&&this.stateTransition(Vt.Terminated)}}]),i}(Xt),ei=function(){function e(t,i,n,r){(0,h.default)(this,e),this.transactionConstructor=t,this.core=i,this.message=n,this.delegate=r,this.challenged=!1,this.stale=!1,this.logger=this.loggerFactory.getLogger("sip.user-agent-client"),this.init()}return(0,f.default)(e,[{key:"dispose",value:function(){this.transaction.dispose()}},{key:"loggerFactory",get:function(){return this.core.loggerFactory}},{key:"transaction",get:function(){if(!this._transaction)throw new Error("Transaction undefined.");return this._transaction}},{key:"cancel",value:function(t){var i=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.transaction)throw new Error("Transaction undefined.");if(!this.message.to)throw new Error("To undefined.");if(!this.message.from)throw new Error("From undefined.");var r=this.core.makeOutgoingRequestMessage(lt.CANCEL,this.message.ruri,this.message.from.uri,this.message.to.uri,{toTag:this.message.toTag,fromTag:this.message.fromTag,callId:this.message.callId,cseq:this.message.cseq},n.extraHeaders);if(r.branch=this.message.branch,this.message.headers.Route&&(r.headers.Route=this.message.headers.Route),t&&r.setHeader("Reason",t),this.transaction.state===Vt.Proceeding)new e(Zt,this.core,r);else this.transaction.once("stateChanged",(function(){if(i.transaction&&i.transaction.state===Vt.Proceeding)new e(Zt,i.core,r)}));return r}},{key:"authenticationGuard",value:function(e){var t,i,n=e.statusCode;if(!n)throw new Error("Response status code undefined.");if(401!==n&&407!==n)return!0;if(401===n?(t=e.parseHeader("www-authenticate"),i="authorization"):(t=e.parseHeader("proxy-authenticate"),i="proxy-authorization"),!t)return this.logger.warn(n+" with wrong or missing challenge, cannot authenticate"),!0;if(this.challenged&&(this.stale||!0!==t.stale))return this.logger.warn(n+" apparently in authentication loop, cannot authenticate"),!0;if(!this.credentials&&(this.credentials=this.core.configuration.authenticationFactory(),!this.credentials))return this.logger.warn("Unable to obtain credentials, cannot authenticate"),!0;if(!this.credentials.authenticate(this.message,t))return!0;this.challenged=!0,t.stale&&(this.stale=!0);var r=this.message.cseq+=1;return this.message.setHeader("cseq",r+" "+this.message.method),this.message.setHeader(i,this.credentials.toString()),this.init(),!1}},{key:"onRequestTimeout",value:function(){this.logger.warn("User agent client request timed out. Generating internal 408 Request Timeout.");var e=new Et;e.statusCode=408,e.reasonPhrase="Request Timeout",this.receiveResponse(e)}},{key:"onTransportError",value:function(e){this.logger.error(e.message),this.logger.error("User agent client request transport error. Generating internal 503 Service Unavailable.");var t=new Et;t.statusCode=503,t.reasonPhrase="Service Unavailable",this.receiveResponse(t)}},{key:"receiveResponse",value:function(e){if(this.authenticationGuard(e)){var t=e.statusCode?e.statusCode.toString():"";if(!t)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(t):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:e});break;case/^1[0-9]{2}$/.test(t):this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:e});break;case/^2[0-9]{2}$/.test(t):this.delegate&&this.delegate.onAccept&&this.delegate.onAccept({message:e});break;case/^3[0-9]{2}$/.test(t):this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:e});break;case/^[4-6][0-9]{2}$/.test(t):this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:e});break;default:throw new Error("Invalid status code ".concat(t))}}}},{key:"init",value:function(){var e=this,t={loggerFactory:this.loggerFactory,onRequestTimeout:function(){return e.onRequestTimeout()},onStateChange:function(t){t===Vt.Terminated&&(e.core.userAgentClients.delete(n),i===e._transaction&&e.dispose())},onTransportError:function(t){return e.onTransportError(t)},receiveResponse:function(t){return e.receiveResponse(t)}},i=new this.transactionConstructor(this.message,this.core.transport,t);this._transaction=i;var n=i.id+i.request.method;this.core.userAgentClients.set(n,this)}}]),e}(),ti=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){var s;(0,h.default)(this,i);var a=e.createOutgoingRequestMessage(lt.BYE,r);return s=t.call(this,Zt,e.userAgentCore,a,n),e.dispose(),s}return(0,f.default)(i)}(ei),ii=function(){function e(t,i,n,r){(0,h.default)(this,e),this.transactionConstructor=t,this.core=i,this.message=n,this.delegate=r,this.logger=this.loggerFactory.getLogger("sip.user-agent-server"),this.toTag=n.toTag?n.toTag:St(),this.init()}return(0,f.default)(e,[{key:"dispose",value:function(){this.transaction.dispose()}},{key:"loggerFactory",get:function(){return this.core.loggerFactory}},{key:"transaction",get:function(){if(!this._transaction)throw new Error("Transaction undefined.");return this._transaction}},{key:"accept",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{statusCode:200};if(!this.acceptable)throw new zt("".concat(this.message.method," not acceptable in state ").concat(this.transaction.state,"."));var t=e.statusCode;if(t<200||t>299)throw new TypeError("Invalid statusCode: ".concat(t));var i=this.reply(e);return i}},{key:"progress",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{statusCode:180};if(!this.progressable)throw new zt("".concat(this.message.method," not progressable in state ").concat(this.transaction.state,"."));var t=e.statusCode;if(t<101||t>199)throw new TypeError("Invalid statusCode: ".concat(t));var i=this.reply(e);return i}},{key:"redirect",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{statusCode:302};if(!this.redirectable)throw new zt("".concat(this.message.method," not redirectable in state ").concat(this.transaction.state,"."));var i=t.statusCode;if(i<300||i>399)throw new TypeError("Invalid statusCode: ".concat(i));var n=new Array;e.forEach((function(e){return n.push("Contact: ".concat(e.toString()))})),t.extraHeaders=(t.extraHeaders||[]).concat(n);var r=this.reply(t);return r}},{key:"reject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{statusCode:480};if(!this.rejectable)throw new zt("".concat(this.message.method," not rejectable in state ").concat(this.transaction.state,"."));var t=e.statusCode;if(t<400||t>699)throw new TypeError("Invalid statusCode: ".concat(t));var i=this.reply(e);return i}},{key:"trying",value:function(e){if(!this.tryingable)throw new zt("".concat(this.message.method," not tryingable in state ").concat(this.transaction.state,"."));var t=this.reply({statusCode:100});return t}},{key:"receiveCancel",value:function(e){this.delegate&&this.delegate.onCancel&&this.delegate.onCancel(e)}},{key:"acceptable",get:function(){if(this.transaction instanceof Yt)return this.transaction.state===Vt.Proceeding||this.transaction.state===Vt.Accepted;if(this.transaction instanceof Qt)return this.transaction.state===Vt.Trying||this.transaction.state===Vt.Proceeding;throw new Error("Unknown transaction type.")}},{key:"progressable",get:function(){if(this.transaction instanceof Yt)return this.transaction.state===Vt.Proceeding;if(this.transaction instanceof Qt)return!1;throw new Error("Unknown transaction type.")}},{key:"redirectable",get:function(){if(this.transaction instanceof Yt)return this.transaction.state===Vt.Proceeding;if(this.transaction instanceof Qt)return this.transaction.state===Vt.Trying||this.transaction.state===Vt.Proceeding;throw new Error("Unknown transaction type.")}},{key:"rejectable",get:function(){if(this.transaction instanceof Yt)return this.transaction.state===Vt.Proceeding;if(this.transaction instanceof Qt)return this.transaction.state===Vt.Trying||this.transaction.state===Vt.Proceeding;throw new Error("Unknown transaction type.")}},{key:"tryingable",get:function(){if(this.transaction instanceof Yt)return this.transaction.state===Vt.Proceeding;if(this.transaction instanceof Qt)return this.transaction.state===Vt.Trying;throw new Error("Unknown transaction type.")}},{key:"reply",value:function(e){e.toTag||100===e.statusCode||(e.toTag=this.toTag),e.userAgent=e.userAgent||this.core.configuration.userAgentHeaderFieldValue,e.supported=e.supported||this.core.configuration.supportedOptionTagsResponse;var t=Nt(this.message,e);return this.transaction.receiveResponse(e.statusCode,t.message),t}},{key:"init",value:function(){var e=this,t={loggerFactory:this.loggerFactory,onStateChange:function(t){t===Vt.Terminated&&(e.core.userAgentServers.delete(n),e.dispose())},onTransportError:function(t){e.logger.error(t.message),e.delegate&&e.delegate.onTransportError?e.delegate.onTransportError(t):e.logger.error("User agent server response transport error.")}},i=new this.transactionConstructor(this.message,this.core.transport,t);this._transaction=i;var n=i.id;this.core.userAgentServers.set(i.id,this)}}]),e}(),ni=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){return(0,h.default)(this,i),t.call(this,Qt,e.userAgentCore,n,r)}return(0,f.default)(i)}(ii),ri=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){(0,h.default)(this,i);var s=e.createOutgoingRequestMessage(lt.INFO,r);return t.call(this,Zt,e.userAgentCore,s,n)}return(0,f.default)(i)}(ei),si=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){return(0,h.default)(this,i),t.call(this,Qt,e.userAgentCore,n,r)}return(0,f.default)(i)}(ii),ai=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){(0,h.default)(this,i);var s=e.createOutgoingRequestMessage(lt.NOTIFY,r);return t.call(this,Zt,e.userAgentCore,s,n)}return(0,f.default)(i)}(ei),oi=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){(0,h.default)(this,i);var s=function(e){return void 0!==e.userAgentCore}(e)?e.userAgentCore:e;return t.call(this,Qt,s,n,r)}return(0,f.default)(i)}(ii);var ci=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){var s;(0,h.default)(this,i);var a=e.createOutgoingRequestMessage(lt.PRACK,r);return s=t.call(this,Zt,e.userAgentCore,a,n),e.signalingStateTransition(a),s}return(0,f.default)(i)}(ei),ui=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){var s;return(0,h.default)(this,i),s=t.call(this,Qt,e.userAgentCore,n,r),e.signalingStateTransition(n),s.dialog=e,s}return(0,f.default)(i,[{key:"accept",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{statusCode:200};return e.body&&this.dialog.signalingStateTransition(e.body),(0,c.default)((0,v.default)(i.prototype),"accept",this).call(this,e)}}]),i}(ii),li=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){var s;(0,h.default)(this,i);var a=e.createOutgoingRequestMessage(lt.INVITE,r);return s=t.call(this,Jt,e.userAgentCore,a,n),s.delegate=n,e.signalingStateTransition(a),e.reinviteUserAgentClient=(0,u.default)(s),s.dialog=e,s}return(0,f.default)(i,[{key:"receiveResponse",value:function(e){var t=this,i=e.statusCode?e.statusCode.toString():"";if(!i)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(i):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:e});break;case/^1[0-9]{2}$/.test(i):this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:e,session:this.dialog,prack:function(e){throw new Error("Unimplemented.")}});break;case/^2[0-9]{2}$/.test(i):this.dialog.signalingStateTransition(e),this.delegate&&this.delegate.onAccept&&this.delegate.onAccept({message:e,session:this.dialog,ack:function(e){var i=t.dialog.ack(e);return i}});break;case/^3[0-9]{2}$/.test(i):this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentClient=void 0,this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:e});break;case/^[4-6][0-9]{2}$/.test(i):this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentClient=void 0,this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:e});break;default:throw new Error("Invalid status code ".concat(i))}}}]),i}(ei),di=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){var s;return(0,h.default)(this,i),s=t.call(this,Yt,e.userAgentCore,n,r),e.reinviteUserAgentServer=(0,u.default)(s),s.dialog=e,s}return(0,f.default)(i,[{key:"accept",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{statusCode:200};e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(this.dialog.routeSet.map((function(e){return"Record-Route: ".concat(e)})));var t=(0,c.default)((0,v.default)(i.prototype),"accept",this).call(this,e),n=this.dialog,r=Object.assign(Object.assign({},t),{session:n});return e.body&&this.dialog.signalingStateTransition(e.body),this.dialog.reConfirm(),r}},{key:"progress",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{statusCode:180},t=(0,c.default)((0,v.default)(i.prototype),"progress",this).call(this,e),n=this.dialog,r=Object.assign(Object.assign({},t),{session:n});return e.body&&this.dialog.signalingStateTransition(e.body),r}},{key:"redirect",value:function(e){throw this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentServer=void 0,new Error("Unimplemented.")}},{key:"reject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{statusCode:488};return this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentServer=void 0,(0,c.default)((0,v.default)(i.prototype),"reject",this).call(this,e)}}]),i}(ii),hi=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){(0,h.default)(this,i);var s=e.createOutgoingRequestMessage(lt.REFER,r);return t.call(this,Zt,e.userAgentCore,s,n)}return(0,f.default)(i)}(ei),fi=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){(0,h.default)(this,i);var s=function(e){return void 0!==e.userAgentCore}(e)?e.userAgentCore:e;return t.call(this,Qt,s,n,r)}return(0,f.default)(i)}(ii);var gi,pi=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r,s){var a;return(0,h.default)(this,i),a=t.call(this,n,r),a.initialTransaction=e,a._signalingState=Lt.Initial,a.ackWait=!1,a.delegate=s,e instanceof Yt&&(a.ackWait=!0),a.early||a.start2xxRetransmissionTimer(),a.signalingStateTransition(e.request),a.logger=n.loggerFactory.getLogger("sip.invite-dialog"),a.logger.log("INVITE dialog ".concat(a.id," constructed")),a}return(0,f.default)(i,[{key:"dispose",value:function(){(0,c.default)((0,v.default)(i.prototype),"dispose",this).call(this),this._signalingState=Lt.Closed,this._offer=void 0,this._answer=void 0,this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.logger.log("INVITE dialog ".concat(this.id," destroyed"))}},{key:"sessionState",get:function(){return this.early?Bt.Early:this.ackWait?Bt.AckWait:this._signalingState===Lt.Closed?Bt.Terminated:Bt.Confirmed}},{key:"signalingState",get:function(){return this._signalingState}},{key:"offer",get:function(){return this._offer}},{key:"answer",get:function(){return this._answer}},{key:"confirm",value:function(){this.early&&this.start2xxRetransmissionTimer(),(0,c.default)((0,v.default)(i.prototype),"confirm",this).call(this)}},{key:"reConfirm",value:function(){this.reinviteUserAgentServer&&this.startReInvite2xxRetransmissionTimer()}},{key:"ack",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.logger.log("INVITE dialog ".concat(this.id," sending ACK request")),this.reinviteUserAgentClient){if(!(this.reinviteUserAgentClient.transaction instanceof Jt))throw new Error("Transaction not instance of InviteClientTransaction.");e=this.reinviteUserAgentClient.transaction,this.reinviteUserAgentClient=void 0}else{if(!(this.initialTransaction instanceof Jt))throw new Error("Initial transaction not instance of InviteClientTransaction.");e=this.initialTransaction}t.cseq=e.request.cseq;var i=this.createOutgoingRequestMessage(lt.ACK,t);return e.ackResponse(i),this.signalingStateTransition(i),{message:i}}},{key:"bye",value:function(e,t){if(this.logger.log("INVITE dialog ".concat(this.id," sending BYE request")),this.initialTransaction instanceof Yt){if(this.early)throw new Error("UAS MUST NOT send a BYE on early dialogs.");if(this.ackWait&&this.initialTransaction.state!==Vt.Terminated)throw new Error("UAS MUST NOT send a BYE on a confirmed dialog until it has received an ACK for its 2xx response or until the server transaction times out.")}return new ti(this,e,t)}},{key:"info",value:function(e,t){if(this.logger.log("INVITE dialog ".concat(this.id," sending INFO request")),this.early)throw new Error("Dialog not confirmed.");return new ri(this,e,t)}},{key:"invite",value:function(e,t){if(this.logger.log("INVITE dialog ".concat(this.id," sending INVITE request")),this.early)throw new Error("Dialog not confirmed.");if(this.reinviteUserAgentClient)throw new Error("There is an ongoing re-INVITE client transaction.");if(this.reinviteUserAgentServer)throw new Error("There is an ongoing re-INVITE server transaction.");return new li(this,e,t)}},{key:"notify",value:function(e,t){if(this.logger.log("INVITE dialog ".concat(this.id," sending NOTIFY request")),this.early)throw new Error("Dialog not confirmed.");return new ai(this,e,t)}},{key:"prack",value:function(e,t){return this.logger.log("INVITE dialog ".concat(this.id," sending PRACK request")),new ci(this,e,t)}},{key:"refer",value:function(e,t){if(this.logger.log("INVITE dialog ".concat(this.id," sending REFER request")),this.early)throw new Error("Dialog not confirmed.");return new hi(this,e,t)}},{key:"receiveRequest",value:function(e){if(this.logger.log("INVITE dialog ".concat(this.id," received ").concat(e.method," request")),e.method===lt.ACK){if(this.ackWait){if(this.initialTransaction instanceof Jt)return void this.logger.warn("INVITE dialog ".concat(this.id," received unexpected ").concat(e.method," request, dropping."));if(this.initialTransaction.request.cseq!==e.cseq)return void this.logger.warn("INVITE dialog ".concat(this.id," received unexpected ").concat(e.method," request, dropping."));this.ackWait=!1}else{if(!this.reinviteUserAgentServer)return void this.logger.warn("INVITE dialog ".concat(this.id," received unexpected ").concat(e.method," request, dropping."));if(this.reinviteUserAgentServer.transaction.request.cseq!==e.cseq)return void this.logger.warn("INVITE dialog ".concat(this.id," received unexpected ").concat(e.method," request, dropping."));this.reinviteUserAgentServer=void 0}return this.signalingStateTransition(e),void(this.delegate&&this.delegate.onAck&&this.delegate.onAck({message:e}))}if(this.sequenceGuard(e)){if(e.method===lt.INVITE){if(this.reinviteUserAgentServer){var t=Math.floor(10*Math.random())+1,n=["Retry-After: ".concat(t)];return void this.core.replyStateless(e,{statusCode:500,extraHeaders:n})}if(this.reinviteUserAgentClient)return void this.core.replyStateless(e,{statusCode:491})}if((0,c.default)((0,v.default)(i.prototype),"receiveRequest",this).call(this,e),e.method===lt.INVITE){var r=e.parseHeader("contact");if(!r)throw new Error("Contact undefined.");if(!(r instanceof ft))throw new Error("Contact not instance of NameAddrHeader.");this.dialogState.remoteTarget=r.uri}switch(e.method){case lt.BYE:var s=new ni(this,e);this.delegate&&this.delegate.onBye?this.delegate.onBye(s):s.accept(),this.dispose();break;case lt.INFO:var a=new si(this,e);this.delegate&&this.delegate.onInfo?this.delegate.onInfo(a):a.reject({statusCode:469,extraHeaders:["Recv-Info :"]});break;case lt.INVITE:var o=new di(this,e);this.signalingStateTransition(e),this.delegate&&this.delegate.onInvite?this.delegate.onInvite(o):o.reject({statusCode:488});break;case lt.NOTIFY:var u=new oi(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(u):u.accept();break;case lt.PRACK:var l=new ui(this,e);this.delegate&&this.delegate.onPrack?this.delegate.onPrack(l):l.accept();break;case lt.REFER:var d=new fi(this,e);this.delegate&&this.delegate.onRefer?this.delegate.onRefer(d):d.reject();break;default:this.logger.log("INVITE dialog ".concat(this.id," received unimplemented ").concat(e.method," request")),this.core.replyStateless(e,{statusCode:501});break}}else this.logger.log("INVITE dialog ".concat(this.id," rejected out of order ").concat(e.method," request."))}},{key:"reliableSequenceGuard",value:function(e){var t=e.statusCode;if(!t)throw new Error("Status code undefined");if(t>100&&t<200){var i=e.getHeader("require"),n=e.getHeader("rseq"),r=i&&i.includes("100rel")&&n?Number(n):void 0;if(r){if(this.rseq&&this.rseq+1!==r)return!1;this.rseq||(this.rseq=r)}}return!0}},{key:"signalingStateRollback",value:function(){this._signalingState!==Lt.HaveLocalOffer&&this.signalingState!==Lt.HaveRemoteOffer||this._rollbackOffer&&this._rollbackAnswer&&(this._signalingState=Lt.Stable,this._offer=this._rollbackOffer,this._answer=this._rollbackAnswer)}},{key:"signalingStateTransition",value:function(e){var t=Pt(e);if(t&&"session"===t.contentDisposition){if(this._signalingState===Lt.Stable&&(this._rollbackOffer=this._offer,this._rollbackAnswer=this._answer),e instanceof bt)switch(this._signalingState){case Lt.Initial:case Lt.Stable:this._signalingState=Lt.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case Lt.HaveLocalOffer:this._signalingState=Lt.Stable,this._answer=t;break;case Lt.HaveRemoteOffer:break;case Lt.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof Et)switch(this._signalingState){case Lt.Initial:case Lt.Stable:this._signalingState=Lt.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case Lt.HaveLocalOffer:this._signalingState=Lt.Stable,this._answer=t;break;case Lt.HaveRemoteOffer:break;case Lt.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof Tt)switch(this._signalingState){case Lt.Initial:case Lt.Stable:this._signalingState=Lt.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case Lt.HaveLocalOffer:break;case Lt.HaveRemoteOffer:this._signalingState=Lt.Stable,this._answer=t;break;case Lt.Closed:break;default:throw new Error("Unexpected signaling state.")}if(Rt(e))switch(this._signalingState){case Lt.Initial:case Lt.Stable:this._signalingState=Lt.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case Lt.HaveLocalOffer:break;case Lt.HaveRemoteOffer:this._signalingState=Lt.Stable,this._answer=t;break;case Lt.Closed:break;default:throw new Error("Unexpected signaling state.")}}}},{key:"start2xxRetransmissionTimer",value:function(){var e=this;if(this.initialTransaction instanceof Yt){var t=this.initialTransaction,i=jt.T1;this.invite2xxTimer=setTimeout((function n(){e.ackWait?(e.logger.log("No ACK for 2xx response received, attempting retransmission"),t.retransmitAcceptedResponse(),i=Math.min(2*i,jt.T2),e.invite2xxTimer=setTimeout(n,i)):e.invite2xxTimer=void 0}),i);t.addListener("stateChanged",(function i(){t.state===Vt.Terminated&&(t.removeListener("stateChanged",i),e.invite2xxTimer&&(clearTimeout(e.invite2xxTimer),e.invite2xxTimer=void 0),e.ackWait&&(e.delegate&&e.delegate.onAckTimeout?e.delegate.onAckTimeout():e.bye()))}))}}},{key:"startReInvite2xxRetransmissionTimer",value:function(){var e=this;if(this.reinviteUserAgentServer&&this.reinviteUserAgentServer.transaction instanceof Yt){var t=this.reinviteUserAgentServer.transaction,i=jt.T1;this.invite2xxTimer=setTimeout((function n(){e.reinviteUserAgentServer?(e.logger.log("No ACK for 2xx response received, attempting retransmission"),t.retransmitAcceptedResponse(),i=Math.min(2*i,jt.T2),e.invite2xxTimer=setTimeout(n,i)):e.invite2xxTimer=void 0}),i);t.addListener("stateChanged",(function i(){t.state===Vt.Terminated&&(t.removeListener("stateChanged",i),e.invite2xxTimer&&(clearTimeout(e.invite2xxTimer),e.invite2xxTimer=void 0),e.reinviteUserAgentServer)}))}}}]),i}(Ht);(function(e){e["Initial"]="Initial",e["NotifyWait"]="NotifyWait",e["Pending"]="Pending",e["Active"]="Active",e["Terminated"]="Terminated"})(gi||(gi={}));var vi,mi=[lt.ACK,lt.BYE,lt.CANCEL,lt.INFO,lt.INVITE,lt.MESSAGE,lt.NOTIFY,lt.OPTIONS,lt.PRACK,lt.REFER,lt.REGISTER,lt.SUBSCRIBE],yi=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){var s;(0,h.default)(this,i);var a=e.createOutgoingRequestMessage(lt.SUBSCRIBE,r);return s=t.call(this,Zt,e.userAgentCore,a,n),s.dialog=e,s}return(0,f.default)(i,[{key:"waitNotifyStop",value:function(){}},{key:"receiveResponse",value:function(e){if(e.statusCode&&e.statusCode>=200&&e.statusCode<300){var t=e.getHeader("Expires");if(t){var n=Number(t);this.dialog.subscriptionExpires>n&&(this.dialog.subscriptionExpires=n)}else this.logger.warn("Expires header missing in a 200-class response to SUBSCRIBE")}if(e.statusCode&&e.statusCode>=400&&e.statusCode<700){-1!==[404,405,410,416,480,481,482,483,484,485,489,501,604].indexOf(e.statusCode)&&this.dialog.terminate()}(0,c.default)((0,v.default)(i.prototype),"receiveResponse",this).call(this,e)}}]),i}(ei),_i=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r,s,a,o){var c;return(0,h.default)(this,i),c=t.call(this,s,a),c.delegate=o,c._autoRefresh=!1,c._subscriptionEvent=e,c._subscriptionExpires=n,c._subscriptionExpiresInitial=n,c._subscriptionExpiresLastSet=Math.floor(Date.now()/1e3),c._subscriptionRefresh=void 0,c._subscriptionRefreshLastSet=void 0,c._subscriptionState=r,c.logger=s.loggerFactory.getLogger("sip.subscribe-dialog"),c.logger.log("SUBSCRIBE dialog ".concat(c.id," constructed")),c}return(0,f.default)(i,[{key:"dispose",value:function(){(0,c.default)((0,v.default)(i.prototype),"dispose",this).call(this),this.N&&(clearTimeout(this.N),this.N=void 0),this.refreshTimerClear(),this.logger.log("SUBSCRIBE dialog ".concat(this.id," destroyed"))}},{key:"autoRefresh",get:function(){return this._autoRefresh},set:function(e){this._autoRefresh=!0,this.refreshTimerSet()}},{key:"subscriptionEvent",get:function(){return this._subscriptionEvent}},{key:"subscriptionExpires",get:function(){var e=Math.floor(Date.now()/1e3)-this._subscriptionExpiresLastSet,t=this._subscriptionExpires-e;return Math.max(t,0)},set:function(e){if(e<0)throw new Error("Expires must be greater than or equal to zero.");if(this._subscriptionExpires=e,this._subscriptionExpiresLastSet=Math.floor(Date.now()/1e3),this.autoRefresh){var t=this.subscriptionRefresh;(void 0===t||t>=e)&&this.refreshTimerSet()}}},{key:"subscriptionExpiresInitial",get:function(){return this._subscriptionExpiresInitial}},{key:"subscriptionRefresh",get:function(){if(void 0!==this._subscriptionRefresh&&void 0!==this._subscriptionRefreshLastSet){var e=Math.floor(Date.now()/1e3)-this._subscriptionRefreshLastSet,t=this._subscriptionRefresh-e;return Math.max(t,0)}}},{key:"subscriptionState",get:function(){return this._subscriptionState}},{key:"receiveRequest",value:function(e){if(this.logger.log("SUBSCRIBE dialog ".concat(this.id," received ").concat(e.method," request")),this.sequenceGuard(e))switch((0,c.default)((0,v.default)(i.prototype),"receiveRequest",this).call(this,e),e.method){case lt.NOTIFY:this.onNotify(e);break;default:this.logger.log("SUBSCRIBE dialog ".concat(this.id," received unimplemented ").concat(e.method," request")),this.core.replyStateless(e,{statusCode:501});break}else this.logger.log("SUBSCRIBE dialog ".concat(this.id," rejected out of order ").concat(e.method," request."))}},{key:"refresh",value:function(){var e="Allow: "+mi.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: "+this.subscriptionExpiresInitial),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}},{key:"subscribe",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.subscriptionState!==gi.Pending&&this.subscriptionState!==gi.Active)throw new Error("Invalid state ".concat(this.subscriptionState,'. May only re-subscribe while in state "pending" or "active".'));this.logger.log("SUBSCRIBE dialog ".concat(this.id," sending SUBSCRIBE request"));var n=new yi(this,e,i);return this.N=setTimeout((function(){return t.timer_N()}),jt.TIMER_N),n}},{key:"terminate",value:function(){this.stateTransition(gi.Terminated),this.onTerminated()}},{key:"unsubscribe",value:function(){var e="Allow: "+mi.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: 0"),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}},{key:"onNotify",value:function(e){var t=e.parseHeader("Event").event;if(t&&t===this.subscriptionEvent){this.N&&(clearTimeout(this.N),this.N=void 0);var i=e.parseHeader("Subscription-State");if(i&&i.state){var n=i.state,r=i.expires?Math.max(i.expires,0):void 0;switch(n){case"pending":this.stateTransition(gi.Pending,r);break;case"active":this.stateTransition(gi.Active,r);break;case"terminated":this.stateTransition(gi.Terminated,r);break;default:this.logger.warn("Unrecognized subscription state.");break}var s=new oi(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(s):s.accept()}else this.core.replyStateless(e,{statusCode:489})}else this.core.replyStateless(e,{statusCode:489})}},{key:"onRefresh",value:function(e){this.delegate&&this.delegate.onRefresh&&this.delegate.onRefresh(e)}},{key:"onTerminated",value:function(){this.delegate&&this.delegate.onTerminated&&this.delegate.onTerminated()}},{key:"refreshTimerClear",value:function(){this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=void 0)}},{key:"refreshTimerSet",value:function(){var e=this;if(this.refreshTimerClear(),this.autoRefresh&&this.subscriptionExpires>0){var t=900*this.subscriptionExpires;this._subscriptionRefresh=Math.floor(t/1e3),this._subscriptionRefreshLastSet=Math.floor(Date.now()/1e3),this.refreshTimer=setTimeout((function(){e.refreshTimer=void 0,e._subscriptionRefresh=void 0,e._subscriptionRefreshLastSet=void 0,e.onRefresh(e.refresh())}),t)}}},{key:"stateTransition",value:function(e,t){var i=this,n=function(){i.logger.warn("Invalid subscription state transition from ".concat(i.subscriptionState," to ").concat(e))};switch(e){case gi.Initial:return void n();case gi.NotifyWait:return void n();case gi.Pending:if(this.subscriptionState!==gi.NotifyWait&&this.subscriptionState!==gi.Pending)return void n();break;case gi.Active:if(this.subscriptionState!==gi.NotifyWait&&this.subscriptionState!==gi.Pending&&this.subscriptionState!==gi.Active)return void n();break;case gi.Terminated:if(this.subscriptionState!==gi.NotifyWait&&this.subscriptionState!==gi.Pending&&this.subscriptionState!==gi.Active)return void n();break;default:return void n()}e===gi.Pending&&t&&(this.subscriptionExpires=t),e===gi.Active&&t&&(this.subscriptionExpires=t),e===gi.Terminated&&this.dispose(),this._subscriptionState=e}},{key:"timer_N",value:function(){this.subscriptionState!==gi.Terminated&&(this.stateTransition(gi.Terminated),this.onTerminated())}}],[{key:"initialDialogStateForSubscription",value:function(e,t){var i=t.getHeaders("record-route"),n=t.parseHeader("contact");if(!n)throw new Error("Contact undefined.");if(!(n instanceof ft))throw new Error("Contact not instance of NameAddrHeader.");var r=n.uri,s=e.cseq,a=e.callId,o=e.fromTag,c=t.fromTag;if(!a)throw new Error("Call id undefined.");if(!o)throw new Error("From tag undefined.");if(!c)throw new Error("To tag undefined.");if(!e.from)throw new Error("From undefined.");if(!e.to)throw new Error("To undefined.");var u=e.from.uri,l=e.to.uri,d={id:a+o+c,early:!1,callId:a,localTag:o,remoteTag:c,localSequenceNumber:s,remoteSequenceNumber:void 0,localURI:u,remoteURI:l,remoteTarget:r,routeSet:i,secure:!1};return d}}]),i}(Ht);(function(e){e[e["error"]=0]="error",e[e["warn"]=1]="warn",e[e["log"]=2]="log",e[e["debug"]=3]="debug"})(vi||(vi={}));var Si=function(){function e(t,i,n){(0,h.default)(this,e),this.logger=t,this.category=i,this.label=n}return(0,f.default)(e,[{key:"error",value:function(e){this.genericLog(vi.error,e)}},{key:"warn",value:function(e){this.genericLog(vi.warn,e)}},{key:"log",value:function(e){this.genericLog(vi.log,e)}},{key:"debug",value:function(e){this.genericLog(vi.debug,e)}},{key:"genericLog",value:function(e,t){this.logger.genericLog(e,this.category,this.label,t)}}]),e}(),Ii=function(){function t(){(0,h.default)(this,t),this.builtinEnabled=!0,this._level=vi.log,this.loggers={},this.logger=this.getLogger("sip:loggerfactory")}return(0,f.default)(t,[{key:"level",get:function(){return this._level},set:function(e){e>=0&&e<=3?this._level=e:e>3?this._level=3:vi.hasOwnProperty(e)?this._level=e:this.logger.error("invalid 'level' parameter value: "+JSON.stringify(e))}},{key:"connector",get:function(){return this._connector},set:function(e){e?"function"===typeof e?this._connector=e:this.logger.error("invalid 'connector' parameter value: "+JSON.stringify(e)):this._connector=void 0}},{key:"getLogger",value:function(e,t){if(t&&3===this.level)return new Si(this,e,t);if(this.loggers[e])return this.loggers[e];var i=new Si(this,e);return this.loggers[e]=i,i}},{key:"genericLog",value:function(e,t,i,n){this.level>=e&&this.builtinEnabled&&this.print(e,t,i,n),this.connector&&this.connector(vi[e],t,i,n)}},{key:"print",value:function(t,i,n,r){if("string"===typeof r){var s=[new Date,i];n&&s.push(n),r=s.concat(r).join(" | ")}switch(t){case vi.error:e("error",r," at util/webrtc.js:23382");break;case vi.warn:e("warn",r," at util/webrtc.js:23386");break;case vi.log:e("log",r," at util/webrtc.js:23390");break;case vi.debug:e("log",r," at util/webrtc.js:23394");break;default:break}}}]),t}(),wi=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){var s;return(0,h.default)(this,i),s=t.call(this,Jt,e,n,r),s.confirmedDialogAcks=new Map,s.confirmedDialogs=new Map,s.earlyDialogs=new Map,s.delegate=r,s}return(0,f.default)(i,[{key:"dispose",value:function(){this.earlyDialogs.forEach((function(e){return e.dispose()})),this.earlyDialogs.clear(),(0,c.default)((0,v.default)(i.prototype),"dispose",this).call(this)}},{key:"onTransportError",value:function(e){if(this.transaction.state===Vt.Calling)return(0,c.default)((0,v.default)(i.prototype),"onTransportError",this).call(this,e);this.logger.error(e.message),this.logger.error("User agent client request transport error while sending ACK.")}},{key:"receiveResponse",value:function(e){var t=this;if(this.authenticationGuard(e)){var i=e.statusCode?e.statusCode.toString():"";if(!i)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(i):return void(this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:e}));case/^1[0-9]{2}$/.test(i):if(!e.toTag)return void this.logger.warn("Non-100 1xx INVITE response received without a to tag, dropping.");var n=Ht.initialDialogStateForUserAgentClient(this.message,e),r=this.earlyDialogs.get(n.id);if(!r){var s=this.transaction;if(!(s instanceof Jt))throw new Error("Transaction not instance of InviteClientTransaction.");r=new pi(s,this.core,n),this.earlyDialogs.set(r.id,r)}if(!r.reliableSequenceGuard(e))return void this.logger.warn("1xx INVITE reliable response received out of order, dropping.");r.signalingState!==Lt.Initial&&r.signalingState!==Lt.HaveLocalOffer||r.signalingStateTransition(e);var a=r;return void(this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:e,session:a,prack:function(e){var t=a.prack(void 0,e);return t}}));case/^2[0-9]{2}$/.test(i):var o=Ht.initialDialogStateForUserAgentClient(this.message,e),c=this.confirmedDialogs.get(o.id);if(c){var u=this.confirmedDialogAcks.get(o.id);if(u){var l=this.transaction;if(!(l instanceof Jt))throw new Error("Client transaction not instance of InviteClientTransaction.");l.ackResponse(u.message)}return}if(c=this.earlyDialogs.get(o.id),c)c.confirm(),c.recomputeRouteSet(e),this.earlyDialogs.delete(c.id),this.confirmedDialogs.set(c.id,c);else{var d=this.transaction;if(!(d instanceof Jt))throw new Error("Transaction not instance of InviteClientTransaction.");c=new pi(d,this.core,o),this.confirmedDialogs.set(c.id,c)}c.signalingState!==Lt.Initial&&c.signalingState!==Lt.HaveLocalOffer||c.signalingStateTransition(e);var h=c;if(this.delegate&&this.delegate.onAccept)this.delegate.onAccept({message:e,session:h,ack:function(e){var i=h.ack(e);return t.confirmedDialogAcks.set(h.id,i),i}});else{var f=h.ack();this.confirmedDialogAcks.set(h.id,f)}return;case/^3[0-9]{2}$/.test(i):return this.earlyDialogs.forEach((function(e){return e.dispose()})),this.earlyDialogs.clear(),void(this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:e}));case/^[4-6][0-9]{2}$/.test(i):return this.earlyDialogs.forEach((function(e){return e.dispose()})),this.earlyDialogs.clear(),void(this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:e}));default:throw new Error("Invalid status code ".concat(i))}}}}]),i}(ei),ki=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){var s;return(0,h.default)(this,i),s=t.call(this,Yt,e,n,r),s.core=e,s}return(0,f.default)(i,[{key:"dispose",value:function(){this.earlyDialog&&this.earlyDialog.dispose(),(0,c.default)((0,v.default)(i.prototype),"dispose",this).call(this)}},{key:"accept",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{statusCode:200};if(!this.acceptable)throw new zt("".concat(this.message.method," not acceptable in state ").concat(this.transaction.state,"."));if(!this.confirmedDialog)if(this.earlyDialog)this.earlyDialog.confirm(),this.confirmedDialog=this.earlyDialog,this.earlyDialog=void 0;else{var t=this.transaction;if(!(t instanceof Yt))throw new Error("Transaction not instance of InviteClientTransaction.");var n=Ht.initialDialogStateForUserAgentServer(this.message,this.toTag);this.confirmedDialog=new pi(t,this.core,n)}var r=this.message.getHeaders("record-route").map((function(e){return"Record-Route: ".concat(e)})),s="Contact: ".concat(this.core.configuration.contact.toString()),a="Allow: "+mi.toString();if(!e.body)if(this.confirmedDialog.signalingState===Lt.Stable)e.body=this.confirmedDialog.answer;else if(this.confirmedDialog.signalingState===Lt.Initial||this.confirmedDialog.signalingState===Lt.HaveRemoteOffer)throw new Error("Response must have a body.");e.statusCode=e.statusCode||200,e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(r),e.extraHeaders.push(a),e.extraHeaders.push(s);var o=(0,c.default)((0,v.default)(i.prototype),"accept",this).call(this,e),u=this.confirmedDialog,l=Object.assign(Object.assign({},o),{session:u});return e.body&&this.confirmedDialog.signalingState!==Lt.Stable&&this.confirmedDialog.signalingStateTransition(e.body),l}},{key:"progress",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{statusCode:180};if(!this.progressable)throw new zt("".concat(this.message.method," not progressable in state ").concat(this.transaction.state,"."));if(!this.earlyDialog){var t=this.transaction;if(!(t instanceof Yt))throw new Error("Transaction not instance of InviteClientTransaction.");var n=Ht.initialDialogStateForUserAgentServer(this.message,this.toTag,!0);this.earlyDialog=new pi(t,this.core,n)}var r=this.message.getHeaders("record-route").map((function(e){return"Record-Route: ".concat(e)})),s="Contact: ".concat(this.core.configuration.contact);e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(r),e.extraHeaders.push(s);var a=(0,c.default)((0,v.default)(i.prototype),"progress",this).call(this,e),o=this.earlyDialog,u=Object.assign(Object.assign({},a),{session:o});return e.body&&this.earlyDialog.signalingState!==Lt.Stable&&this.earlyDialog.signalingStateTransition(e.body),u}},{key:"redirect",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{statusCode:302};return(0,c.default)((0,v.default)(i.prototype),"redirect",this).call(this,e,t)}},{key:"reject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{statusCode:486};return(0,c.default)((0,v.default)(i.prototype),"reject",this).call(this,e)}}]),i}(ii),Ci=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){return(0,h.default)(this,i),t.call(this,Zt,e,n,r)}return(0,f.default)(i)}(ei),bi=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){var s;return(0,h.default)(this,i),s=t.call(this,Qt,e,n,r),s.core=e,s}return(0,f.default)(i)}(ii),Ei=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){return(0,h.default)(this,i),t.call(this,Zt,e,n,r)}return(0,f.default)(i)}(ei),Ti=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){return(0,h.default)(this,i),t.call(this,Zt,e,n,r)}return(0,f.default)(i)}(ei),xi=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){var s;return(0,h.default)(this,i),s=t.call(this,Qt,e,n,r),s.core=e,s}return(0,f.default)(i)}(ii),Pi=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){var s;(0,h.default)(this,i);var a=n.getHeader("Event");if(!a)throw new Error("Event undefined");var o=n.getHeader("Expires");if(!o)throw new Error("Expires undefined");return s=t.call(this,Zt,e,n,r),s.delegate=r,s.subscriberId=n.callId+n.fromTag+a,s.subscriptionExpiresRequested=s.subscriptionExpires=Number(o),s.subscriptionEvent=a,s.subscriptionState=gi.NotifyWait,s.waitNotifyStart(),s}return(0,f.default)(i,[{key:"dispose",value:function(){(0,c.default)((0,v.default)(i.prototype),"dispose",this).call(this)}},{key:"onNotify",value:function(e){var t=e.message.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent)return this.logger.warn("Failed to parse event."),void e.reject({statusCode:489});var i=e.message.parseHeader("Subscription-State");if(!i||!i.state)return this.logger.warn("Failed to parse subscription state."),void e.reject({statusCode:489});var n=i.state;switch(n){case"pending":break;case"active":break;case"terminated":break;default:return this.logger.warn("Invalid subscription state ".concat(n)),void e.reject({statusCode:489})}if("terminated"!==n){var r=e.message.parseHeader("contact");if(!r)return this.logger.warn("Failed to parse contact."),void e.reject({statusCode:489})}if(this.dialog)throw new Error("Dialog already created. This implementation only supports install of single subscriptions.");switch(this.waitNotifyStop(),this.subscriptionExpires=i.expires?Math.min(this.subscriptionExpires,Math.max(i.expires,0)):this.subscriptionExpires,n){case"pending":this.subscriptionState=gi.Pending;break;case"active":this.subscriptionState=gi.Active;break;case"terminated":this.subscriptionState=gi.Terminated;break;default:throw new Error("Unrecognized state ".concat(n,"."))}if(this.subscriptionState!==gi.Terminated){var s=_i.initialDialogStateForSubscription(this.message,e.message);this.dialog=new _i(this.subscriptionEvent,this.subscriptionExpires,this.subscriptionState,this.core,s)}if(this.delegate&&this.delegate.onNotify){var a=e,o=this.dialog;this.delegate.onNotify({request:a,subscription:o})}else e.accept()}},{key:"waitNotifyStart",value:function(){var e=this;this.N||(this.core.subscribers.set(this.subscriberId,this),this.N=setTimeout((function(){return e.timer_N()}),jt.TIMER_N))}},{key:"waitNotifyStop",value:function(){this.N&&(this.core.subscribers.delete(this.subscriberId),clearTimeout(this.N),this.N=void 0)}},{key:"receiveResponse",value:function(e){if(this.authenticationGuard(e)){if(e.statusCode&&e.statusCode>=200&&e.statusCode<300){var t=e.getHeader("Expires");if(t){var n=Number(t);n>this.subscriptionExpiresRequested&&this.logger.warn("Expires header in a 200-class response to SUBSCRIBE with a higher value than the one in the request"),n<this.subscriptionExpires&&(this.subscriptionExpires=n)}else this.logger.warn("Expires header missing in a 200-class response to SUBSCRIBE");this.dialog&&this.dialog.subscriptionExpires>this.subscriptionExpires&&(this.dialog.subscriptionExpires=this.subscriptionExpires)}e.statusCode&&e.statusCode>=300&&e.statusCode<700&&this.waitNotifyStop(),(0,c.default)((0,v.default)(i.prototype),"receiveResponse",this).call(this,e)}}},{key:"timer_N",value:function(){this.logger.warn("Timer N expired for SUBSCRIBE user agent client. Timed out waiting for NOTIFY."),this.waitNotifyStop(),this.delegate&&this.delegate.onNotifyTimeout&&this.delegate.onNotifyTimeout()}}]),i}(ei),Ri=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n,r){var s;return(0,h.default)(this,i),s=t.call(this,Qt,e,n,r),s.core=e,s}return(0,f.default)(i)}(ii),Mi=["application/sdp","application/dtmf-relay"],Di=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,h.default)(this,e),this.userAgentClients=new Map,this.userAgentServers=new Map,this.configuration=t,this.delegate=i,this.dialogs=new Map,this.subscribers=new Map,this.logger=t.loggerFactory.getLogger("sip.user-agent-core")}return(0,f.default)(e,[{key:"dispose",value:function(){this.reset()}},{key:"reset",value:function(){this.dialogs.forEach((function(e){return e.dispose()})),this.dialogs.clear(),this.subscribers.forEach((function(e){return e.dispose()})),this.subscribers.clear(),this.userAgentClients.forEach((function(e){return e.dispose()})),this.userAgentClients.clear(),this.userAgentServers.forEach((function(e){return e.dispose()})),this.userAgentServers.clear()}},{key:"loggerFactory",get:function(){return this.configuration.loggerFactory}},{key:"transport",get:function(){var e=this.configuration.transportAccessor();if(!e)throw new Error("Transport undefined.");return e}},{key:"invite",value:function(e,t){return new wi(this,e,t)}},{key:"message",value:function(e,t){return new Ci(this,e,t)}},{key:"publish",value:function(e,t){return new Ei(this,e,t)}},{key:"register",value:function(e,t){return new Ti(this,e,t)}},{key:"subscribe",value:function(e,t){return new Pi(this,e,t)}},{key:"request",value:function(e,t){return new ei(Zt,this,e,t)}},{key:"makeOutgoingRequestMessage",value:function(e,t,i,n,r,s,a){var o=this.configuration.sipjsId,c=this.configuration.displayName,u=this.configuration.viaForceRport,l=this.configuration.hackViaTcp,d=this.configuration.supportedOptionTags.slice();e===lt.REGISTER&&d.push("path","gruu"),e===lt.INVITE&&(this.configuration.contact.pubGruu||this.configuration.contact.tempGruu)&&d.push("gruu");var h=this.configuration.routeSet,f=this.configuration.userAgentHeaderFieldValue,g=this.configuration.viaHost,p={callIdPrefix:o,forceRport:u,fromDisplayName:c,hackViaTcp:l,optionTags:d,routeSet:h,userAgentString:f,viaHost:g},v=Object.assign(Object.assign({},p),r);return new Tt(e,t,i,n,v,s,a)}},{key:"receiveIncomingRequestFromTransport",value:function(e){this.receiveRequestFromTransport(e)}},{key:"receiveIncomingResponseFromTransport",value:function(e){this.receiveResponseFromTransport(e)}},{key:"replyStateless",value:function(e,t){var i=this,n=this.configuration.userAgentHeaderFieldValue,r=this.configuration.supportedOptionTagsResponse;t=Object.assign(Object.assign({},t),{userAgent:n,supported:r});var s=Nt(e,t);return this.transport.send(s.message).catch((function(t){t instanceof Error&&i.logger.error(t.message),i.logger.error("Transport error occurred sending stateless reply to ".concat(e.method," request."))})),s}},{key:"receiveRequestFromTransport",value:function(e){var t=e.viaBranch,i=this.userAgentServers.get(t);e.method===lt.ACK&&i&&i.transaction.state===Vt.Accepted&&i instanceof ki?this.logger.warn("Discarding out of dialog ACK after 2xx response sent on transaction ".concat(t,".")):e.method!==lt.CANCEL?i?i.transaction.receiveRequest(e):this.receiveRequest(e):i?(this.replyStateless(e,{statusCode:200}),i.transaction instanceof Yt&&i.transaction.state===Vt.Proceeding&&i instanceof ki&&i.receiveCancel(e)):this.replyStateless(e,{statusCode:481})}},{key:"receiveRequest",value:function(e){if(-1!==mi.indexOf(e.method)){if(!e.ruri)throw new Error("Request-URI undefined.");if("sip"===e.ruri.scheme){var t=e.ruri,i=function(e){return!!e&&e.user===t.user};if(!i(this.configuration.aor)&&!(i(this.configuration.contact.uri)||i(this.configuration.contact.pubGruu)||i(this.configuration.contact.tempGruu)))return this.logger.warn("Request-URI does not point to us."),void(e.method!==lt.ACK&&this.replyStateless(e,{statusCode:404}));if(e.method!==lt.INVITE||e.hasHeader("Contact")){if(!e.toTag){var n=e.viaBranch;if(!this.userAgentServers.has(n)){var r=Array.from(this.userAgentServers.values()).some((function(t){return t.transaction.request.fromTag===e.fromTag&&t.transaction.request.callId===e.callId&&t.transaction.request.cseq===e.cseq}));if(r)return void this.replyStateless(e,{statusCode:482})}}e.toTag?this.receiveInsideDialogRequest(e):this.receiveOutsideDialogRequest(e)}else this.replyStateless(e,{statusCode:400,reasonPhrase:"Missing Contact Header"})}else this.replyStateless(e,{statusCode:416})}else{var s="Allow: "+mi.toString();this.replyStateless(e,{statusCode:405,extraHeaders:[s]})}}},{key:"receiveInsideDialogRequest",value:function(e){if(e.method===lt.NOTIFY){var t=e.parseHeader("Event");if(!t||!t.event)return void this.replyStateless(e,{statusCode:489});var i=e.callId+e.toTag+t.event,n=this.subscribers.get(i);if(n){var r=new oi(this,e);return void n.onNotify(r)}}var s=e.callId+e.toTag+e.fromTag,a=this.dialogs.get(s);if(a){if(e.method===lt.OPTIONS){var o="Allow: "+mi.toString(),c="Accept: "+Mi.toString();return void this.replyStateless(e,{statusCode:200,extraHeaders:[o,c]})}a.receiveRequest(e)}else e.method!==lt.ACK&&this.replyStateless(e,{statusCode:481})}},{key:"receiveOutsideDialogRequest",value:function(e){switch(e.method){case lt.ACK:break;case lt.BYE:this.replyStateless(e,{statusCode:481});break;case lt.CANCEL:throw new Error("Unexpected out of dialog request method ".concat(e.method,"."));case lt.INFO:this.replyStateless(e,{statusCode:405});break;case lt.INVITE:var t=new ki(this,e);this.delegate.onInvite?this.delegate.onInvite(t):t.reject();break;case lt.MESSAGE:var i=new bi(this,e);this.delegate.onMessage?this.delegate.onMessage(i):i.accept();break;case lt.NOTIFY:var n=new oi(this,e);this.delegate.onNotify?this.delegate.onNotify(n):n.reject({statusCode:405});break;case lt.OPTIONS:var r="Allow: "+mi.toString(),s="Accept: "+Mi.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[r,s]});break;case lt.REFER:var a=new fi(this,e);this.delegate.onRefer?this.delegate.onRefer(a):a.reject({statusCode:405});break;case lt.REGISTER:var o=new xi(this,e);this.delegate.onRegister?this.delegate.onRegister(o):o.reject({statusCode:405});break;case lt.SUBSCRIBE:var c=new Ri(this,e);this.delegate.onSubscribe?this.delegate.onSubscribe(c):c.reject({statusCode:480});break;default:throw new Error("Unexpected out of dialog request method ".concat(e.method,"."))}}},{key:"receiveResponseFromTransport",value:function(e){if(e.getHeaders("via").length>1)this.logger.warn("More than one Via header field present in the response, dropping");else{var t=e.viaBranch+e.method,i=this.userAgentClients.get(t);i?i.transaction.receiveResponse(e):this.logger.warn("Discarding unmatched ".concat(e.statusCode," response to ").concat(e.method," ").concat(t,"."))}}}]),e}(),Oi=function(t){(0,g.default)(n,t);var i=_(n);function n(e,t){var r;return(0,h.default)(this,n),r=i.call(this),r.logger=e,r}return(0,f.default)(n,[{key:"connect",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.connectPromise(t).then((function(t){t.overrideEvent||e.emit("connected")}))}},{key:"send",value:function(e){var t=this;return this.sendPromise(e).then((function(e){e.overrideEvent||t.emit("messageSent",e.msg)}))}},{key:"disconnect",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.disconnectPromise(t).then((function(t){t.overrideEvent||e.emit("disconnected")}))}},{key:"afterConnected",value:function(e){this.isConnected()?e():this.once("connected",e)}},{key:"waitForConnected",value:function(){var t=this;return e("warn","DEPRECATION WARNING Transport.waitForConnected(): use afterConnected() instead"," at util/webrtc.js:25167"),new Promise((function(e){t.afterConnected(e)}))}}]),n}(y),Ai=function(e){(0,g.default)(i,e);var t=_(i);function i(e){return(0,h.default)(this,i),t.call(this,e||"Unsupported content type.")}return(0,f.default)(i)}(Gt),Fi=function(e){(0,g.default)(i,e);var t=_(i);function i(e){return(0,h.default)(this,i),t.call(this,e||"Request pending.")}return(0,f.default)(i)}(Gt),qi=function(e){(0,g.default)(i,e);var t=_(i);function i(e){return(0,h.default)(this,i),t.call(this,e||"Unspecified session description handler error.")}return(0,f.default)(i)}(Gt),Ni=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.call(this,"The session has terminated.")}return(0,f.default)(i)}(Gt);function Bi(e,t){return e.reduce((function(e,t){return e=e.then(t),e}),Promise.resolve(t))}var Li=function(t){(0,g.default)(n,t);var i=_(n);function n(e,t){var r;return(0,h.default)(this,n),r=i.call(this),r.useDisplayMedia=!1,r._methodStr="",r.options=t||{},r.logger=e,r.dtmfSender=void 0,r.shouldAcquireMedia=!0,r.CONTENT_TYPE="application/sdp",r.C={DIRECTION:{NULL:null,SENDRECV:"sendrecv",SENDONLY:"sendonly",RECVONLY:"recvonly",INACTIVE:"inactive"}},r.logger.log("SessionDescriptionHandlerOptions: "+JSON.stringify(r.options)),r.direction=r.C.DIRECTION.NULL,r.modifiers=r.options.modifiers||[],Array.isArray(r.modifiers)||(r.modifiers=[r.modifiers]),r.iceGatheringTimeout=!1,r.initPeerConnection(r.options.peerConnectionOptions),r.constraints=r.checkAndDefaultConstraints(r.options.constraints),r}return(0,f.default)(n,[{key:"close",value:function(){this.logger.log("closing PeerConnection"),this.peerConnection&&"closed"!==this.peerConnection.signalingState&&(this.peerConnection.getSenders?this.peerConnection.getSenders().forEach((function(e){e.track&&e.track.stop()})):(this.logger.warn("Using getLocalStreams which is deprecated"),this.peerConnection.getLocalStreams().forEach((function(e){e.getTracks().forEach((function(e){e.stop()}))}))),this.peerConnection.getReceivers?this.peerConnection.getReceivers().forEach((function(e){e.track&&e.track.stop()})):(this.logger.warn("Using getRemoteStreams which is deprecated"),this.peerConnection.getRemoteStreams().forEach((function(e){e.getTracks().forEach((function(e){e.stop()}))}))),this.resetIceGatheringComplete(),this.peerConnection.close())}},{key:"getDescription",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.peerConnectionOptions&&this.initPeerConnection(t.peerConnectionOptions);var n=Object.assign({},this.constraints,t.constraints);return n=this.checkAndDefaultConstraints(n),JSON.stringify(n)!==JSON.stringify(this.constraints)&&(this.constraints=n,this.shouldAcquireMedia=!0),null==t.RTCOfferOptions&&(t.RTCOfferOptions={iceRestart:!1,offerToReceiveAudio:!0,offerToReceiveVideo:!0}),0==t.RTCOfferOptions.offerToReceiveVideo&&(this.shouldAcquireMedia=!1),Array.isArray(i)||(i=[i]),i=i.concat(this.modifiers),Promise.resolve().then((function(){if(e.shouldAcquireMedia)return e.acquire(e.constraints).then((function(){e.shouldAcquireMedia=!1}))})).then((function(){return e.createOfferOrAnswer(t.RTCOfferOptions,i)})).then((function(t){if(void 0===t.sdp)throw new qi("SDP undefined.");return e.emit("getDescription",t),{body:t.sdp,contentType:e.CONTENT_TYPE}}))}},{key:"hasDescription",value:function(e){return e===this.CONTENT_TYPE}},{key:"holdModifier",value:function(e){return e.sdp?(/a=(sendrecv|sendonly|recvonly|inactive)/.test(e.sdp)?(e.sdp=e.sdp.replace(/a=sendrecv\r\n/g,"a=sendonly\r\n"),e.sdp=e.sdp.replace(/a=recvonly\r\n/g,"a=inactive\r\n")):e.sdp=e.sdp.replace(/(m=[^\r]*\r\n)/g,"$1a=sendonly\r\n"),Promise.resolve(e)):Promise.resolve(e)}},{key:"setDescription",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];i.peerConnectionOptions&&this.initPeerConnection(i.peerConnectionOptions),Array.isArray(n)||(n=[n]),n=n.concat(this.modifiers);var r={type:this.hasOffer("local")?"answer":"offer",sdp:e};return Promise.resolve().then((function(){if(t.shouldAcquireMedia&&t.options.alwaysAcquireMediaFirst)return t.acquire(t.constraints).then((function(){t.shouldAcquireMedia=!1}))})).then((function(){return Bi(n,r)})).catch((function(e){if(e instanceof qi)throw e;var i="The modifiers did not resolve successfully.";e.name&&(i+=" "+e.name),e.message&&(i+=" "+e.message);var n=new qi(i);throw t.logger.error(i),t.emit("peerConnection-setRemoteDescriptionFailed",n),n})).then((function(e){return t.emit("setDescription",e),t.peerConnection.setRemoteDescription(e)})).catch((function(r){if(/^m=video.+$/gm.test(e)&&!i.disableAudioFallback)return i.disableAudioFallback=!0,t.setDescription(e,i,[dt].concat(n));if(r instanceof qi)throw r;var s="The modifiers did not resolve successfully.";r.name&&(s+=" "+r.name),r.message&&(s+=" "+r.message);var a=new qi(s);throw t.logger.error(s),t.emit("peerConnection-setRemoteDescriptionFailed",a),a})).then((function(){t.peerConnection.getReceivers?t.emit("setRemoteDescription",t.peerConnection.getReceivers()):t.emit("setRemoteDescription",t.peerConnection.getRemoteStreams()),t.emit("confirmed",t)}))}},{key:"sendDtmf",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.dtmfSender&&this.hasBrowserGetSenderSupport()){var i=this.peerConnection.getSenders();i.length>0&&(this.dtmfSender=i[0].dtmf)}if(!this.dtmfSender&&this.hasBrowserTrackSupport()){var n=this.peerConnection.getLocalStreams();if(n.length>0){var r=n[0].getAudioTracks();r.length>0&&(this.dtmfSender=this.peerConnection.createDTMFSender(r[0]))}}if(!this.dtmfSender)return!1;try{this.dtmfSender.insertDTMF(e,t.duration,t.interToneGap)}catch(s){if("InvalidStateError"===s.type||"InvalidCharacterError"===s.type)return this.logger.error(s),!1;throw s}return this.logger.log("DTMF sent via RTP: "+e.toString()),!0}},{key:"getDirection",value:function(){return this.direction}},{key:"on",value:function(e,t){return(0,c.default)((0,v.default)(n.prototype),"on",this).call(this,e,t)}},{key:"getMediaStream",value:function(e){if(this.useDisplayMedia){var t=navigator.mediaDevices;return t.getDisplayMedia({video:!0,audio:!1})}return navigator.mediaDevices.getUserMedia(e)}},{key:"createOfferOrAnswer",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{iceRestart:!1,offerToReceiveAudio:!0,offerToReceiveVideo:!1},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this.hasOffer("remote")?"createAnswer":"createOffer",r=this.peerConnection;this.logger.log(n);var s=this.hasOffer("remote")?r.createAnswer:r.createOffer;return s.apply(r,t).catch((function(t){if(t instanceof qi)throw t;var i="peerConnection-"+n+" failed.";t.name&&(i+=" "+t.name),t.message&&(i+=" "+t.message);var r=new qi(i);throw e.logger.error(i),e.emit("peerConnection-"+n+"Failed",r),r})).then((function(t){return Bi(i,e.createRTCSessionDescriptionInit(t))})).then((function(i){return e.resetIceGatheringComplete(),t.offerToReceiveVideo,e.logger.log("Setting local sdp."),e.logger.log("sdp is "+i.sdp||!1),r.setLocalDescription(i)})).catch((function(t){if(t instanceof qi)throw t;var i="peerConnection-"+n+" failed.";t.name&&(i+=" "+t.name),t.message&&(i+=" "+t.message);var r=new qi(i);throw e.logger.error(i),e.emit("peerConnection-SetLocalDescriptionFailed",r),r})).then((function(){return e.waitForIceGatheringComplete()})).then((function(){if(!e.peerConnection.localDescription)throw new qi("Missing local description.");var t=e.createRTCSessionDescriptionInit(e.peerConnection.localDescription);return Bi(i,t)})).then((function(t){return e.setDirection(t.sdp||""),t})).catch((function(t){if(t instanceof qi)throw t;var i="Error.";t.name&&(i+=" "+t.name),t.message&&(i+=" "+t.message);var n=new qi(i);throw e.logger.error(i),n}))}},{key:"createRTCSessionDescriptionInit",value:function(e){return{type:e.type,sdp:e.sdp}}},{key:"addDefaultIceCheckingTimeout",value:function(e){return void 0===e.iceCheckingTimeout&&(e.iceCheckingTimeout=1e3),e}},{key:"addDefaultIceServers",value:function(e){return e.iceServers||(e.iceServers=[{urls:"stun:stun.l.google.com:19302"}]),e}},{key:"checkAndDefaultConstraints",value:function(e){var t={audio:!0,video:!this.options.alwaysAcquireMediaFirst};return e=e||t,0===Object.keys(e).length&&e.constructor===Object?t:e}},{key:"hasBrowserTrackSupport",value:function(){return Boolean(this.peerConnection.addTrack)}},{key:"hasBrowserGetSenderSupport",value:function(){return Boolean(this.peerConnection.getSenders)}},{key:"initPeerConnection",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=this.addDefaultIceCheckingTimeout(t),t.rtcConfiguration=t.rtcConfiguration||{},t.rtcConfiguration=this.addDefaultIceServers(t.rtcConfiguration),this.logger.log("initPeerConnection"),this.peerConnection&&(this.logger.log("Already have a peer connection for this session. Tearing down."),this.resetIceGatheringComplete(),this.peerConnection.close()),this.peerConnection=new RTCPeerConnection(t.rtcConfiguration),this.logger.log("New peer connection created"),"ontrack"in this.peerConnection?this.peerConnection.addEventListener("track",(function(t){e.logger.log("track added"),e.emit("addTrack",t)})):(this.logger.warn("Using onaddstream which is deprecated"),this.peerConnection.onaddstream=function(t){e.logger.log("stream added"),e.emit("addStream",t)}),this.peerConnection.onicecandidate=function(t){e.emit("iceCandidate",t),t.candidate?e.logger.log("ICE candidate received: "+(null===t.candidate.candidate?null:t.candidate.candidate.trim())):null===t.candidate&&(e.logger.log("ICE candidate gathering complete"),e.triggerIceGatheringComplete())},this.peerConnection.onicegatheringstatechange=function(){switch(e.logger.log("RTCIceGatheringState changed: "+e.peerConnection.iceGatheringState),e.peerConnection.iceGatheringState){case"gathering":e.emit("iceGathering",e),!e.iceGatheringTimer&&t.iceCheckingTimeout&&(e.iceGatheringTimeout=!1,e.iceGatheringTimer=setTimeout((function(){e.logger.log("RTCIceChecking Timeout Triggered after "+t.iceCheckingTimeout+" milliseconds"),e.iceGatheringTimeout=!0,e.triggerIceGatheringComplete()}),t.iceCheckingTimeout));break;case"complete":e.triggerIceGatheringComplete();break}},this.peerConnection.oniceconnectionstatechange=function(){var t;switch(e.peerConnection.iceConnectionState){case"new":t="iceConnection";break;case"checking":t="iceConnectionChecking";break;case"connected":t="iceConnectionConnected";break;case"completed":t="iceConnectionCompleted";break;case"failed":t="iceConnectionFailed";break;case"disconnected":t="iceConnectionDisconnected";break;case"closed":t="iceConnectionClosed";break;default:return void e.logger.warn("Unknown iceConnection state: "+e.peerConnection.iceConnectionState)}e.logger.log("ICE Connection State changed to "+t),e.emit(t,e)}}},{key:"acquire",value:function(t){var i=this;return t=this.checkAndDefaultConstraints(t),new Promise((function(e,n){i.logger.log("acquiring local media"),i.emit("userMediaRequest",t),t.audio||t.video?i.getMediaStream(t).then((function(t){i.emit("addTrack"),i.emit("userMedia",t),e(t)})).catch((function(e){i.emit("userMediaFailed",e),n(e)})):e([])})).catch((function(e){if(e instanceof qi)throw e;var t="Unable to acquire streams.";e.name&&(t+=" "+e.name),e.message&&(t+=" "+e.message);new qi(t);return i.logger.error(t),[]})).then((function(t){return i.logger.log("acquired local media streams"),i.peerConnection.removeTrack&&i.peerConnection.getSenders().forEach((function(t){e("log","remove track "+t.track," at util/webrtc.js:25820"),i.peerConnection.removeTrack(t)})),t})).catch((function(e){if(e instanceof qi)throw e;var t="Error removing streams.";e.name&&(t+=" "+e.name),e.message&&(t+=" "+e.message);var n=new qi(t);throw i.logger.error(t),n})).then((function(e){var t=[].concat(e);return t.forEach((function(e){i.peerConnection.addTrack?e.getTracks().forEach((function(t){i.peerConnection.addTrack(t,e)})):i.peerConnection.addStream(e)})),Promise.resolve()})).catch((function(e){if(e instanceof qi)throw e;var t="Error adding streams.";e.name&&(t+=" "+e.name),e.message&&(t+=" "+e.message);var n=new qi(t);throw i.logger.error(t),n}))}},{key:"hasOffer",value:function(e){var t="have-"+e+"-offer";return this.peerConnection.signalingState===t}},{key:"isIceGatheringComplete",value:function(){return"complete"===this.peerConnection.iceGatheringState||this.iceGatheringTimeout}},{key:"resetIceGatheringComplete",value:function(){this.iceGatheringTimeout=!1,this.logger.log("resetIceGatheringComplete"),this.iceGatheringTimer&&(clearTimeout(this.iceGatheringTimer),this.iceGatheringTimer=void 0),this.iceGatheringDeferred&&(this.iceGatheringDeferred.reject(),this.iceGatheringDeferred=void 0)}},{key:"setDirection",value:function(e){var t=e.match(/a=(sendrecv|sendonly|recvonly|inactive)/);if(null===t)return this.direction=this.C.DIRECTION.NULL,void this.emit("directionChanged");var i=t[1];switch(i){case this.C.DIRECTION.SENDRECV:case this.C.DIRECTION.SENDONLY:case this.C.DIRECTION.RECVONLY:case this.C.DIRECTION.INACTIVE:this.direction=i;break;default:this.direction=this.C.DIRECTION.NULL;break}this.emit("directionChanged")}},{key:"triggerIceGatheringComplete",value:function(){this.isIceGatheringComplete()&&(this.emit("iceGatheringComplete",this),this.iceGatheringTimer&&(clearTimeout(this.iceGatheringTimer),this.iceGatheringTimer=void 0),this.iceGatheringDeferred&&(this.iceGatheringDeferred.resolve(),this.iceGatheringDeferred=void 0))}},{key:"waitForIceGatheringComplete",value:function(){return this.logger.log("waitForIceGatheringComplete"),this.isIceGatheringComplete()?(this.logger.log("ICE is already complete. Return resolved."),Promise.resolve()):(this.iceGatheringDeferred||(this.iceGatheringDeferred=function(){var e={};return e.promise=new Promise((function(t,i){e.resolve=t,e.reject=i})),e}()),this.logger.log("ICE is not complete. Returning promise"),this.iceGatheringDeferred?this.iceGatheringDeferred.promise:Promise.resolve())}}],[{key:"defaultFactory",value:function(e,t){var i=e.userAgent.getLogger("sip.SessionDescriptionHandler",e.id);return new n(i,t)}}]),n}(y);function Hi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"event";return{on:function(i){e.on(t,i)},off:function(i){e.removeListener(t,i)},once:function(i){e.once(t,i)}}}var Vi,Ui,ji=function(){function e(t){(0,h.default)(this,e),this.incomingInfoRequest=t}return(0,f.default)(e,[{key:"request",get:function(){return this.incomingInfoRequest.message}},{key:"accept",value:function(e){return this.incomingInfoRequest.accept(e),Promise.resolve()}},{key:"reject",value:function(e){return this.incomingInfoRequest.reject(e),Promise.resolve()}}]),e}(),Gi=function(){function e(t){(0,h.default)(this,e),this.incomingNotifyRequest=t}return(0,f.default)(e,[{key:"request",get:function(){return this.incomingNotifyRequest.message}},{key:"accept",value:function(e){return this.incomingNotifyRequest.accept(e),Promise.resolve()}},{key:"reject",value:function(e){return this.incomingNotifyRequest.reject(e),Promise.resolve()}}]),e}(),zi=function(){function e(t,i){(0,h.default)(this,e),this.incomingReferRequest=t,this.session=i}return(0,f.default)(e,[{key:"referTo",get:function(){var e=this.incomingReferRequest.message.parseHeader("refer-to");if(!(e instanceof ft))throw new Error("Failed to parse Refer-To header.");return e}},{key:"referredBy",get:function(){return this.incomingReferRequest.message.getHeader("referred-by")}},{key:"replaces",get:function(){return this.referTo.uri.getHeader("replaces")}},{key:"request",get:function(){return this.incomingReferRequest.message}},{key:"accept",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{statusCode:202};return this.incomingReferRequest.accept(e),Promise.resolve()}},{key:"reject",value:function(e){return this.incomingReferRequest.reject(e),Promise.resolve()}},{key:"makeInviter",value:function(e){if(this.inviter)return this.inviter;var t=this.referTo.uri.clone();t.clearHeaders(),e=e||{};var i=(e.extraHeaders||[]).slice(),n=this.replaces;n&&i.push("Replaces: "+decodeURIComponent(n));var r=this.referredBy;return r&&i.push("Referred-By: "+r),e.extraHeaders=i,this.inviter=this.session.userAgent.makeInviter(t,e),this.inviter.referred=this.session,this.session.referral=this.inviter,this.inviter}}]),e}();(function(e){e["Initial"]="Initial",e["Establishing"]="Establishing",e["Established"]="Established",e["Terminating"]="Terminating",e["Terminated"]="Terminated"})(Vi||(Vi={})),function(e){e[e["STATUS_NULL"]=0]="STATUS_NULL",e[e["STATUS_INVITE_SENT"]=1]="STATUS_INVITE_SENT",e[e["STATUS_1XX_RECEIVED"]=2]="STATUS_1XX_RECEIVED",e[e["STATUS_INVITE_RECEIVED"]=3]="STATUS_INVITE_RECEIVED",e[e["STATUS_WAITING_FOR_ANSWER"]=4]="STATUS_WAITING_FOR_ANSWER",e[e["STATUS_ANSWERED"]=5]="STATUS_ANSWERED",e[e["STATUS_WAITING_FOR_PRACK"]=6]="STATUS_WAITING_FOR_PRACK",e[e["STATUS_WAITING_FOR_ACK"]=7]="STATUS_WAITING_FOR_ACK",e[e["STATUS_CANCELED"]=8]="STATUS_CANCELED",e[e["STATUS_TERMINATED"]=9]="STATUS_TERMINATED",e[e["STATUS_ANSWERED_WAITING_FOR_PRACK"]=10]="STATUS_ANSWERED_WAITING_FOR_PRACK",e[e["STATUS_EARLY_MEDIA"]=11]="STATUS_EARLY_MEDIA",e[e["STATUS_CONFIRMED"]=12]="STATUS_CONFIRMED"}(Ui||(Ui={}));var $i,Wi=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,h.default)(this,e),this.localHold=!1,this.isFailed=!1,this.rel100="none",this.status=Ui.STATUS_NULL,this.expiresTimer=void 0,this.userNoAnswerTimer=void 0,this._state=Vi.Initial,this._stateEventEmitter=new y,this.pendingReinvite=!1,this.useDisplayMedia=!1,this.userAgent=t,this.delegate=i.delegate,this.logger=t.getLogger("sip.session")}return(0,f.default)(e,[{key:"sessionDescriptionHandler",get:function(){return this._sessionDescriptionHandler}},{key:"sessionDescriptionHandlerFactory",get:function(){return this.userAgent.configuration.sessionDescriptionHandlerFactory}},{key:"state",get:function(){return this._state}},{key:"stateChange",get:function(){return Hi(this._stateEventEmitter)}},{key:"invite",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.logger.log("Session.invite"),this.state!==Vi.Established)return Promise.reject(new Error("Invalid session state ".concat(this.state)));if(this.pendingReinvite)return Promise.reject(new Error("Reinvite in progress. Please wait until complete, then try again."));if(!this._sessionDescriptionHandler)throw new Error("Session description handler undefined.");this.pendingReinvite=!0;var i={onAccept:function(i){var n=Pt(i.message);if(!n)return e.logger.error("Received 2xx response to re-INVITE without a session description"),e.ackAndBye(i,400,"Missing session description"),e.stateTransition(Vi.Terminated),e.isFailed=!0,void(e.pendingReinvite=!1);if(t.withoutSdp){var r={sessionDescriptionHandlerOptions:t.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:t.sessionDescriptionHandlerModifiers};e.setOfferAndGetAnswer(n,r).then((function(e){i.ack({body:e})})).catch((function(t){e.logger.error("Failed to handle offer in 2xx response to re-INVITE"),e.logger.error(t.message),e.state===Vi.Terminated?i.ack():(e.ackAndBye(i,488,"Bad Media Description"),e.stateTransition(Vi.Terminated),e.isFailed=!0)})).then((function(){e.pendingReinvite=!1,t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(i)}))}else{var s={sessionDescriptionHandlerOptions:e.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:e.sessionDescriptionHandlerModifiers};e.setAnswer(n,s).then((function(){i.ack()})).catch((function(t){e.logger.error("Failed to handle answer in 2xx response to re-INVITE"),e.logger.error(t.message),e.state!==Vi.Terminated?(e.ackAndBye(i,488,"Bad Media Description"),e.stateTransition(Vi.Terminated),e.isFailed=!0):i.ack()})).then((function(){e.pendingReinvite=!1,t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(i)}))}},onProgress:function(e){},onRedirect:function(e){},onReject:function(i){e.logger.warn("Received a non-2xx response to re-INVITE"),e.pendingReinvite=!1,t.withoutSdp?t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(i):e.rollbackOffer().catch((function(t){if(e.logger.error("Failed to rollback offer on non-2xx response to re-INVITE"),e.logger.error(t.message),e.state!==Vi.Terminated){if(!e.dialog)throw new Error("Dialog undefined.");var i=[];i.push("Reason: "+e.getReasonHeaderValue(500,"Internal Server Error")),e.dialog.bye(void 0,{extraHeaders:i}),e.stateTransition(Vi.Terminated),e.isFailed=!0}})).then((function(){t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(i)}))},onTrying:function(e){}},n=t.requestOptions||{};if(n.extraHeaders=(n.extraHeaders||[]).slice(),n.extraHeaders.push("Allow: "+mi.toString()),n.extraHeaders.push("Contact: "+this.contact),t.withoutSdp)return this.dialog?Promise.resolve(this.dialog.invite(i,n)):(this.pendingReinvite=!1,Promise.reject(new Error("Dialog undefined.")));var r={sessionDescriptionHandlerOptions:t.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:t.sessionDescriptionHandlerModifiers};return this.getOffer(r).then((function(t){if(!e.dialog)throw e.pendingReinvite=!1,new Error("Dialog undefined.");return n.body=t,e.dialog.invite(i,n)})).catch((function(t){throw e.logger.error(t.message),e.logger.error("Failed to send re-INVITE"),e.pendingReinvite=!1,t}))}},{key:"_bye",value:function(e,t){var i=this;if(!this.dialog)return Promise.reject(new Error("Session dialog undefined."));var n=this.dialog;switch(n.sessionState){case Bt.Initial:throw new Error("Invalid dialog state ".concat(n.sessionState));case Bt.Early:throw new Error("Invalid dialog state ".concat(n.sessionState));case Bt.AckWait:return this.stateTransition(Vi.Terminating),new Promise((function(r,s){n.delegate={onAck:function(){var s=n.bye(e,t);i.stateTransition(Vi.Terminated),r(s)},onAckTimeout:function(){var s=n.bye(e,t);i.stateTransition(Vi.Terminated),r(s)}}}));case Bt.Confirmed:var r=n.bye(e,t);return this.stateTransition(Vi.Terminated),Promise.resolve(r);case Bt.Terminated:throw new Error("Invalid dialog state ".concat(n.sessionState));default:throw new Error("Unrecognized state.")}}},{key:"_close",value:function(){if(this.logger.log("Session[".concat(this.id,"]._close")),this.status!==Ui.STATUS_TERMINATED){if(this._sessionDescriptionHandler&&this._sessionDescriptionHandler.close(),this.expiresTimer&&clearTimeout(this.expiresTimer),this.userNoAnswerTimer&&clearTimeout(this.userNoAnswerTimer),this.status=Ui.STATUS_TERMINATED,!this.id)throw new Error("Session id undefined.");this.logger.warn("delete session ".concat(this.id)),delete this.userAgent.sessions[this.id]}}},{key:"_info",value:function(e,t){return this.dialog?Promise.resolve(this.dialog.info(e,t)):Promise.reject(new Error("Session dialog undefined."))}},{key:"refer",value:function(e,t,i){return this.dialog?(this.referrer=e,Promise.resolve(this.dialog.refer(t,i))):Promise.reject(new Error("Session dialog undefined."))}},{key:"ackAndBye",value:function(e,t,i){e.ack();var n=[];t&&n.push("Reason: "+this.getReasonHeaderValue(t,i)),e.session.bye(void 0,{extraHeaders:n})}},{key:"onAckRequest",value:function(e){var t=this;if(this.logger.log("Session.onAckRequest"),this.state===Vi.Established||this.state===Vi.Terminating){var i=this.dialog;if(!i)throw new Error("Dialog undefined.");switch(i.signalingState){case Lt.Initial:this.logger.error("Invalid signaling state ".concat(i.signalingState,".")),this.isFailed=!0;var n=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return i.bye(void 0,{extraHeaders:n}),void this.stateTransition(Vi.Terminated);case Lt.Stable:var r=Pt(e.message);if(!r)return void(this.status=Ui.STATUS_CONFIRMED);if("render"===r.contentDisposition)return this.renderbody=r.content,this.rendertype=r.contentType,void(this.status=Ui.STATUS_CONFIRMED);if("session"!==r.contentDisposition)return void(this.status=Ui.STATUS_CONFIRMED);var s={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers};return void this.setAnswer(r,s).then((function(){t.status=Ui.STATUS_CONFIRMED})).catch((function(e){t.logger.error(e.message),t.isFailed=!0;var n=["Reason: "+t.getReasonHeaderValue(488,"Bad Media Description")];i.bye(void 0,{extraHeaders:n}),t.stateTransition(Vi.Terminated)}));case Lt.HaveLocalOffer:this.logger.error("Invalid signaling state ".concat(i.signalingState,".")),this.isFailed=!0;var a=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return i.bye(void 0,{extraHeaders:a}),void this.stateTransition(Vi.Terminated);case Lt.HaveRemoteOffer:this.logger.error("Invalid signaling state ".concat(i.signalingState,".")),this.isFailed=!0;var o=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return i.bye(void 0,{extraHeaders:o}),void this.stateTransition(Vi.Terminated);case Lt.Closed:throw new Error("Invalid signaling state ".concat(i.signalingState,"."));default:throw new Error("Invalid signaling state ".concat(i.signalingState,"."))}}else this.logger.error("ACK received while in state ".concat(this.state,", dropping request"))}},{key:"onByeRequest",value:function(e){this.logger.log("Session.onByeRequest"),this.state===Vi.Established?(e.accept(),this.stateTransition(Vi.Terminated)):this.logger.error("BYE received while in state ".concat(this.state,", dropping request"))}},{key:"onInfoRequest",value:function(e){if(this.logger.log("Session.onInfoRequest"),this.state===Vi.Established)if(this.delegate&&this.delegate.onInfo){var t=new ji(e);this.delegate.onInfo(t)}else e.accept();else this.logger.error("INFO received while in state ".concat(this.state,", dropping request"))}},{key:"onInviteRequest",value:function(e){var t=this;if(this.logger.log("Session.onInviteRequest"),this.state===Vi.Established){var i=["Contact: "+this.contact];if(e.message.hasHeader("P-Asserted-Identity")){var n=e.message.getHeader("P-Asserted-Identity");if(!n)throw new Error("Header undefined.");this.assertedIdentity=vt.nameAddrHeaderParse(n)}var r={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers};this.generateResponseOfferAnswerInDialog(r).then((function(n){var r=e.accept({statusCode:200,extraHeaders:i,body:n});t.delegate&&t.delegate.onInvite&&t.delegate.onInvite(e.message,r.message,200)})).catch((function(n){if(t.logger.error(n.message),t.logger.error("Failed to handle to re-INVITE request"),!t.dialog)throw new Error("Dialog undefined.");if(t.logger.error(t.dialog.signalingState),t.dialog.signalingState!==Lt.Stable)t.rollbackOffer().then((function(){var i=e.reject({statusCode:488});t.delegate&&t.delegate.onInvite&&t.delegate.onInvite(e.message,i.message,488)})).catch((function(n){t.logger.error(n.message),t.logger.error("Failed to rollback offer on re-INVITE request");var r=e.reject({statusCode:488});if(t.state!==Vi.Terminated){if(!t.dialog)throw new Error("Dialog undefined.");[].push("Reason: "+t.getReasonHeaderValue(500,"Internal Server Error")),t.dialog.bye(void 0,{extraHeaders:i}),t.stateTransition(Vi.Terminated),t.isFailed=!0}t.delegate&&t.delegate.onInvite&&t.delegate.onInvite(e.message,r.message,488)}));else{var r=e.reject({statusCode:488});t.delegate&&t.delegate.onInvite&&t.delegate.onInvite(e.message,r.message,488)}}))}else this.logger.error("INVITE received while in state ".concat(this.state,", dropping request"))}},{key:"onNotifyRequest",value:function(e){if(this.logger.log("Session.onNotifyRequest"),this.state===Vi.Established)if(this.referrer&&this.referrer.delegate&&this.referrer.delegate.onNotify){var t=new Gi(e);this.referrer.delegate.onNotify(t)}else if(this.delegate&&this.delegate.onNotify){var i=new Gi(e);this.delegate.onNotify(i)}else e.accept();else this.logger.error("NOTIFY received while in state ".concat(this.state,", dropping request"))}},{key:"onPrackRequest",value:function(e){if(this.logger.log("Session.onPrackRequest"),this.state===Vi.Established)throw new Error("Unimplemented.");this.logger.error("PRACK received while in state ".concat(this.state,", dropping request"))}},{key:"onReferRequest",value:function(e){var t=this;if(this.logger.log("Session.onReferRequest"),this.state===Vi.Established){if(this.status===Ui.STATUS_CONFIRMED){if(!e.message.hasHeader("refer-to"))return this.logger.warn("Invalid REFER packet. A refer-to header is required. Rejecting."),void e.reject();var i=new zi(e,this);this.delegate&&this.delegate.onRefer?this.delegate.onRefer(i):(this.logger.log("No delegate available to handle REFER, automatically accepting and following."),i.accept().then((function(){return i.makeInviter(t.passedOptions).invite()})).catch((function(e){t.logger.error(e.message)})))}}else this.logger.error("REFER received while in state ".concat(this.state,", dropping request"))}},{key:"generateResponseOfferAnswer",value:function(e,t){if(this.dialog)return this.generateResponseOfferAnswerInDialog(t);var i=Pt(e.message);return i&&"session"===i.contentDisposition?this.setOfferAndGetAnswer(i,t):this.getOffer(t)}},{key:"generateResponseOfferAnswerInDialog",value:function(e){if(!this.dialog)throw new Error("Dialog undefined.");switch(this.dialog.signalingState){case Lt.Initial:return this.getOffer(e);case Lt.HaveLocalOffer:return Promise.resolve(void 0);case Lt.HaveRemoteOffer:if(!this.dialog.offer)throw new Error("Session offer undefined in signaling state ".concat(this.dialog.signalingState,"."));return this.setOfferAndGetAnswer(this.dialog.offer,e);case Lt.Stable:return this.state!==Vi.Established?Promise.resolve(void 0):this.getOffer(e);case Lt.Closed:throw new Error("Invalid signaling state ".concat(this.dialog.signalingState,"."));default:throw new Error("Invalid signaling state ".concat(this.dialog.signalingState,"."))}}},{key:"getOffer",value:function(e){var t=this,i=this.setupSessionDescriptionHandler(),n=e.sessionDescriptionHandlerOptions,r=e.sessionDescriptionHandlerModifiers;try{return i.getDescription(n,r).then((function(e){return xt(e)})).catch((function(e){t.logger.error("Session.getOffer: SDH getDescription rejected...");var i=e instanceof Error?e:new Error(e);throw t.logger.error(i.message),i}))}catch(a){this.logger.error("Session.getOffer: SDH getDescription threw...");var s=a instanceof Error?a:new Error(a);return this.logger.error(s.message),Promise.reject(s)}}},{key:"rollbackOffer",value:function(){var e=this,t=this.setupSessionDescriptionHandler();if(!t.rollbackDescription)return Promise.resolve();try{return t.rollbackDescription().catch((function(t){e.logger.error("Session.rollbackOffer: SDH rollbackDescription rejected...");var i=t instanceof Error?t:new Error(t);throw e.logger.error(i.message),i}))}catch(n){this.logger.error("Session.rollbackOffer: SDH rollbackDescription threw...");var i=n instanceof Error?n:new Error(n);return this.logger.error(i.message),Promise.reject(i)}}},{key:"setAnswer",value:function(e,t){var i=this,n=this.setupSessionDescriptionHandler(),r=t.sessionDescriptionHandlerOptions,s=t.sessionDescriptionHandlerModifiers;try{if(!n.hasDescription(e.contentType))return Promise.reject(new Ai)}catch(c){this.logger.error("Session.setAnswer: SDH hasDescription threw...");var a=c instanceof Error?c:new Error(c);return this.logger.error(a.message),Promise.reject(a)}try{return n.setDescription(e.content,r,s).catch((function(e){i.logger.error("Session.setAnswer: SDH setDescription rejected...");var t=e instanceof Error?e:new Error(e);throw i.logger.error(t.message),t}))}catch(c){this.logger.error("Session.setAnswer: SDH setDescription threw...");var o=c instanceof Error?c:new Error(c);return this.logger.error(o.message),Promise.reject(o)}}},{key:"setOfferAndGetAnswer",value:function(e,t){var i=this,n=this.setupSessionDescriptionHandler(),r=t.sessionDescriptionHandlerOptions,s=t.sessionDescriptionHandlerModifiers;try{if(!n.hasDescription(e.contentType))return Promise.reject(new Ai)}catch(u){this.logger.error("Session.setOfferAndGetAnswer: SDH hasDescription threw...");var a=u instanceof Error?u:new Error(u);return this.logger.error(a.message),Promise.reject(a)}try{var o=n;return o.useDisplayMedia=this.useDisplayMedia,n.setDescription(e.content,r,s).then((function(){return n.getDescription(r,s)})).then((function(e){return xt(e)})).catch((function(e){i.logger.error("Session.setOfferAndGetAnswer: SDH setDescription or getDescription rejected...");var t=e instanceof Error?e:new Error(e);throw i.logger.error(t.message),t}))}catch(u){this.logger.error("Session.setOfferAndGetAnswer: SDH setDescription or getDescription threw...");var c=u instanceof Error?u:new Error(u);return this.logger.error(c.message),Promise.reject(c)}}},{key:"setSessionDescriptionHandler",value:function(e){if(this._sessionDescriptionHandler)throw new Error("Sessionn description handler defined.");this._sessionDescriptionHandler=e}},{key:"setupSessionDescriptionHandler",value:function(){return this._sessionDescriptionHandler||(this._sessionDescriptionHandler=this.sessionDescriptionHandlerFactory(this,this.userAgent.configuration.sessionDescriptionHandlerFactoryOptions)),this._sessionDescriptionHandler}},{key:"stateTransition",value:function(e){var t=this,i=function(){throw new Error("Invalid state transition from ".concat(t._state," to ").concat(e))};switch(this._state){case Vi.Initial:e!==Vi.Establishing&&e!==Vi.Established&&e!==Vi.Terminating&&e!==Vi.Terminated&&i();break;case Vi.Establishing:e!==Vi.Established&&e!==Vi.Terminating&&e!==Vi.Terminated&&i();break;case Vi.Established:e!==Vi.Terminating&&e!==Vi.Terminated&&i();break;case Vi.Terminating:e!==Vi.Terminated&&i();break;case Vi.Terminated:i();break;default:throw new Error("Unrecognized state.")}e===Vi.Established&&(this.startTime=new Date),e===Vi.Terminated&&(this.endTime=new Date,this._close()),this._state=e,this.logger.log("Session ".concat(this.id," transitioned to state ").concat(this._state)),this._stateEventEmitter.emit("event",this._state)}},{key:"getReasonHeaderValue",value:function(e,t){var i=e,n=_t(e);return!n&&t&&(n=t),"SIP;cause="+i+';text="'+n+'"'}}]),e}();(function(e){e["Required"]="Required",e["Supported"]="Supported",e["Unsupported"]="Unsupported"})($i||($i={}));var Ki,Ji={"100rel":!0,199:!0,answermode:!0,"early-session":!0,eventlist:!0,explicitsub:!0,"from-change":!0,"geolocation-http":!0,"geolocation-sip":!0,gin:!0,gruu:!0,histinfo:!0,ice:!0,join:!0,"multiple-refer":!0,norefersub:!0,nosub:!0,outbound:!0,path:!0,policy:!0,precondition:!0,pref:!0,privacy:!0,"recipient-list-invite":!0,"recipient-list-message":!0,"recipient-list-subscribe":!0,replaces:!0,"resource-priority":!0,"sdp-anat":!0,"sec-agree":!0,tdialog:!0,timer:!0,uui:!0},Xi=function(t){(0,g.default)(n,t);var i=_(n);function n(){var e;return(0,h.default)(this,n),e=i.apply(this,arguments),e._videoIsZero=!1,e._disableVideoTrack=!0,e}return(0,f.default)(n,[{key:"isVideo",get:function(){switch(this.state){case Vi.Initial:break;case Vi.Established:return null!=this.localVideoTrack&&null!=this.remoteVideoTrack&&!this._videoIsZero;default:break}if(this instanceof Yi){var e=this.request.body.indexOf("m=video");if(e>0){if(e=this.request.body.indexOf("m=video 0"),!(e>0))return this._videoIsZero=!1,!0;this._videoIsZero=!0}return!1}if(this instanceof en){var t=this.body.body.indexOf("m=video");if(t>0){if(t=this.body.body.indexOf("m=video 0"),!(t>0))return this._videoIsZero=!1,!0;this._videoIsZero=!0}return!1}}},{key:"setDelegate",value:function(e){var t=this;this.delegatePhone=e,this.stateChange.on((function(e){switch(t.logger.log("[".concat(t.id,"] session state changed to ").concat(e)),e){case Vi.Initial:break;case Vi.Establishing:break;case Vi.Established:t.setupLocalMedia(),t.setupRemoteMedia(),t.delegate&&t.delegatePhone.onCallAnswered&&t.delegatePhone.onCallAnswered(t.id),setTimeout((function(){null!=t.remoteVideoTrack&&0==t.remoteVideoTrack.enabled&&(t.remoteVideoTrack.enabled=!0)}),1e3);case Vi.Terminating:break;case Vi.Terminated:t.logger.warn("call terminated: "+t.id),t.cleanupMedia(),t.delegatePhone&&t.delegatePhone.onCallHangup&&t.delegatePhone.onCallHangup(t.id,t.remoteIdentity.uri.user);break;default:throw new Error("Unknown session state.")}}))}},{key:"setupCall",value:function(e,t,i,n){this.localVideoControal=e,this.remoteVideoControal=t,this.remoteAudioControl=n,this.logger=i}},{key:"setupLocalMedia",value:function(){if(this.localAudioTrack){var e=this.localAudioTrack;this.LocalAudioStream=new MediaStream([e])}if(this.localVideoControal&&this.remoteVideoControal){var t=this.localVideoTrack;if(t){var i=new MediaStream([t]);this.localVideoControal.srcObject=i,this.localVideoControal.volume=0,this.localVideoControal.play()}}}},{key:"setupRemoteMedia",value:function(){var t=this;if(this.remoteVideoControal){var i=this.remoteAudioTrack,n=this.remoteVideoTrack,r=new MediaStream;this.remoteVideoControal&&(i&&r.addTrack(i),n&&0!=this._mediaConstraints.video&&(r.addTrack(n),this._disableVideoTrack&&(n.enabled=!1)),this.remoteVideoControal.srcObject=r,this.remoteVideoControal.play().catch((function(e){t.logger.error("[".concat(t.id,"] error playing video")),t.logger.error(e.message)}))),this.remoteAudioControl&&i&&(r.addTrack(i),this.remoteAudioControl.srcObject=r,this.remoteAudioControl.play().catch((function(e){t.logger.error("[".concat(t.id,"] error playing audio")),t.logger.error(e.message)})))}var s=this.sessionDescriptionHandler;s.on("addTrack",(function(t){e("log","addTrackincall",t," at util/webrtc.js:27273")}))}},{key:"cleanupMedia",value:function(){this.localVideoControal&&(this.localVideoControal.srcObject=null,this.localVideoControal.pause()),this.remoteVideoControal&&(this.remoteVideoControal.srcObject=null,this.remoteVideoControal.pause())}},{key:"getReceiverTrack",value:function(e){var t=this.sessionDescriptionHandler;if(t){if(!(t instanceof Li))throw new Error("Session's session description handler not instance of SessionDescriptionHandler.");var i=t.peerConnection,n=i.getReceivers().find((function(t){return t.track.kind===e}));return n?n.track:void 0}this.logger.warn("[".concat(this.id,"] getReceiverTrack - session description handler undefined"))}},{key:"getSenderTrack",value:function(e){var t=this.sessionDescriptionHandler;if(t){if(!(t instanceof Li))throw new Error("Session's session description handler not instance of SessionDescriptionHandler.");var i=t.peerConnection,n=i.getSenders().find((function(t){return!(!t.track||t.track.kind!==e)}));return n&&n.track?n.track:void 0}this.logger.warn("[".concat(this.id,"] getSenderTrack - session description handler undefined"))}},{key:"remoteAudioTrack",get:function(){return this.getReceiverTrack("audio")}},{key:"remoteVideoTrack",get:function(){return this.getReceiverTrack("video")}},{key:"localAudioTrack",get:function(){return this.getSenderTrack("audio")}},{key:"localVideoTrack",get:function(){return this.getSenderTrack("video")}},{key:"changeVideoElement",value:function(e){e.srcObject=this.remoteVideoControal.srcObject,this.remoteVideoControal.srcObject=null,this.remoteVideoControal=e,this.remoteVideoControal.play()}},{key:"peerConnection",get:function(){var e=this.sessionDescriptionHandler;return e.peerConnection}}]),n}(Wi),Yi=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n){var r;(0,h.default)(this,i),r=t.call(this,e),r.incomingInviteRequest=n,r.body=void 0,r._canceled=!1,r.rseq=Math.floor(1e4*Math.random()),r.logger=e.getLogger("sip.invitation",r.id),r.request.body&&(r.body=r.request.body),r.request.hasHeader("Content-Type")&&(r.contentType=r.request.getHeader("Content-Type")),r.request.hasHeader("ifc")&&(r._ifcContent=r.request.getHeader("ifc")),r.localIdentity=r.request.to,r.remoteIdentity=r.request.from;var s=r.request.hasHeader("P-Asserted-Identity");if(s){var a=r.request.getHeader("P-Asserted-Identity");a&&(r.assertedIdentity=vt.nameAddrHeaderParse(a))}r.contact=r.userAgent.contact.toString(),r.fromTag=r.request.fromTag,r.id=r.request.callId+r.fromTag;var o=r.request.parseHeader("Content-Disposition");o&&"render"===o.type&&(r.renderbody=r.request.body,r.rendertype=r.request.getHeader("Content-Type")),r.logger=e.getLogger("sip.invitation",r.id),r.status=Ui.STATUS_INVITE_RECEIVED,r.userAgent.sessions[r.id]=(0,u.default)(r),r.userAgent.sessions.Length;var c=r.request,l=c.getHeader("require");l&&l.toLowerCase().indexOf("100rel")>=0&&(r.rel100="required");var d=c.getHeader("supported");if(d&&d.toLowerCase().indexOf("100rel")>=0&&(r.rel100="supported"),r.request.toTag=n.toTag,r.status=Ui.STATUS_WAITING_FOR_ANSWER,r.userNoAnswerTimer=setTimeout((function(){n.reject({statusCode:480}),r.stateTransition(Vi.Terminated)}),r.userAgent.configuration.noAnswerTimeout?1e3*r.userAgent.configuration.noAnswerTimeout:6e4),c.hasHeader("expires")){var f=1e3*Number(c.getHeader("expires")||0);r.expiresTimer=setTimeout((function(){r.status===Ui.STATUS_WAITING_FOR_ANSWER&&(n.reject({statusCode:487}),r.stateTransition(Vi.Terminated))}),f)}return r}return(0,f.default)(i,[{key:"autoSendAnInitialProvisionalResponse",get:function(){return"required"!==this.rel100}},{key:"request",get:function(){return this.incomingInviteRequest.message}},{key:"accept",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.logger.log("Invitation.accept"),this.state!==Vi.Initial){var i=new Error("Invalid session state ".concat(this.state));return this.logger.error(i.message),Promise.reject(i)}return this._mediaConstraints=t.sessionDescriptionHandlerOptions.constraints,this.stateTransition(Vi.Establishing),this._accept(t).then((function(t){t.message;var i=t.session;i.delegate={onAck:function(t){return e.onAckRequest(t)},onAckTimeout:function(){return e.onAckTimeout()},onBye:function(t){return e.onByeRequest(t)},onInfo:function(t){return e.onInfoRequest(t)},onInvite:function(t){return e.onInviteRequest(t)},onNotify:function(t){return e.onNotifyRequest(t)},onPrack:function(t){return e.onPrackRequest(t)},onRefer:function(t){return e.onReferRequest(t)}},e.dialog=i,e.stateTransition(Vi.Established),e.replacee&&e.replacee._bye()})).catch((function(t){if(e.onContextError(t),!e._canceled)throw t}))}},{key:"progress",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.logger.log("Invitation.progress"),this.state!==Vi.Initial){var i=new Error("Invalid session state ".concat(this.state));return this.logger.error(i.message),Promise.reject(i)}var n=t.statusCode||180;if(n<100||n>199)throw new TypeError("Invalid statusCode: "+n);if(this.status===Ui.STATUS_TERMINATED)return this.logger.warn("Unexpected call for progress while terminated, ignoring"),Promise.resolve();if(this.status===Ui.STATUS_ANSWERED)return this.logger.warn("Unexpected call for progress while answered, ignoring"),Promise.resolve();if(this.status===Ui.STATUS_ANSWERED_WAITING_FOR_PRACK)return this.logger.warn("Unexpected call for progress while answered (waiting for prack), ignoring"),Promise.resolve();if(this.status===Ui.STATUS_WAITING_FOR_PRACK)return this.logger.warn("Unexpected call for progress while waiting for prack, ignoring"),Promise.resolve();if(100===t.statusCode){try{this.incomingInviteRequest.trying()}catch(i){if(this.onContextError(i),!this._canceled)return Promise.reject(i)}return Promise.resolve()}return"required"===this.rel100||"supported"===this.rel100&&t.rel100||"supported"===this.rel100&&this.userAgent.configuration.sipExtension100rel===$i.Required?this._progressReliableWaitForPrack(t).then((function(e){})).catch((function(t){if(e.onContextError(t),!e._canceled)throw t})):this._progress(t).then((function(e){})).catch((function(t){if(e.onContextError(t),!e._canceled)throw t}))}},{key:"reject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.logger.log("Invitation.reject"),this.state!==Vi.Initial){var t=new Error("Invalid session state ".concat(this.state));return this.logger.error(t.message),Promise.reject(t)}if(this.status===Ui.STATUS_TERMINATED)throw new Error("Invalid status ".concat(this.status));this.logger.log("rejecting RTCSession");var i=e.statusCode||480,n=e.reasonPhrase?e.reasonPhrase:_t(i),r=e.extraHeaders||[];if(i<300||i>699)throw new TypeError("Invalid statusCode: "+i);var s=e.body?xt(e.body):void 0;i<400?this.incomingInviteRequest.redirect([],{statusCode:i,reasonPhrase:n,extraHeaders:r,body:s}):this.incomingInviteRequest.reject({statusCode:i,reasonPhrase:n,extraHeaders:r,body:s});return this.stateTransition(Vi.Terminated),Promise.resolve()}},{key:"_close",value:function(){this.prackNeverArrived(),(0,c.default)((0,v.default)(i.prototype),"_close",this).call(this)}},{key:"_onCancel",value:function(e){this.logger.log("Invitation._onCancel"),this.state===Vi.Initial||this.state===Vi.Establishing?(this._canceled=!0,this.incomingInviteRequest.reject({statusCode:487}),this.stateTransition(Vi.Terminated)):this.logger.error("CANCEL received while in state ".concat(this.state,", dropping request"))}},{key:"_accept",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.onInfo=t.onInfo,this.status===Ui.STATUS_WAITING_FOR_PRACK?(this.status=Ui.STATUS_ANSWERED_WAITING_FOR_PRACK,this.waitForArrivalOfPrack().then((function(){e.status=Ui.STATUS_ANSWERED,clearTimeout(e.userNoAnswerTimer)})).then((function(){return e.generateResponseOfferAnswer(e.incomingInviteRequest,t)})).then((function(t){return e.incomingInviteRequest.accept({statusCode:200,body:t})}))):this.status!==Ui.STATUS_WAITING_FOR_ANSWER?Promise.reject(new Error("Invalid status ".concat(this.status))):(this.status=Ui.STATUS_ANSWERED,this.status=Ui.STATUS_ANSWERED,clearTimeout(this.userNoAnswerTimer),this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then((function(t){return e.incomingInviteRequest.accept({statusCode:200,body:t})})))}},{key:"_progress",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.statusCode||180,i=e.reasonPhrase,n=(e.extraHeaders||[]).slice(),r=e.body?xt(e.body):void 0;if(183===t&&!r)return this._progressWithSDP(e);try{var s=this.incomingInviteRequest.progress({statusCode:t,reasonPhrase:i,extraHeaders:n,body:r});return this.dialog=s.session,Promise.resolve(s)}catch(a){return Promise.reject(a)}}},{key:"_progressWithSDP",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.statusCode||183,n=t.reasonPhrase,r=(t.extraHeaders||[]).slice();return this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then((function(t){return e.incomingInviteRequest.progress({statusCode:i,reasonPhrase:n,extraHeaders:r,body:t})})).then((function(t){return e.dialog=t.session,t}))}},{key:"_progressReliable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.extraHeaders=(e.extraHeaders||[]).slice(),e.extraHeaders.push("Require: 100rel"),e.extraHeaders.push("RSeq: "+Math.floor(1e4*Math.random())),this._progressWithSDP(e)}},{key:"_progressReliableWaitForPrack",value:function(){var e,t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=i.statusCode||183,r=i.reasonPhrase,s=(i.extraHeaders||[]).slice();return s.push("Require: 100rel"),s.push("RSeq: "+this.rseq++),this.status=Ui.STATUS_WAITING_FOR_PRACK,new Promise((function(a,o){var c=!0;return t.generateResponseOfferAnswer(t.incomingInviteRequest,i).then((function(i){return e=i,t.incomingInviteRequest.progress({statusCode:n,reasonPhrase:r,extraHeaders:s,body:e})})).then((function(u){var l,d;t.dialog=u.session,u.session.delegate={onPrack:function(e){l=e,clearTimeout(h),clearTimeout(g),c&&(c=!1,t.handlePrackOfferAnswer(l,i).then((function(e){try{d=l.accept({statusCode:200,body:e}),t.status===Ui.STATUS_WAITING_FOR_PRACK&&(t.status=Ui.STATUS_WAITING_FOR_ANSWER),t.prackArrived(),a({prackRequest:l,prackResponse:d,progressResponse:u})}catch(i){o(i)}})))}};var h=setTimeout((function(){if(c){c=!1,t.logger.warn("No PRACK received, rejecting INVITE."),clearTimeout(g);try{t.incomingInviteRequest.reject({statusCode:504}),t.stateTransition(Vi.Terminated),o(new Ni)}catch(e){o(e)}}}),64*jt.T1),f=jt.T1,g=setTimeout((function i(){try{t.incomingInviteRequest.progress({statusCode:n,reasonPhrase:r,extraHeaders:s,body:e})}catch(a){return c=!1,void o(a)}g=setTimeout(i,f*=2)}),f)}))}))}},{key:"handlePrackOfferAnswer",value:function(e,t){if(!this.dialog)throw new Error("Dialog undefined.");var i=Pt(e.message);if(!i||"session"!==i.contentDisposition)return Promise.resolve(void 0);switch(this.dialog.signalingState){case Lt.Initial:throw new Error("Invalid signaling state ".concat(this.dialog.signalingState,"."));case Lt.Stable:return this.setAnswer(i,t).then((function(){}));case Lt.HaveLocalOffer:throw new Error("Invalid signaling state ".concat(this.dialog.signalingState,"."));case Lt.HaveRemoteOffer:return this.setOfferAndGetAnswer(i,t);case Lt.Closed:throw new Error("Invalid signaling state ".concat(this.dialog.signalingState,"."));default:throw new Error("Invalid signaling state ".concat(this.dialog.signalingState,"."))}}},{key:"onAckTimeout",value:function(){if(this.logger.log("Invitation.onAckTimeout"),!this.dialog)throw new Error("Dialog undefined.");this.logger.log("No ACK received for an extended period of time, terminating session"),this.dialog.bye(),this.stateTransition(Vi.Terminated)}},{key:"onContextError",value:function(e){var t=480;e instanceof Gt?e instanceof qi?this.logger.error(e.message):e instanceof Ni?this.logger.warn("Incoming session terminated while waiting for PRACK."):e instanceof Ai?t=415:e instanceof Gt&&this.logger.error(e.message):e instanceof Error?this.logger.error(e.message):(this.logger.error("An error occurred in the session description handler."),this.logger.error(e));try{this.incomingInviteRequest.reject({statusCode:t}),this.stateTransition(Vi.Terminated)}catch(e){return}}},{key:"prackArrived",value:function(){this.waitingForPrackResolve&&this.waitingForPrackResolve(),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}},{key:"prackNeverArrived",value:function(){this.waitingForPrackReject&&this.waitingForPrackReject(new Ni),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}},{key:"waitForArrivalOfPrack",value:function(){var e=this;if(this.waitingForPrackPromise)throw new Error("Already waiting for PRACK");return this.waitingForPrackPromise=new Promise((function(t,i){e.waitingForPrackResolve=t,e.waitingForPrackReject=i})),this.waitingForPrackPromise}}]),i}(Xi),Zi=function(){function e(t,i){(0,h.default)(this,e),this._session=t}return(0,f.default)(e,[{key:"session",get:function(){return this._session}},{key:"bye",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.session.state!==Vi.Established&&this.session.state!==Vi.Terminating){var t="Byer.bye() may only be called if established session.";return this.session.state===Vi.Terminated?t+=" However this session is already terminated.":this.session instanceof Yi?(t+=" However Invitation.accept() has not yet been called.",t+=" Perhaps you should have called Invitation.reject()?"):(t+=" However a dialog does not yet exist.",t+=" Perhaps you should have called Inviter.cancel()?"),this.session.logger.error(t),Promise.reject(new Error("Invalid session state ".concat(this.session.state)))}return this.session._bye(e.requestDelegate,e.requestOptions)}}]),e}(),Qi=function(){function e(t,i){(0,h.default)(this,e),this._session=t}return(0,f.default)(e,[{key:"session",get:function(){return this._session}},{key:"info",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.session.state!==Vi.Established){var t="Infoer.info() may only be called if established session.";return this.session.logger.error(t),Promise.reject(new Error("Invalid session state ".concat(this.session.state)))}return this.session._info(e.requestDelegate,e.requestOptions)}}]),e}(),en=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n){var r,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if((0,h.default)(this,i),r=t.call(this,e,s),r.body=void 0,r.earlyMediaSessionDescriptionHandlers=new Map,s.params=s.params||{},r.status!==Ui.STATUS_NULL)throw new Error("Invalid status ".concat(r.status));r.logger=e.getLogger("sip.inviter"),s.body&&(r.body={body:s.body,contentType:s.contentType?s.contentType:"application/sdp"});var a=s.anonymous||!1;a&&e.configuration.uri&&(s.params.fromDisplayName="Anonymous",s.params.fromUri="sip:anonymous@anonymous.invalid");var o=St(),c=e.contact.toString({anonymous:a,outbound:a?!e.contact.tempGruu:!e.contact.pubGruu}),l=s.params||{};l.fromTag=o;var d=e.userAgentCore.configuration.aor;if(s.params.fromUri&&(d="string"===typeof s.params.fromUri?vt.URIParse(s.params.fromUri):s.params.fromUri),!d)throw new TypeError("Invalid from URI: "+s.params.fromUri);var f=n;if(s.params.toUri&&(f="string"===typeof s.params.toUri?vt.URIParse(s.params.toUri):s.params.toUri),!f)throw new TypeError("Invalid to URI: "+s.params.toUri);var g,p=(s.extraHeaders||[]).slice();if(a&&e.configuration.uri&&(p.push("P-Preferred-Identity: "+e.configuration.uri.toString()),p.push("Privacy: id")),p.push("Contact: "+c),p.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),e.configuration.sipExtension100rel===$i.Required&&p.push("Require: 100rel"),e.configuration.sipExtensionReplaces===$i.Required&&p.push("Require: replaces"),r.body&&(g=xt(r.body)),r.request=e.userAgentCore.makeOutgoingRequestMessage(lt.INVITE,n,d,f,l,p,g),!r.request.from)throw new Error("From undefined.");if(!r.request.to)throw new Error("From undefined.");return r.localIdentity=r.request.from,r.remoteIdentity=r.request.to,s.params=l,s.extraHeaders=p,r.contact=c,r.fromTag=o,r.id=r.request.callId+r.fromTag,r.onInfo=s.onInfo,r.passedOptions=s,r.renderbody=s.renderbody||void 0,r.rendertype=s.rendertype||"text/plain",r.sessionDescriptionHandlerModifiers=s.sessionDescriptionHandlerModifiers||[],r.sessionDescriptionHandlerOptions=s.sessionDescriptionHandlerOptions||{},r.inviteWithoutSdp=s.inviteWithoutSdp||!1,r.isCanceled=!1,r.earlyMedia=s.earlyMedia||!1,e.applicants[r.toString()]=(0,u.default)(r),r}return(0,f.default)(i,[{key:"cancel",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.logger.log("Inviter.cancel"),this.state!==Vi.Initial&&this.state!==Vi.Establishing){var i=new Error("Invalid session state ".concat(this.state));return this.logger.error(i.message),Promise.reject(i)}if(this.isCanceled)throw new Error("Already canceled.");function n(e,t){if(e&&e<200||e>699)throw new TypeError("Invalid statusCode: "+e);if(e){var i=e,n=_t(e)||t;return"SIP;cause="+i+';text="'+n+'"'}}(this.isCanceled=!0,this.stateTransition(Vi.Terminating),this.disposeEarlyMedia(),this.sessionDescriptionHandler&&this.sessionDescriptionHandler.close(),this.outgoingInviteRequest)?(t.statusCode&&t.reasonPhrase&&(e=n(t.statusCode,t.reasonPhrase)),this.outgoingInviteRequest.cancel(e,t)):(this.logger.warn("Canceled session before INVITE was sent"),this.stateTransition(Vi.Terminated));return Promise.resolve()}},{key:"invite",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.logger.log("Inviter.invite"),this.state!==Vi.Initial)return(0,c.default)((0,v.default)(i.prototype),"invite",this).call(this,t);if(!this.id)throw new Error("Session id undefined.");if(this.userAgent.sessions[this.id]=this,t.withoutSdp||this.inviteWithoutSdp)return this.renderbody&&this.rendertype&&(this.request.body={contentType:this.rendertype,body:this.renderbody}),this.stateTransition(Vi.Establishing),this.status=Ui.STATUS_INVITE_SENT,Promise.resolve(this.sendInvite(t));var n={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers};return this.getOffer(n).then((function(i){return e.stateTransition(Vi.Establishing),e.status=Ui.STATUS_INVITE_SENT,e.request.body={body:i.content,contentType:i.contentType},e.sendInvite(t)})).catch((function(t){throw e.logger.log(t.message),e.stateTransition(Vi.Terminated),t}))}},{key:"_close",value:function(){this.disposeEarlyMedia(),(0,c.default)((0,v.default)(i.prototype),"_close",this).call(this)}},{key:"sendInvite",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.outgoingInviteRequest=this.userAgent.userAgentCore.invite(this.request,{onAccept:function(i){return e.dialog?(e.logger.log("Additional confirmed dialog, sending ACK and BYE"),void e.ackAndBye(i)):e.isCanceled?(e.logger.log("Canceled session accepted, sending ACK and BYE"),e.ackAndBye(i),void e.stateTransition(Vi.Terminated)):(e.notifyReferer(i),void e.onAccept(i).then((function(){e.disposeEarlyMedia()})).catch((function(t){e.disposeEarlyMedia()})).then((function(){t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(i)})))},onProgress:function(i){e.isCanceled||(e.notifyReferer(i),e.onProgress(i).catch((function(t){e.disposeEarlyMedia()})).then((function(){t.requestDelegate&&t.requestDelegate.onProgress&&t.requestDelegate.onProgress(i)})))},onRedirect:function(i){e.notifyReferer(i),e.onRedirect(i),t.requestDelegate&&t.requestDelegate.onRedirect&&t.requestDelegate.onRedirect(i)},onReject:function(i){e.notifyReferer(i),e.onReject(i),t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(i)},onTrying:function(i){e.notifyReferer(i),e.onTrying(i),t.requestDelegate&&t.requestDelegate.onTrying&&t.requestDelegate.onTrying(i)}}),this.outgoingInviteRequest}},{key:"disposeEarlyMedia",value:function(){this.earlyMediaSessionDescriptionHandlers.forEach((function(e){e.close()})),this.earlyMediaSessionDescriptionHandlers.clear()}},{key:"notifyReferer",value:function(e){var t=this;if(this.referred){if(!(this.referred instanceof Wi))throw new Error("Referred session not instance of session");if(this.referred.dialog){if(!e.message.statusCode)throw new Error("Status code undefined.");if(!e.message.reasonPhrase)throw new Error("Reason phrase undefined.");var i=e.message.statusCode,n=e.message.reasonPhrase,r="SIP/2.0 ".concat(i," ").concat(n).trim(),s=this.referred.dialog.notify(void 0,{extraHeaders:["Event: refer","Subscription-State: terminated"],body:{contentDisposition:"render",contentType:"message/sipfrag",content:r}});s.delegate={onReject:function(){t.referred=void 0}}}}}},{key:"onAccept",value:function(e){var t=this;if(this.logger.log("Inviter.onAccept"),this.state!==Vi.Establishing)return this.logger.error("Accept received while in state ".concat(this.state,", dropping response")),Promise.reject(new Error("Invalid session state ".concat(this.state)));var i=e.message,n=e.session;i.hasHeader("P-Asserted-Identity")&&(this.assertedIdentity=vt.nameAddrHeaderParse(i.getHeader("P-Asserted-Identity"))),this.dialog=n,this.dialog.delegate={onAck:function(e){return t.onAckRequest(e)},onBye:function(e){return t.onByeRequest(e)},onInfo:function(e){return t.onInfoRequest(e)},onInvite:function(e){return t.onInviteRequest(e)},onNotify:function(e){return t.onNotifyRequest(e)},onPrack:function(e){return t.onPrackRequest(e)},onRefer:function(e){return t.onReferRequest(e)}};var r=this.sessionDescriptionHandlerOptions,s=this.sessionDescriptionHandlerModifiers;switch(n.signalingState){case Lt.Initial:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(Vi.Terminated),Promise.reject(new Error("Bad Media Description"));case Lt.HaveLocalOffer:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(Vi.Terminated),Promise.reject(new Error("Bad Media Description"));case Lt.HaveRemoteOffer:if(!this.dialog.offer)throw new Error("Session offer undefined in signaling state ".concat(this.dialog.signalingState,"."));var a={sessionDescriptionHandlerOptions:r,sessionDescriptionHandlerModifiers:s};return this.setOfferAndGetAnswer(this.dialog.offer,a).then((function(i){t.status=Ui.STATUS_CONFIRMED;e.ack({body:i});t.stateTransition(Vi.Established)})).catch((function(i){throw t.ackAndBye(e,488,"Invalid session description"),t.stateTransition(Vi.Terminated),i}));case Lt.Stable:if(this.earlyMediaSessionDescriptionHandlers.size>0){var o=this.earlyMediaSessionDescriptionHandlers.get(n.id);if(!o)throw new Error("Session description handler undefined.");this.setSessionDescriptionHandler(o),this.earlyMediaSessionDescriptionHandlers.delete(n.id),this.status=Ui.STATUS_CONFIRMED;e.ack();return this.stateTransition(Vi.Established),Promise.resolve()}if(this.earlyMediaDialog){if(this.earlyMediaDialog!==n){if(this.earlyMedia){this.logger.error("You have set the 'earlyMedia' option to 'true' which requires that your INVITE requests do not fork and yet this INVITE request did in fact fork. Consequentially and not surprisingly the end point which accepted the INVITE (confirmed dialog) does not match the end point with which early media has been setup (early dialog) and thus this session is unable to proceed. In accordance with the SIP specifications, the SIP servers your end point is connected to determine if an INVITE forks and the forking behaviour of those servers cannot be controlled by this library. If you wish to use early media with this library you must configure those servers accordingly. Alternatively you may set the 'earlyMedia' to 'false' which will allow this library to function with any INVITE requests which do fork.")}var c=new Error("Early media dialog does not equal confirmed dialog, terminating session");return this.logger.error(c.message),this.ackAndBye(e,488,"Not Acceptable Here"),this.stateTransition(Vi.Terminated),Promise.reject(c)}this.status=Ui.STATUS_CONFIRMED;e.ack();return this.stateTransition(Vi.Established),Promise.resolve()}var u=n.answer;if(!u)throw new Error("Answer is undefined.");var l={sessionDescriptionHandlerOptions:r,sessionDescriptionHandlerModifiers:s};return this.setAnswer(u,l).then((function(){var i;t.renderbody&&t.rendertype&&(i={body:{contentDisposition:"render",contentType:t.rendertype,content:t.renderbody}}),t.status=Ui.STATUS_CONFIRMED;e.ack(i);t.stateTransition(Vi.Established)})).catch((function(i){throw t.logger.error(i.message),t.ackAndBye(e,488,"Not Acceptable Here"),t.stateTransition(Vi.Terminated),i}));case Lt.Closed:return Promise.reject(new Error("Terminated."));default:throw new Error("Unknown session signaling state.")}}},{key:"onProgress",value:function(e){var t=this;if(this.logger.log("Inviter.onProgress"),this.state!==Vi.Establishing)return this.logger.error("Progress received while in state ".concat(this.state,", dropping response")),Promise.reject(new Error("Invalid session state ".concat(this.state)));if(!this.outgoingInviteRequest)throw new Error("Outgoing INVITE request undefined.");var i=e.message,n=e.session;this.status=Ui.STATUS_1XX_RECEIVED,i.hasHeader("P-Asserted-Identity")&&(this.assertedIdentity=vt.nameAddrHeaderParse(i.getHeader("P-Asserted-Identity")));var r=i.getHeader("require"),s=i.getHeader("rseq"),a=r&&r.includes("100rel")&&s?Number(s):void 0,o=!!a,c=[];o&&c.push("RAck: "+i.getHeader("rseq")+" "+i.getHeader("cseq"));var u=this.sessionDescriptionHandlerOptions,l=this.sessionDescriptionHandlerModifiers;switch(n.signalingState){case Lt.Initial:return o&&(this.logger.warn("First reliable provisional response received MUST contain an offer when INVITE does not contain an offer."),e.prack({extraHeaders:c})),Promise.resolve();case Lt.HaveLocalOffer:return o&&e.prack({extraHeaders:c}),Promise.resolve();case Lt.HaveRemoteOffer:if(!o)return this.logger.warn("Non-reliable provisional response MUST NOT contain an initial offer, discarding response."),Promise.resolve();var d=this.sessionDescriptionHandlerFactory(this,this.userAgent.configuration.sessionDescriptionHandlerFactoryOptions||{});return this.earlyMediaSessionDescriptionHandlers.set(n.id,d),d.setDescription(i.body,u,l).then((function(){return d.getDescription(u,l)})).then((function(t){var i={contentDisposition:"session",contentType:t.contentType,content:t.body};e.prack({extraHeaders:c,body:i})})).catch((function(e){if(t.status===Ui.STATUS_TERMINATED)throw e;throw t.stateTransition(Vi.Terminated),e}));case Lt.Stable:if(o&&e.prack({extraHeaders:c}),this.earlyMedia&&!this.earlyMediaDialog){this.earlyMediaDialog=n;var h=n.answer;if(!h)throw new Error("Answer is undefined.");var f={sessionDescriptionHandlerOptions:u,sessionDescriptionHandlerModifiers:l};return this.setAnswer(h,f).catch((function(e){if(t.status===Ui.STATUS_TERMINATED)throw e;throw t.stateTransition(Vi.Terminated),e}))}return Promise.resolve();case Lt.Closed:return Promise.reject(new Error("Terminated."));default:throw new Error("Unknown session signaling state.")}}},{key:"onRedirect",value:function(e){this.logger.log("Inviter.onRedirect"),this.state===Vi.Establishing||this.state===Vi.Terminating?this.stateTransition(Vi.Terminated):this.logger.error("Redirect received while in state ".concat(this.state,", dropping response"))}},{key:"onReject",value:function(e){this.logger.log("Inviter.onReject"),this.state===Vi.Establishing||this.state===Vi.Terminating?this.stateTransition(Vi.Terminated):this.logger.error("Reject received while in state ".concat(this.state,", dropping response"))}},{key:"onTrying",value:function(e){this.logger.log("Inviter.onTrying"),this.state===Vi.Establishing||this.logger.error("Trying received while in state ".concat(this.state,", dropping response"))}}]),i}(Xi),tn=function(){function e(t){(0,h.default)(this,e),this.incomingMessageRequest=t}return(0,f.default)(e,[{key:"request",get:function(){return this.incomingMessageRequest.message}},{key:"accept",value:function(e){return this.incomingMessageRequest.accept(e),Promise.resolve()}},{key:"reject",value:function(e){return this.incomingMessageRequest.reject(e),Promise.resolve()}}]),e}(),nn=function(){function e(t,i,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"text/plain",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};(0,h.default)(this,e),this._disposed=!1,this.logger=t.getLogger("sip.Messager"),s.params=s.params||{};var a=t.userAgentCore.configuration.aor;if(s.params.fromUri&&(a="string"===typeof s.params.fromUri?vt.URIParse(s.params.fromUri):s.params.fromUri),!a)throw new TypeError("Invalid from URI: "+s.params.fromUri);var o=i;if(s.params.toUri&&(o="string"===typeof s.params.toUri?vt.URIParse(s.params.toUri):s.params.toUri),!o)throw new TypeError("Invalid to URI: "+s.params.toUri);var c=s.params?Object.assign({},s.params):{},u=(s.extraHeaders||[]).slice(),l="render",d={contentDisposition:l,contentType:r,content:n};this.request=t.userAgentCore.makeOutgoingRequestMessage(lt.MESSAGE,i,a,o,c,u,d),this.userAgent=t}return(0,f.default)(e,[{key:"message",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.userAgent.userAgentCore.request(this.request,e.requestDelegate),Promise.resolve()}},{key:"_dispose",value:function(){this._disposed||(this._disposed=!0)}}]),e}();(function(e){e["Initial"]="Initial",e["Registered"]="Registered",e["Unregistered"]="Unregistered",e["Terminated"]="Terminated"})(Ki||(Ki={}));var rn,sn,an=function(){function e(t){var i=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,h.default)(this,e),this._contacts=[],this._state=Ki.Initial,this._stateEventEmitter=new y,this._waiting=!1,this._waitingEventEmitter=new y,this.userAgent=t;var r=t.configuration.uri.clone();if(r.user=void 0,this.options=Object.assign(Object.assign(Object.assign({},e.defaultOptions),{registrar:r}),n),this.options.extraContactHeaderParams=(this.options.extraContactHeaderParams||[]).slice(),this.options.extraHeaders=(this.options.extraHeaders||[]).slice(),!this.options.registrar)throw new Error("Registrar undefined.");if(this.options.registrar=this.options.registrar.clone(),this.options.regId&&!this.options.instanceId?this.options.instanceId=e.newUUID():!this.options.regId&&this.options.instanceId&&(this.options.regId=1),this.options.instanceId&&-1===vt.parse(this.options.instanceId,"uuid"))throw new Error("Invalid instanceId.");if(this.options.regId&&this.options.regId<0)throw new Error("Invalid regId.");var s=this.options.registrar,a=this.options.params&&this.options.params.fromUri||t.userAgentCore.configuration.aor,o=this.options.params&&this.options.params.toUri||t.configuration.uri,c=this.options.params||{},u=(n.extraHeaders||[]).slice();if(this.request=t.userAgentCore.makeOutgoingRequestMessage(lt.REGISTER,s,a,o,c,u,void 0),this.expires=this.options.expires||e.defaultOptions.expires,this.expires<0)throw new Error("Invalid expires.");this.logger=t.getLogger("sip.Registerer"),this.options.logConfiguration&&(this.logger.log("Configuration:"),Object.keys(this.options).forEach((function(e){var t=i.options[e];switch(e){case"registrar":i.logger.log("\xb7 "+e+": "+t);break;default:i.logger.log("\xb7 "+e+": "+JSON.stringify(t))}}))),t.transport.on("disconnected",(function(){return i.onTransportDisconnected()})),this.id=this.request.callId+this.request.from.parameters.tag,this.userAgent.registerers[this.id]=this}return(0,f.default)(e,[{key:"contacts",get:function(){return this._contacts.slice()}},{key:"state",get:function(){return this._state}},{key:"stateChange",get:function(){return Hi(this._stateEventEmitter)}},{key:"dispose",value:function(){var e=(0,d.default)(s.default.mark((function e(){var t=this;return s.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return delete this.userAgent.registerers[this.id],e.abrupt("return",new Promise((function(e,i){var n=function(){if(!t.waiting&&t._state===Ki.Registered)return t.stateChange.once((function(){t.terminated(),e()})),void t.unregister();t.terminated(),e()};t.waiting?t.waitingChange.once((function(){return n()})):n()})));case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"register",value:function(){var e=(0,d.default)(s.default.mark((function e(){var t,i,n,r,a=this,o=arguments;return s.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=o.length>0&&void 0!==o[0]?o[0]:{},!this.waiting){e.next=4;break}return i=new Fi("REGISTER request already in progress, waiting for final response"),e.abrupt("return",Promise.reject(i));case 4:return t.requestOptions&&(this.options=Object.assign(Object.assign({},this.options),t.requestOptions)),n=(this.options.extraHeaders||[]).slice(),n.push("Contact: "+this.generateContactHeader(this.expires)),n.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),this.request.cseq++,this.request.setHeader("cseq",this.request.cseq+" REGISTER"),this.request.extraHeaders=n,this.waitingToggle(!0),r=this.userAgent.userAgentCore.register(this.request,{onAccept:function(e){var i;e.message.hasHeader("expires")&&(i=Number(e.message.getHeader("expires"))),a._contacts=e.message.getHeaders("contact");var n,r=a._contacts.length;if(!r)return a.logger.error("No Contact header in response to REGISTER, dropping response."),void a.unregistered();while(r--){if(n=e.message.parseHeader("contact",r),n.uri.user===a.userAgent.contact.uri.user){i=n.getParam("expires");break}n=void 0}return void 0===n?(a.logger.error("No Contact header pointing to us, dropping response"),a.unregistered(),void a.waitingToggle(!1)):void 0===i?(a.logger.error("Contact pointing to us is missing expires parameter, dropping response"),a.unregistered(),void a.waitingToggle(!1)):(n.hasParam("temp-gruu")&&(a.userAgent.contact.tempGruu=vt.URIParse(n.getParam("temp-gruu").replace(/"/g,""))),n.hasParam("pub-gruu")&&(a.userAgent.contact.pubGruu=vt.URIParse(n.getParam("pub-gruu").replace(/"/g,""))),a.registered(i),t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(e),void a.waitingToggle(!1))},onProgress:function(e){t.requestDelegate&&t.requestDelegate.onProgress&&t.requestDelegate.onProgress(e)},onRedirect:function(e){a.logger.error("Redirect received. Not supported."),a.unregistered(),t.requestDelegate&&t.requestDelegate.onRedirect&&t.requestDelegate.onRedirect(e),a.waitingToggle(!1)},onReject:function(e){if(423===e.message.statusCode)return e.message.hasHeader("min-expires")?(a.expires=Number(e.message.getHeader("min-expires")),a.waitingToggle(!1),void a.register()):(a.logger.error("423 response received for REGISTER without Min-Expires, dropping response"),a.unregistered(),void a.waitingToggle(!1));if(403===e.message.statusCode){var i=e.message.getHeader("errcode");null!=i&&(i.startsWith("10003")?e.message.statusCode=404:i.startsWith("10001")?e.message.statusCode=405:i.startsWith("10002")&&(e.message.statusCode=406))}if(a.logger.warn("Failed to register11111111111, status code ".concat(e.message.statusCode)),408==e.message.statusCode)return a.waitingToggle(!1),void a.register();a.unregistered(),t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(e),a.waitingToggle(!1)},onTrying:function(e){t.requestDelegate&&t.requestDelegate.onTrying&&t.requestDelegate.onTrying(e)}}),e.abrupt("return",Promise.resolve(r));case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"unregister",value:function(){var e=(0,d.default)(s.default.mark((function e(){var t,i,n,r,a=this,o=arguments;return s.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=o.length>0&&void 0!==o[0]?o[0]:{},!this.waiting){e.next=4;break}return i=new Fi("REGISTER request already in progress, waiting for final response"),e.abrupt("return",Promise.reject(i));case 4:return this._state===Ki.Registered||t.all||this.logger.warn("Not currently registered, but sending an unregister anyway."),t.requestOptions&&(this.options=Object.assign(Object.assign({},this.options),t.requestOptions)),n=(this.options.extraHeaders||[]).slice(),this.request.extraHeaders=n,t.all?(n.push("Contact: *"),n.push("Expires: 0")):n.push("Contact: "+this.generateContactHeader(0)),this.request.cseq++,this.request.setHeader("cseq",this.request.cseq+" REGISTER"),void 0!==this.registrationTimer&&(clearTimeout(this.registrationTimer),this.registrationTimer=void 0),this.waitingToggle(!0),r=this.userAgent.userAgentCore.register(this.request,{onAccept:function(e){a._contacts=e.message.getHeaders("contact"),a.unregistered(),t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(e),a.waitingToggle(!1)},onProgress:function(e){t.requestDelegate&&t.requestDelegate.onProgress&&t.requestDelegate.onProgress(e)},onRedirect:function(e){a.logger.error("Unregister redirected. Not currently supported."),a.unregistered(),t.requestDelegate&&t.requestDelegate.onRedirect&&t.requestDelegate.onRedirect(e),a.waitingToggle(!1)},onReject:function(e){a.logger.error("Unregister rejected with status code ".concat(e.message.statusCode)),a.unregistered(),t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(e),a.waitingToggle(!1)},onTrying:function(e){t.requestDelegate&&t.requestDelegate.onTrying&&t.requestDelegate.onTrying(e)}}),e.abrupt("return",Promise.resolve(r));case 15:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"clearTimers",value:function(){void 0!==this.registrationTimer&&(clearTimeout(this.registrationTimer),this.registrationTimer=void 0),void 0!==this.registrationExpiredTimer&&(clearTimeout(this.registrationExpiredTimer),this.registrationExpiredTimer=void 0)}},{key:"generateContactHeader",value:function(e){var t=this.userAgent.contact.toString();return this.options.regId&&this.options.instanceId&&(t+=";reg-id="+this.options.regId,t+=';+sip.instance="<urn:uuid:'+this.options.instanceId+'>"'),this.options.extraContactHeaderParams&&this.options.extraContactHeaderParams.forEach((function(e){t+=";"+e})),t+=";expires="+e,t}},{key:"onTransportDisconnected",value:function(){}},{key:"registered",value:function(e){var t=this;this.clearTimers(),this.registrationTimer=setTimeout((function(){t.registrationTimer=void 0,t.register()}),1e3*e-3e3),this.registrationExpiredTimer=setTimeout((function(){t.logger.warn("Registration expired"),t.unregistered()}),1e3*e),this._state!==Ki.Registered&&this.stateTransition(Ki.Registered)}},{key:"unregistered",value:function(){this.clearTimers(),this._state!==Ki.Unregistered&&this.stateTransition(Ki.Unregistered)}},{key:"terminated",value:function(){this.clearTimers(),this._state!==Ki.Terminated&&this.stateTransition(Ki.Terminated)}},{key:"stateTransition",value:function(e){var t=this,i=function(){throw new Error("Invalid state transition from ".concat(t._state," to ").concat(e))};switch(this._state){case Ki.Initial:e!==Ki.Registered&&e!==Ki.Unregistered&&e!==Ki.Terminated&&i();break;case Ki.Registered:e!==Ki.Unregistered&&e!==Ki.Terminated&&i();break;case Ki.Unregistered:e!==Ki.Registered&&e!==Ki.Terminated&&i();break;case Ki.Terminated:i();break;default:throw new Error("Unrecognized state.")}this._state=e,this.logger.log("Registration transitioned to state ".concat(this._state)),this._stateEventEmitter.emit("event",this._state)}},{key:"waiting",get:function(){return this._waiting}},{key:"waitingChange",get:function(){return Hi(this._waitingEventEmitter)}},{key:"waitingToggle",value:function(e){if(this._waiting===e)throw new Error("Invalid waiting transition from ".concat(this._waiting," to ").concat(e));this._waiting=e,this.logger.log("Waiting toggled to ".concat(this._waiting)),this._waitingEventEmitter.emit("event",this._waiting)}}],[{key:"newUUID",value:function(){var e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=Math.floor(16*Math.random()),i="x"===e?t:t%4+8;return i.toString(16)}));return e}}]),e}();an.defaultOptions={expires:20,extraContactHeaderParams:[],extraHeaders:[],logConfiguration:!0,instanceId:"",params:{},regId:0,registrar:new gt("sip","anonymous","anonymous.invalid")},function(e){e["Initial"]="Initial",e["NotifyWait"]="NotifyWait",e["Subscribed"]="Subscribed",e["Terminated"]="Terminated"}(rn||(rn={})),function(e){e[e["STATUS_CONNECTING"]=0]="STATUS_CONNECTING",e[e["STATUS_OPEN"]=1]="STATUS_OPEN",e[e["STATUS_CLOSING"]=2]="STATUS_CLOSING",e[e["STATUS_CLOSED"]=3]="STATUS_CLOSED"}(sn||(sn={}));var on,cn,un=function(e){(0,g.default)(i,e);var t=_(i);function i(e,n){var r;(0,h.default)(this,i),r=t.call(this,e),r.servers=[],r.reconnectionAttempts=0,r.status=sn.STATUS_CONNECTING,r.configuration=Object.assign(Object.assign({},i.defaultOptions),n);var s=n.wsServers;"string"===typeof s&&(s=[s]);var a,o=m(s);try{for(o.s();!(a=o.n()).done;){var c=a.value,u=vt.parse(c,"absoluteURI");if(-1===u)throw r.logger.error('Invalid WebSocket Server URL "'.concat(c,'"')),new Error("Invalid WebSocket Server URL");if(["wss","ws","udp"].indexOf(u.scheme)<0)throw r.logger.error('Invalid scheme in WebSocket Server URL "'.concat(c,'"')),new Error("Invalid scheme in WebSocket Server URL");var l=u.scheme.toUpperCase(),d="<sip:"+u.host+(u.port?":"+u.port:"")+";transport="+u.scheme.replace(/^wss$/i,"ws")+";lr>",f=c;r.servers.push({scheme:l,sipUri:d,wsUri:f,weight:0,isError:!1})}}catch(g){o.e(g)}finally{o.f()}if(0===r.servers.length)throw new Error("No WebSocket server.");return r.server=r.servers[0],r}return(0,f.default)(i,[{key:"isConnected",value:function(){return this.status===sn.STATUS_OPEN}},{key:"sendPromise",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0===this.ws)return this.onError("unable to send message - WebSocket undefined"),Promise.reject(new Error("WebSocket undefined."));if(!this.statusAssert(sn.STATUS_OPEN,t.force))return this.onError("unable to send message - WebSocket not open"),Promise.reject(new Error("WebSocket not open."));!0===this.configuration.traceSip&&this.logger.log("sending WebSocket message:\n\n"+e+"\n");try{this.ws.send(e)}catch(i){return i instanceof i&&Promise.reject(i),Promise.reject(new Error("Failed to send message."))}return Promise.resolve({msg:e})}},{key:"disconnectPromise",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.disconnectionPromise?this.disconnectionPromise:(t.code=t.code||1e3,this.statusTransition(sn.STATUS_CLOSING,t.force)?(this.emit("disconnecting"),this.disconnectionPromise=new Promise((function(i,n){e.disconnectDeferredResolve=i,e.reconnectTimer&&(clearTimeout(e.reconnectTimer),e.reconnectTimer=void 0),e.ws?(e.stopSendingKeepAlives(),e.logger.log("closing WebSocket "+e.server.wsUri),e.ws.close(t.code,t.reason)):n("Attempted to disconnect but the websocket doesn't exist")})),this.disconnectionPromise):this.status===sn.STATUS_CLOSED?Promise.resolve({overrideEvent:!0}):this.connectionPromise?this.connectionPromise.then((function(){return Promise.reject("The websocket did not disconnect")})).catch((function(){return Promise.resolve({overrideEvent:!0})})):Promise.reject("The websocket did not disconnect"))}},{key:"connectPromise",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.status!==sn.STATUS_CLOSING||t.force?(this.connectionPromise||(this.server=this.server||this.getNextWsServer(t.force),this.connectionPromise=new Promise((function(i,n){if((e.status===sn.STATUS_OPEN||e.status===sn.STATUS_CLOSING)&&!t.force)return e.logger.warn("WebSocket "+e.server.wsUri+" is already connected"),void n("Failed status check - attempted to open a connection but already open/closing");e.connectDeferredResolve=i,e.connectDeferredReject=n,e.status=sn.STATUS_CONNECTING,e.emit("connecting"),e.logger.log("connecting to WebSocket "+e.server.wsUri),e.disposeWs();try{e.ws=new WebSocket(e.server.wsUri,"sip")}catch(r){return e.ws=void 0,e.statusTransition(sn.STATUS_CLOSED,!0),e.onError("error connecting to WebSocket "+e.server.wsUri+":"+r),n("Failed to create a websocket"),e.connectDeferredResolve=void 0,void(e.connectDeferredReject=void 0)}if(!e.ws)return n("Unexpected instance websocket not set"),e.connectDeferredResolve=void 0,void(e.connectDeferredReject=void 0);e.connectionTimeout=setTimeout((function(){e.statusTransition(sn.STATUS_CLOSED),e.logger.warn("took too long to connect - exceeded time set in configuration.connectionTimeout: "+e.configuration.connectionTimeout+"s"),e.emit("disconnected",{code:1e3}),e.connectionPromise=void 0,n("Connection timeout"),e.connectDeferredResolve=void 0,e.connectDeferredReject=void 0;var t=e.ws;e.disposeWs(),t&&t.close(1e3)}),1e3*e.configuration.connectionTimeout),e.boundOnOpen=e.onOpen.bind(e),e.boundOnMessage=e.onMessage.bind(e),e.boundOnClose=e.onClose.bind(e),e.boundOnError=e.onWebsocketError.bind(e),e.ws.addEventListener("open",e.boundOnOpen),e.ws.addEventListener("message",e.boundOnMessage),e.ws.addEventListener("close",e.boundOnClose),e.ws.addEventListener("error",e.boundOnError)}))),this.connectionPromise):Promise.reject("WebSocket "+this.server.wsUri+" is closing")}},{key:"onMessage",value:function(e){var t,i=e.data;if(/^(\r\n)+$/.test(i))return this.clearKeepAliveTimeout(),void(!0===this.configuration.traceSip&&this.logger.log("received WebSocket message with CRLF Keep Alive response"));if(i){if("string"!==typeof i){try{t=String.fromCharCode.apply(null,new Uint8Array(i))}catch(n){return void this.logger.warn("received WebSocket binary message failed to be converted into string, message discarded")}!0===this.configuration.traceSip&&this.logger.log("received WebSocket binary message:\n\n"+i+"\n")}else!0===this.configuration.traceSip&&this.logger.log("received WebSocket text message:\n\n"+i+"\n"),t=i;this.emit("message",t)}else this.logger.warn("received empty message, message discarded")}},{key:"onOpen",value:function(){if(this.status===sn.STATUS_CLOSED){var e=this.ws;return this.disposeWs(),void(e&&e.close(1e3))}this.statusTransition(sn.STATUS_OPEN,!0),this.emit("connected"),this.connectionTimeout&&(clearTimeout(this.connectionTimeout),this.connectionTimeout=void 0),this.logger.log("WebSocket "+this.server.wsUri+" connected"),void 0!==this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=void 0),this.reconnectionAttempts=0,this.disconnectionPromise=void 0,this.disconnectDeferredResolve=void 0,this.startSendingKeepAlives(),this.connectDeferredResolve?(this.connectDeferredResolve({overrideEvent:!0}),this.connectDeferredResolve=void 0,this.connectDeferredReject=void 0):this.logger.warn("Unexpected websocket.onOpen with no connectDeferredResolve")}},{key:"onClose",value:function(e){if(this.logger.log("WebSocket disconnected (code: "+e.code+(e.reason?"| reason: "+e.reason:"")+")"),this.status!==sn.STATUS_CLOSING&&(this.logger.warn("WebSocket closed without SIP.js requesting it"),this.emit("transportError")),this.stopSendingKeepAlives(),this.connectionTimeout&&clearTimeout(this.connectionTimeout),this.connectDeferredReject&&this.connectDeferredReject("Websocket Closed"),this.connectionTimeout=void 0,this.connectionPromise=void 0,this.connectDeferredResolve=void 0,this.connectDeferredReject=void 0,this.disconnectDeferredResolve)return this.disconnectDeferredResolve({overrideEvent:!0}),this.statusTransition(sn.STATUS_CLOSED),void(this.disconnectDeferredResolve=void 0);this.statusTransition(sn.STATUS_CLOSED,!0),this.emit("disconnected",{code:e.code,reason:e.reason}),this.disposeWs(),this.reconnect()}},{key:"disposeWs",value:function(){this.ws&&(this.ws.removeEventListener("open",this.boundOnOpen),this.ws.removeEventListener("message",this.boundOnMessage),this.ws.removeEventListener("close",this.boundOnClose),this.ws.removeEventListener("error",this.boundOnError),this.ws=void 0)}},{key:"onError",value:function(e){this.logger.warn("Transport error: "+e),this.emit("transportError")}},{key:"onWebsocketError",value:function(){this.onError("The Websocket had an error")}},{key:"reconnect",value:function(){var e=this;if(this.reconnectionAttempts>0&&this.logger.log("Reconnection attempt "+this.reconnectionAttempts+" failed"),this.noAvailableServers())return this.logger.warn("attempted to get next ws server but there are no available ws servers left"),this.logger.warn("no available ws servers left - going to closed state"),this.statusTransition(sn.STATUS_CLOSED,!0),this.emit("closed"),void this.resetServerErrorStatus();this.isConnected()&&(this.logger.warn("attempted to reconnect while connected - forcing disconnect"),this.disconnect({force:!0})),this.reconnectionAttempts+=1,this.reconnectionAttempts>this.configuration.maxReconnectionAttempts?(this.logger.warn("maximum reconnection attempts for WebSocket "+this.server.wsUri),this.logger.log("transport "+this.server.wsUri+" failed | connection state set to 'error'"),this.server.isError=!0,this.emit("transportError"),this.noAvailableServers()||(this.server=this.getNextWsServer()),this.reconnectionAttempts=0,this.reconnect()):(this.logger.log("trying to reconnect to WebSocket "+this.server.wsUri+" (reconnection attempt "+this.reconnectionAttempts+")"),this.reconnectTimer=setTimeout((function(){e.connect(),e.reconnectTimer=void 0}),1===this.reconnectionAttempts?0:1e3*this.configuration.reconnectionTimeout))}},{key:"resetServerErrorStatus",value:function(){var e,t=m(this.servers);try{for(t.s();!(e=t.n()).done;){var i=e.value;i.isError=!1}}catch(n){t.e(n)}finally{t.f()}}},{key:"getNextWsServer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.noAvailableServers())throw this.logger.warn("attempted to get next ws server but there are no available ws servers left"),new Error("Attempted to get next ws server, but there are no available ws servers left.");var t,i=[],n=m(this.servers);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.isError&&!e||(0===i.length?i.push(r):r.weight>i[0].weight?i=[r]:r.weight===i[0].weight&&i.push(r))}}catch(a){n.e(a)}finally{n.f()}var s=Math.floor(Math.random()*i.length);return i[s]}},{key:"noAvailableServers",value:function(){var e,t=m(this.servers);try{for(t.s();!(e=t.n()).done;){var i=e.value;if(!i.isError)return!1}}catch(n){t.e(n)}finally{t.f()}return!0}},{key:"sendKeepAlive",value:function(){var e=this;if(!this.keepAliveDebounceTimeout)return this.keepAliveDebounceTimeout=setTimeout((function(){e.emit("keepAliveDebounceTimeout"),e.clearKeepAliveTimeout()}),1e3*this.configuration.keepAliveDebounce),this.send("\r\n\r\n")}},{key:"clearKeepAliveTimeout",value:function(){this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveDebounceTimeout=void 0}},{key:"startSendingKeepAlives",value:function(){var e=this;this.configuration.keepAliveInterval&&!this.keepAliveInterval&&(this.keepAliveInterval=setInterval((function(){e.sendKeepAlive(),e.startSendingKeepAlives()}),function(e){var t=.8*e;return 1e3*(Math.random()*(e-t)+t)}(this.configuration.keepAliveInterval)))}},{key:"stopSendingKeepAlives",value:function(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval),this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveInterval=void 0,this.keepAliveDebounceTimeout=void 0}},{key:"statusAssert",value:function(e,t){return e===this.status||(t?(this.logger.warn("Attempted to assert "+Object.keys(sn)[this.status]+" as "+Object.keys(sn)[e]+"- continuing with option: 'force'"),!0):(this.logger.warn("Tried to assert "+Object.keys(sn)[e]+" but is currently "+Object.keys(sn)[this.status]),!1))}},{key:"statusTransition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.logger.log("Attempting to transition status from "+Object.keys(sn)[this.status]+" to "+Object.keys(sn)[e]),e===sn.STATUS_CONNECTING&&this.statusAssert(sn.STATUS_CLOSED,t)||e===sn.STATUS_OPEN&&this.statusAssert(sn.STATUS_CONNECTING,t)||e===sn.STATUS_CLOSING&&this.statusAssert(sn.STATUS_OPEN,t)||e===sn.STATUS_CLOSED?(this.status=e,!0):(this.logger.warn("Status transition failed - result: no-op - reason: either gave an nonexistent status or attempted illegal transition"),!1)}}]),i}(Oi);un.C=sn,un.defaultOptions={wsServers:[],connectionTimeout:5,maxReconnectionAttempts:30,reconnectionTimeout:4,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0},function(e){e["Initial"]="Initial",e["Starting"]="Starting",e["Started"]="Started",e["Stopping"]="Stopping",e["Stopped"]="Stopped"}(on||(on={})),function(e){e[e["STATUS_INIT"]=0]="STATUS_INIT",e[e["STATUS_STARTING"]=1]="STATUS_STARTING",e[e["STATUS_READY"]=2]="STATUS_READY",e[e["STATUS_USER_CLOSED"]=3]="STATUS_USER_CLOSED",e[e["STATUS_NOT_READY"]=4]="STATUS_NOT_READY"}(cn||(cn={}));var ln=function(){function t(){var e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,h.default)(this,t),this.data={},this.applicants={},this.publishers={},this.registerers={},this.sessions={},this.subscriptions={},this.loggerFactory=new Ii,this._state=on.Initial,this._stateEventEmitter=new y,this.status=cn.STATUS_INIT,this.unloadListener=function(){e.stop()},this.delegate=i.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t.defaultOptions),{sipjsId:yt(5)}),{uri:new gt("sip","anonymous."+yt(6),"anonymous.invalid")}),{viaHost:yt(12)+".invalid"}),t.stripUndefinedProperties(i)),this.options.hackIpInContact)if("boolean"===typeof this.options.hackIpInContact&&this.options.hackIpInContact){var n=1,r=254,s=Math.floor(Math.random()*(r-n+1)+n);this.options.viaHost="192.0.2."+s}else this.options.hackIpInContact&&(this.options.viaHost=this.options.hackIpInContact.toString());switch(this.logger=this.loggerFactory.getLogger("sip.UserAgent"),this.loggerFactory.builtinEnabled=this.options.logBuiltinEnabled,this.loggerFactory.connector=this.options.logConnector,this.options.logLevel){case"error":this.loggerFactory.level=vi.error;break;case"warn":this.loggerFactory.level=vi.warn;break;case"log":this.loggerFactory.level=vi.log;break;case"debug":this.loggerFactory.level=vi.debug;break;default:break}this.options.logConfiguration&&(this.logger.log("Configuration:"),Object.keys(this.options).forEach((function(t){var i=e.options[t];switch(t){case"uri":case"sessionDescriptionHandlerFactory":e.logger.log("\xb7 "+t+": "+i);break;case"authorizationPassword":e.logger.log("\xb7 "+t+": NOT SHOWN");break;case"transportConstructor":e.logger.log("\xb7 "+t+": "+i.name);break;default:e.logger.log("\xb7 "+t+": "+JSON.stringify(i))}}))),this.transport=new this.options.transportConstructor(this.getLogger("sip.Transport"),this.options.transportOptions),this.contact=this.initContact(),this.userAgentCore=this.initCore(),this.options.autoStart&&this.start()}return(0,f.default)(t,[{key:"configuration",get:function(){return this.options}},{key:"start",value:function(){if(this.logger.log("user requested startup..."),this.status===cn.STATUS_INIT)return this.status=cn.STATUS_STARTING,this.setTransportListeners(),this.transport.connect();if(this.status===cn.STATUS_USER_CLOSED||this.status===cn.STATUS_NOT_READY)return this.logger.log("resuming"),this.status=cn.STATUS_READY,this.transport.connect();if(this.status===cn.STATUS_STARTING?this.logger.log("UA is in STARTING status, not opening new connection"):this.status===cn.STATUS_READY?this.logger.log("UA is in READY status, not resuming"):this.logger.error("Connection is down. Auto-Recovery system is trying to connect"),this.options.autoStop){var e=!("undefined"===typeof chrome||!chrome.app||!chrome.app.runtime);"undefined"===typeof window||"function"!==typeof window.addEventListener||e||window.addEventListener("unload",this.unloadListener)}return Promise.resolve()}},{key:"stop",value:function(){var e=(0,d.default)(s.default.mark((function e(){var t,i,n,r,a,o,c;return s.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.logger.log("Stopping user agent ".concat(this.configuration.uri,"...")),this.status===cn.STATUS_USER_CLOSED&&this.logger.warn("UA already closed"),e.t0=s.default.keys(this.registerers);case 3:if((e.t1=e.t0()).done){e.next=10;break}if(t=e.t1.value,!this.registerers[t]){e.next=8;break}return e.next=8,this.registerers[t].dispose();case 8:e.next=3;break;case 10:e.t2=s.default.keys(this.sessions);case 11:if((e.t3=e.t2()).done){e.next=27;break}if(i=e.t3.value,!this.sessions[i]){e.next=25;break}this.logger.log("closing session "+i),n=this.sessions[i],e.t4=n.state,e.next=e.t4===Vi.Initial||e.t4===Vi.Establishing?19:e.t4===Vi.Established?22:(e.t4===Vi.Terminating||(e.t4,Vi.Terminated),24);break;case 19:return n instanceof Yi&&n.reject(),n instanceof en&&n.cancel(),e.abrupt("break",25);case 22:return n._bye(),e.abrupt("break",25);case 24:return e.abrupt("break",25);case 25:e.next=11;break;case 27:for(r in this.subscriptions)this.subscriptions[r]&&(this.logger.log("unsubscribe "+r),this.subscriptions[r].unsubscribe());for(a in this.publishers)this.publishers[a]&&(this.logger.log("unpublish "+a),this.publishers[a]._close());for(o in this.applicants)this.applicants[o]&&this.applicants[o]._close();return this.status=cn.STATUS_USER_CLOSED,this.transport.disconnect(),this.userAgentCore.reset(),this.options.autoStop&&(c=!("undefined"===typeof chrome||!chrome.app||!chrome.app.runtime),"undefined"!==typeof window&&window.removeEventListener&&!c&&window.removeEventListener("unload",this.unloadListener)),e.abrupt("return",Promise.resolve());case 35:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"findSession",value:function(e){return this.sessions[e.callId+e.fromTag]||this.sessions[e.callId+e.toTag]||void 0}},{key:"getLogger",value:function(e,t){return this.loggerFactory.getLogger(e,t)}},{key:"getLoggerFactory",value:function(){return this.loggerFactory}},{key:"getSupportedResponseOptions",value:function(){var e=[];(this.contact.pubGruu||this.contact.tempGruu)&&e.push("gruu"),this.options.sipExtension100rel===$i.Supported&&e.push("100rel"),this.options.sipExtensionReplaces===$i.Supported&&e.push("replaces"),e.push("outbound"),e=e.concat(this.options.sipExtensionExtraSupported||[]);var t=this.options.hackAllowUnregisteredOptionTags||!1,i={};return e=e.filter((function(e){var n=Ji[e],r=!i[e];return i[e]=!0,(n||t)&&r})),e}},{key:"makeInviter",value:function(e,t){return new en(this,e,t)}},{key:"onTransportError",value:function(){this.status!==cn.STATUS_USER_CLOSED&&(this.status=cn.STATUS_NOT_READY)}},{key:"setTransportListeners",value:function(){var e=this;this.transport.on("connected",(function(){return e.onTransportConnected()})),this.transport.on("message",(function(t){return e.onTransportReceiveMsg(t)})),this.transport.on("transportError",(function(){return e.onTransportError()}))}},{key:"onTransportConnected",value:function(){for(var t in e("warn","onTransportConnected2"," at util/webrtc.js:30630"),this.registerers)this.registerers[t]&&this.registerers[t].register()}},{key:"onTransportReceiveMsg",value:function(e){var t=this,i=Ot.parseMessage(e,this.getLogger("sip.parser"));if(i)if(this.status===cn.STATUS_USER_CLOSED&&i instanceof bt)this.logger.warn("Received ".concat(i.method," request in state USER_CLOSED. Dropping."));else{var n=function(){for(var e=0,n=["from","to","call_id","cseq","via"];e<n.length;e++){var r=n[e];if(!i.hasHeader(r))return t.logger.warn("Missing mandatory header field : ".concat(r,".")),!1}return!0};if(i instanceof bt){if(!n())return void this.logger.warn("Request missing mandatory header field. Dropping.");if(!i.toTag&&i.callId.substr(0,5)===this.options.sipjsId)return void this.userAgentCore.replyStateless(i,{statusCode:482});var r=wt(i.body),s=i.getHeader("content-length");if(s&&r<Number(s))return void this.userAgentCore.replyStateless(i,{statusCode:400})}if(i instanceof Et){if(!n())return void this.logger.warn("Response missing mandatory header field. Dropping.");if(i.getHeaders("via").length>1)return void this.logger.warn("More than one Via header field present in the response. Dropping.");if(i.via.host!==this.options.viaHost||void 0!==i.via.port)return void this.logger.warn("Via sent-by in the response does not match UA Via host value. Dropping.");var a=wt(i.body),o=i.getHeader("content-length");if(o&&a<Number(o))return void this.logger.warn("Message body length is lower than the value in Content-Length header field. Dropping.")}if(i instanceof bt)this.userAgentCore.receiveIncomingRequestFromTransport(i);else{if(!(i instanceof Et))throw new Error("Invalid message type.");this.userAgentCore.receiveIncomingResponseFromTransport(i)}}else this.logger.warn("Failed to parse incoming message. Dropping.")}},{key:"initContact",value:function(){var e=this,t=yt(8),i=this.options.hackWssInTransport?"wss":"ws",n={pubGruu:void 0,tempGruu:void 0,uri:new gt("sip",t,this.options.viaHost,void 0,{transport:i}),toString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.anonymous||!1,r=t.outbound||!1,s="<";return s+=n?e.contact.tempGruu||"sip:anonymous@anonymous.invalid;transport=".concat(i):e.contact.pubGruu||e.contact.uri,r&&(s+=";ob"),s+=">",s}};return n}},{key:"initCore",value:function(){var e,t=this,i=[];(i.push("outbound"),this.options.sipExtension100rel===$i.Supported&&i.push("100rel"),this.options.sipExtensionReplaces===$i.Supported&&i.push("replaces"),this.options.sipExtensionExtraSupported)&&(e=i).push.apply(e,(0,o.default)(this.options.sipExtensionExtraSupported));this.options.hackAllowUnregisteredOptionTags||(i=i.filter((function(e){return Ji[e]}))),i=Array.from(new Set(i));var n=i.slice();(this.contact.pubGruu||this.contact.tempGruu)&&n.push("gruu");var r={aor:this.options.uri,contact:this.contact,displayName:this.options.displayName,loggerFactory:this.loggerFactory,hackViaTcp:this.options.hackViaTcp,routeSet:this.options.usePreloadedRoute&&this.transport.server&&this.transport.server.sipUri?[this.transport.server.sipUri]:[],supportedOptionTags:i,supportedOptionTagsResponse:n,sipjsId:this.options.sipjsId,userAgentHeaderFieldValue:this.options.userAgentString,viaForceRport:this.options.forceRport,viaHost:this.options.viaHost,authenticationFactory:function(){var e=t.options.authorizationUsername?t.options.authorizationUsername:t.options.uri.user,i=t.options.authorizationPassword?t.options.authorizationPassword:void 0;return new qt(t.getLoggerFactory(),e,i)},transportAccessor:function(){return t.transport}},s={onInvite:function(e){var i=new Yi(t,e);if(e.delegate={onCancel:function(e){i._onCancel(e)},onTransportError:function(e){t.logger.error("A transport error has occured while handling an incoming INVITE request.")}},e.trying(),t.options.sipExtensionReplaces!==$i.Unsupported){var n=e.message,r=n.parseHeader("replaces");if(r){var s=r.call_id;if("string"!==typeof s)throw new Error("Type of call id is not string");var a=r.replaces_to_tag;if("string"!==typeof a)throw new Error("Type of to tag is not string");var o=r.replaces_from_tag;if("string"!==typeof o)throw new Error("type of from tag is not string");var c=s+a+o,u=t.userAgentCore.dialogs.get(c);if(!u)return void i.reject({statusCode:481});if(!u.early&&!0===r.early_only)return void i.reject({statusCode:486});var l=t.sessions[s+o]||t.sessions[s+a]||void 0;if(!l)throw new Error("Session does not exist.");i.replacee=l}}if(t.delegate&&t.delegate.onInvite)if(i.autoSendAnInitialProvisionalResponse){var d=t.delegate.onInvite;i.progress().then((function(){return d(i)}))}else t.delegate.onInvite(i);else i.reject({statusCode:486})},onMessage:function(e){if(t.delegate&&t.delegate.onMessage){var i=new tn(e);t.delegate.onMessage(i)}else e.accept()},onNotify:function(e){if(t.delegate&&t.delegate.onNotify){var i=new Gi(e);t.delegate.onNotify(i)}else t.options.allowLegacyNotifications?e.accept():e.reject({statusCode:481})},onRefer:function(e){t.logger.log("Received an out of dialog refer"),t.options.allowOutOfDialogRefers||e.reject({statusCode:405}),t.logger.log("Allow out of dialog refers is enabled on the UA")},onRegister:function(e){t.delegate&&t.delegate.onRegisterRequest&&t.delegate.onRegisterRequest(e)},onSubscribe:function(e){t.delegate&&t.delegate.onSubscribeRequest&&t.delegate.onSubscribeRequest(e)}};return new Di(r,s)}}],[{key:"makeURI",value:function(e){return vt.URIParse(e)}},{key:"stripUndefinedProperties",value:function(e){return Object.keys(e).reduce((function(t,i){return void 0!==e[i]&&(t[i]=e[i]),t}),{})}}]),t}();ln.defaultOptions={allowLegacyNotifications:!1,allowOutOfDialogRefers:!1,authorizationPassword:"",authorizationUsername:"",autoStart:!1,autoStop:!0,delegate:{},displayName:"",forceRport:!1,hackAllowUnregisteredOptionTags:!1,hackIpInContact:!1,hackViaTcp:!1,hackWssInTransport:!1,logBuiltinEnabled:!0,logConfiguration:!0,logConnector:function(){},logLevel:"log",noAnswerTimeout:60,sessionDescriptionHandlerFactory:Li.defaultFactory,sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:$i.Unsupported,sipExtensionReplaces:$i.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:un,transportOptions:{},uri:new gt("sip","anonymous","anonymous.invalid"),usePreloadedRoute:!1,userAgentString:"xyplat",viaHost:""};var dn,hn=function(t){(0,g.default)(n,t);var i=_(n);function n(t){var r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,h.default)(this,n),r=i.call(this),r.registerer=void 0,r.delegate=s.delegate,r.options=Object.assign({},s);var a=Object.assign({},s.userAgentOptions);if(a.transportConstructor||(a.transportConstructor=un),a.transportOptions||(a.transportOptions={wsServers:t}),!a.uri&&s.aor){var o=ln.makeURI(s.aor);if(!o)throw new Error("Failed to create valid URI from ".concat(s.aor));a.uri=o}return r.userAgent=new ln(a),r.userAgent.delegate={onInvite:function(e){r.logger.log("[".concat(r.id,"] received INVITE")),e.setDelegate(r.delegate);r.constraints;if(r.delegate&&r.delegate.onCallReceived){var t="",i="",n="",s="",a=!1;if(null!=e._ifcContent){var o=e._ifcContent.split(","),c=o[0].split(".");t=c[0],i=c[1],n=c[2],c.length>=4&&(s=c[3]),o.length>=3&&"planinfo:1"==o[2]&&(a=!0)}r.delegate.onCallReceived(e.id,e.remoteIdentity.uri.user,t,i,n);var u=new pn;u.id=e.id,u.orgCaller=e.remoteIdentity.uri.user,u.cid=t,u.calltype=i,u.caller=n,u.isPlan=a,"1"==s&&(u.isScheduleConference=!0),u.isVideo=e.isVideo,u.invitation=e,r.emit(dn.IncomingCall.toString(),u)}else r.logger.warn("[".concat(r.id,"] no handler available, rejecting INVITE...")),e.reject().then((function(){r.logger.log("[".concat(r.id,"] rejected INVITE"))})).catch((function(e){r.logger.error("[".concat(r.id,"] failed to reject INVITE")),r.logger.error(e.toString())}))},onMessage:function(t){e("log","message.request.body"," at util/webrtc.js:31150"),t.accept().then((function(){e("log",t.request.body," at util/webrtc.js:31153"),r.delegate&&r.delegate.onMessageReceived&&r.delegate.onMessageReceived(t.request.body)}))}},r.logger=r.userAgent.getLogger("sip.SimpleUser"),r}return(0,f.default)(n,[{key:"id",get:function(){return this.options.userAgentOptions&&this.options.userAgentOptions.displayName||"Anonymous"}},{key:"connect",value:function(){return this.logger.log("[".concat(this.id,"] starting UserAgent...")),this.userAgent.start()}},{key:"disconnect",value:function(){return this.logger.log("[".concat(this.id,"] stopping UserAgent...")),this.userAgent.stop()}},{key:"register",value:function(e,t){var i=this;return this.logger.log("[".concat(this.id,"] registering UserAgent...")),this.registerer||(this.registerer=new an(this.userAgent,e),this.registerer.stateChange.on((function(e){switch(e){case Ki.Initial:break;case Ki.Registered:i.delegate&&i.delegate.onRegistered&&i.delegate.onRegistered();break;case Ki.Unregistered:i.delegate&&i.delegate.onUnregistered&&i.delegate.onUnregistered();break;case Ki.Terminated:i.registerer=void 0,alert("reg termianl");break;default:throw new Error("Unknown registerer state.")}}))),this.registerer.register(t).then((function(){}))}},{key:"unregister",value:function(e){return this.logger.log("[".concat(this.id,"] unregistering UserAgent...")),this.registerer?this.registerer.unregister(e).then((function(){})):Promise.resolve()}},{key:"call1",value:function(e,t,i,n,r,s){this.logger.log("[".concat(this.id,"] beginning Session..."));var a=ln.makeURI(e);if(!a)return Promise.reject(new Error('Failed to create a valid URI from "'.concat(e,'"')));r||(r={}),r.sessionDescriptionHandlerOptions||(r.sessionDescriptionHandlerOptions={}),r.sessionDescriptionHandlerOptions.constraints||(r.sessionDescriptionHandlerOptions.constraints=this.constraints);var o=new en(this.userAgent,a,r);return this.sendInvite1(o,t,i,n,r,s).then((function(){}))}},{key:"hangup1",value:function(e){var t=this;this.logger.log("[".concat(this.id,"] ending Session..."));var i=this.userAgent.sessions[e];if(i instanceof en){if(i.state===Vi.Initial||i.state===Vi.Establishing)return i.cancel().then((function(){t.logger.log("[".concat(t.id,"] sent CANCEL"))}))}else if(i instanceof Yi&&(i.state===Vi.Initial||i.state===Vi.Establishing))return i.reject().then((function(){t.logger.log("[".concat(t.id,"] sent reject"))}));return new Zi(i).bye().then((function(){t.logger.log("[".concat(t.id,"] sent BYE"))}))}},{key:"answerVideo",value:function(e,t){this.answer1(e,t,null,{sessionDescriptionHandlerOptions:{constraints:{audio:!0,video:!0}}})}},{key:"answerAudio",value:function(e,t){this.answer1(e,t,null,{sessionDescriptionHandlerOptions:{constraints:{audio:!0,video:!1}}})}},{key:"answer2",value:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:100,c=!(arguments.length>8&&void 0!==arguments[8])||arguments[8];navigator.mediaDevices.enumerateDevices().then((function(e){var t=0,n="";e.forEach((function(e){"videoinput"==e.kind&&(t++,n=e.label)})),(0==t||1==t&&"sceen-capture-recorder"==n)&&(i=!1)}));var u=null;u=!!i&&(""==r||(0!=s&&0!=a?{deviceId:{exact:r},frameRate:o,width:{exact:s},height:{exact:a}}:{deviceId:{exact:r},frameRate:o}));var l={RTCOfferOptions:{iceRestart:!1,offerToReceiveAudio:!0,offerToReceiveVideo:c},constraints:{audio:""==n||{deviceId:{exact:n}},video:u}},d={sessionDescriptionHandlerOptions:l};return this.answer1(e,t,null,d)}},{key:"answer1",value:function(e,t,i,n){this.logger.log("[".concat(this.id,"] accepting Invitation...")),n||(n={}),n.sessionDescriptionHandlerOptions||(n.sessionDescriptionHandlerOptions={}),n.sessionDescriptionHandlerOptions.constraints||(n.sessionDescriptionHandlerOptions.constraints=this.constraints);var r=this.userAgent.sessions[e],s=r;return null==s&&this.logger.warn("[".concat(this.id,"] answer not find call...").concat(e)),s.setupCall(null,t,this.logger,i),s.accept(n)}},{key:"declineById",value:function(e){this.logger.log("[".concat(this.id,"] rejecting Invitation..."));var t=this.userAgent.sessions[e],i=t;return i.reject()}},{key:"hold1",value:function(e){this.logger.log("[".concat(this.id,"] holding session..."));var t=this.userAgent.sessions[e];if(!t)return Promise.reject(new Error("Session does not exist."));if(t.state!==Vi.Established)return Promise.reject(new Error("Session is not established."));var i=t.sessionDescriptionHandler;if(!(i instanceof Li))throw new Error("Session's session description handler not instance of SessionDescriptionHandler.");var n={sessionDescriptionHandlerModifiers:[i.holdModifier]};return this.mute(e),t.invite(n).then((function(){}))}},{key:"unhold1",value:function(e){this.logger.log("[".concat(this.id,"] unholding session..."));var t=this.userAgent.sessions[e];if(!t)return Promise.reject(new Error("Session does not exist."));if(t.state!==Vi.Established)return Promise.reject(new Error("Session is not established."));var i=t.sessionDescriptionHandler;if(!(i instanceof Li))throw new Error("Session's session description handler not instance of SessionDescriptionHandler.");return this.unmute(e),t.invite({}).then((function(){}))}},{key:"mute",value:function(e){return this.muteDetail(e,!0,!0)}},{key:"muteAudio",value:function(e){return this.muteDetail(e,!0,!1)}},{key:"muteVideo",value:function(e){return this.muteDetail(e,!1,!0)}},{key:"muteDetail",value:function(e,t,i){this.logger.log("[".concat(this.id,"] disabling media tracks..."));var n=this.userAgent.sessions[e];n?n.state===Vi.Established?this.enableSenderTracksDetail(e,!1,t,i):this.logger.warn("[".concat(this.id,"] an established session is required to disable media tracks")):this.logger.warn("[".concat(this.id,"] an session is required to disable media tracks"))}},{key:"unmuteDetail",value:function(e,t,i){this.logger.log("[".concat(this.id,"] enabling media tracks..."));var n=this.userAgent.sessions[e];n?n.state===Vi.Established?this.enableSenderTracksDetail(e,!0,t,i):this.logger.warn("[".concat(this.id,"] an established session is required to enable media tracks")):this.logger.warn("[".concat(this.id,"] an session is required to enable media tracks"))}},{key:"unmute",value:function(e){return this.unmuteDetail(e,!0,!0)}},{key:"unmuteAudio",value:function(e){return this.unmuteDetail(e,!0,!1)}},{key:"unmuteVideo",value:function(e){return this.unmuteDetail(e,!1,!0)}},{key:"sendDTMF",value:function(e,t){if(this.logger.log("[".concat(this.id,"] sending DTMF...")),!t.match(/^[0-9A-D#*,]$/))return Promise.reject(new Error("Invalid DTMF tone."));var i=this.userAgent.sessions[e];if(i){if(!i)return Promise.reject(new Error("Session does not exist."));this.logger.log("Sending DTMF tone: "+t);var n=t,r={contentDisposition:"render",contentType:"application/dtmf-relay",content:"Signal="+n+"\r\nDuration=2000"},s={body:r};return new Qi(i).info({requestOptions:s}).then((function(){}))}this.logger.warn("[".concat(this.id,"] an session is required to senddtmf"))}},{key:"message",value:function(e,t){this.logger.log("[".concat(this.id,"] sending message..."));var i=ln.makeURI(e);return i?new nn(this.userAgent,i,t).message():Promise.reject(new Error('Failed to create a valid URI from "'.concat(e,'"')))}},{key:"constraints",get:function(){var e={audio:!0,video:!1};if(this.options.media&&this.options.media.constraints&&(e=Object.assign({},this.options.media.constraints),!e.audio&&!e.video))throw new Error("Invalid media constraints - audio and/or video must be true.");return e}},{key:"enableSenderTracksDetail",value:function(e,t,i,n){var r=this.userAgent.sessions[e];if(!r)throw new Error("Session does not exist.");var s=r.sessionDescriptionHandler;if(!(s instanceof Li))throw new Error("Session's session description handler not instance of SessionDescriptionHandler.");var a=s.peerConnection;a.getSenders().forEach((function(e){e.track&&(n&&"video"==e.track.kind&&(e.track.enabled=t),i&&"audio"==e.track.kind&&(e.track.enabled=t))}))}},{key:"enableSenderTracks",value:function(e,t){return this.enableSenderTracksDetail(e,t,!0,!0)}},{key:"initSession1",value:function(e,t,i,n,r){var s=this.userAgent.getLogger("sip.Call");e.setupCall(t,i,s,n),e.setDelegate(this.delegate),this.delegate&&this.delegate.onCallCreated&&this.delegate.onCallCreated(e.id,e.remoteVideoControal)}},{key:"sendInvite1",value:function(e,t,i,n,r,s){var a=this;return this.initSession1(e,t,i,n,r),e.invite(s).then((function(e){a.logger.log("[".concat(a.id,"] sent INVITE"))}))}},{key:"cleanupMedia",value:function(){this.options.media&&(this.options.media.local&&this.options.media.local.video&&(this.options.media.local.video.srcObject=null,this.options.media.local.video.pause()),this.options.media.remote&&(this.options.media.remote.audio&&(this.options.media.remote.audio.srcObject=null,this.options.media.remote.audio.pause()),this.options.media.remote.video&&(this.options.media.remote.video.srcObject=null,this.options.media.remote.video.pause())))}},{key:"previewCamera",value:function(e){return navigator.mediaDevices.getUserMedia({audio:!1,video:!0}).then((function(t){return e.srcObject=t,e.play(),Promise.resolve()})).catch((function(e){return Promise.reject(e)}))}},{key:"changeVideoElement",value:function(e,t){this.logger.log("[".concat(this.id,"] changeVideoElement..."));var i=this.userAgent.sessions[e];if(i instanceof Xi){var n=i;n.changeVideoElement(t)}}},{key:"getIsVideoByCallId",value:function(e){var t=this.userAgent.sessions[e];if(!t)return!1;if(t instanceof Xi){var i=t;return i.isVideo}return!1}}]),n}(y);(function(e){e[e["IncomingCall"]=0]="IncomingCall"})(dn||(dn={}));var fn,gn,pn=(0,f.default)((function e(){(0,h.default)(this,e),this.isScheduleConference=!1}));(function(e){e[e["Sip"]=0]="Sip",e[e["APPDevice"]=1]="APPDevice",e[e["Dispatcher"]=2]="Dispatcher"})(fn||(fn={})),function(e){e[e["None"]=0]="None",e[e["Init"]=1]="Init",e[e["Normal"]=2]="Normal",e[e["Callout"]=3]="Callout",e[e["Incoming"]=4]="Incoming",e[e["Ringing"]=5]="Ringing",e[e["Connect"]=6]="Connect",e[e["Release"]=7]="Release",e[e["Hold"]=8]="Hold",e[e["Unhold"]=9]="Unhold"}(gn||(gn={}));var vn,mn=function(){function e(t,i,n,r){var s=this;(0,h.default)(this,e),this._stateEmiter=new y,this._iceClient=t,this.srcNumber=i,this.dstNumber=n,this._parentCid=r,this._iceClient.on(st.SessionSendToCreaterState.toString(),(function(e){var t=JSON.parse(e)[0],i=t.cid;if(i==s._sessionId){var n=s.convertIceState(t.state);s._state!=n&&(s._state=n,s._stateEmiter.emit("event",{sender:s,state:s._state}))}}))}return(0,f.default)(e,[{key:"state",get:function(){return this._state},set:function(e){this._state!=e&&(this._state=e)}},{key:"convertIceState",value:function(e){var t=gn.None;switch(e){case"1":t=gn.Init;break;case"2":t=gn.Normal;break;case"3":t=gn.Callout;break;case"4":t=gn.Incoming;break;case"5":t=gn.Ringing;break;case"6":t=gn.Connect;break;case"7":t=gn.Hold;break;case"10":t=gn.Release;break;case"14":t=gn.Unhold;break;default:break}return t}},{key:"start",value:function(){var e=this;return this._iceClient.transferVideo(this._parentCid,this.srcNumber,[this.dstNumber]).then((function(t){return e._sessionId=t.newcid,null!=t.newcid&&""!=t.newcid?Promise.resolve(e._sessionId):Promise.reject()})).catch((function(e){return Promise.reject(e)}))}},{key:"end",value:function(){return this._iceClient.endConference(this._sessionId)}},{key:"onStateChanged",get:function(){return Hi(this._stateEmiter)}}]),e}(),yn=function(){function t(e,i,n,s){(0,h.default)(this,t),this._callStateEventEmitter=new y,this._forceInterposeEventEmitter=new y,this._callId="",this._sessionIdUndefine="",this._memberHasVideo=!1,this._transferVideos={},this._logger=Ze.getInstance(),this.callType=nt.Single,this.isConferenceMember=!1,this._isVideo=!1,this._sessionRelease=!1,this._holdOperating=!1,this.isCaller=!1,this.offerVideo=!0,this._disabelVideoTrack=!0,this._becomeConference=!1,this._isSendVideo=!0,this.number=e,this._mediaControl=i,this._sessionId=this._sessionIdUndefine,this.state=r.None,this._sphone=s,this._iceClient=n,this.requestStartTime=Date.now(),n.on(st.SessionMemberChange.toString(),this.memberShipListener)}return(0,f.default)(t,[{key:"memberShipListener",value:function(e){var t=JSON.parse(e);t[0].cid==this._sessionId&&("0"==t[0].havevideo?this._memberHasVideo=!1:"1"==t[0].havevideo&&(this._memberHasVideo=!0))}},{key:"open",value:function(e,t){return this._iceClient.SipPhoneVideoBug(this.number,e,t)}},{key:"close",value:function(){return this.hangup()}},{key:"PTZMoveX",value:function(e,t,i){return this._iceClient.PTZMoveX(this.number,e,t,i)}},{key:"PTZMoveY",value:function(e,t,i){return this._iceClient.PTZMoveY(this.number,e,t,i)}},{key:"PTZZoom",value:function(e,t,i){return this._iceClient.PTZZoom(this.number,e,t,i)}},{key:"PTZMoveLR",value:function(e,t,i){return this._iceClient.PTZMoveLR(this.number,e,t,i)}},{key:"PTZFocus",value:function(e,t,i){return this._iceClient.PTZFocus(this.number,e,t,i)}},{key:"negotiatedTransfer",value:function(e){var t=e;return this._iceClient.negotiatedTransfer(this._sessionId,t._sessionId,this.number,t.number)}},{key:"sipCall",set:function(e){var t=this;this._sipCall=e,this._sipCall._disableVideoTrack=this._disabelVideoTrack,this._sipCall.stateChange.on((function(e){e==Vi.Terminated&&(t._sipCall=null,t._sessionRelease?(t._logger.warn("call sipCall State terminated"),t.callStateInternal=r.Release):t._logger.warn("call sipCall State terminated but session not release return"))}))}},{key:"isVideo",get:function(){return this._isVideo?this._isVideo:this._sphone.getIsVideoByCallId(this._callId)},set:function(e){this._isVideo=e}},{key:"callStateChange",get:function(){return Hi(this._callStateEventEmitter)}},{key:"onBecomeConference",get:function(){return Hi(this._forceInterposeEventEmitter)}},{key:"callstate",set:function(e){var t=ut.convertIceCallState1(e);this.callStateInternal=t}},{key:"callStateInternal",set:function(e){var t=this;if(e==r.Release){if(this._sessionRelease=!0,null!=this._sipCall)return this._logger.warn("call session release but sipCall not hangup return"),void setTimeout((function(){null==t._sipCall||t._becomeConference||(t._logger.warn("force hangup sipcall not receive sipcall terminal timeout"),t._sphone.hangup1(t._callId))}),3e3);this._iceClient.removeListener(st.SessionMemberChange.toString(),this.memberShipListener),this._logger.warn("call setCallstate release")}else e==r.Connect&&null!=this._sipCall&&null!=this._sipCall.remoteVideoTrack&&(this._sipCall.remoteVideoTrack.enabled=!0);if(this.state!=e){this.state=e;var i={sender:this,state:this.state};this._callStateEventEmitter.emit("event",i)}}},{key:"transferVideos",get:function(){var e=new Array;for(var t in this._transferVideos)if(Object.prototype.hasOwnProperty.call(this._transferVideos,t)){var i=this._transferVideos[t];e.push(i)}return e}},{key:"invite",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._iceClient.makecall(this.number,e,t).then((function(e){return Promise.resolve()})).catch((function(e){return Promise.reject(e)}))}},{key:"inviteByLeftPhone",value:function(e){return this._iceClient.makecallByLeftPhone(this.number,e).then((function(e){return Promise.resolve()})).catch((function(e){return Promise.reject(e)}))}},{key:"answer",value:function(e,t){return this._mediaControl=e,this._isSendVideo||(t=!0),this._sphone.answer2(this._callId,this._mediaControl,t,rt.getInstance().audioInputDeviceConfig.id,rt.getInstance().videoInputDeviceConfig.id,rt.getInstance().videoInputDeviceConfig.width,rt.getInstance().videoInputDeviceConfig.height,rt.getInstance().videoInputDeviceConfig.frameRate,this.offerVideo)}},{key:"hangup",value:function(){var e=this;return this.callType!=nt.TransferVideoToMCU&&!this.isConferenceMember||null==this._sipCall?this._iceClient.hangup(this._sessionId).then((function(t){return e._logger.warn("call hangup success\uff1b "+JSON.stringify(t)),Promise.resolve()})).catch((function(t){return e._logger.warn("call hangup fail\uff1b "+JSON.stringify(t)),null!=e._sipCall?e._sphone.hangup1(e._callId):Promise.reject(t)})):this._sphone.hangup1(this._callId)}},{key:"hold",value:function(){return this._holdOperating=!0,this._iceClient.hold(this._sessionId)}},{key:"unhold",value:function(){return this._holdOperating=!1,this._iceClient.unHold(this._sessionId)}},{key:"mute",value:function(){return this._sphone.mute(this._callId),this._iceClient.muteLocalCamera(this._sessionId,rt.getInstance().number,!0),this._iceClient.muteLocalMic(this._sessionId,rt.getInstance().number,!0)}},{key:"unmute",value:function(){return this._sphone.unmute(this._callId),this._iceClient.muteLocalCamera(this._sessionId,rt.getInstance().number,!1),this._iceClient.muteLocalMic(this._sessionId,rt.getInstance().number,!1)}},{key:"muteAudio",value:function(){return this._sphone.muteAudio(this._callId),this._iceClient.muteLocalMic(this._sessionId,rt.getInstance().number,!0)}},{key:"muteVideo",value:function(){return this._sphone.muteVideo(this._callId),this._iceClient.muteLocalCamera(this._sessionId,rt.getInstance().number,!0)}},{key:"unmuteAudio",value:function(){return this._sphone.unmuteAudio(this._callId),this._iceClient.muteLocalMic(this._sessionId,rt.getInstance().number,!1)}},{key:"unmuteVideo",value:function(){return this._sphone.unmuteVideo(this._callId),this._iceClient.muteLocalCamera(this._sessionId,rt.getInstance().number,!1)}},{key:"switch",value:function(e){return this._iceClient.switch(this._sessionId,e,this.number)}},{key:"SubsituteCall",value:function(t){return this._iceClient.SubsituteCall(this.number,t).then((function(t){return e("warn","substitutecall "+JSON.stringify(t)," at util/webrtc.js:32631"),Promise.resolve()})).catch((function(e){return Promise.reject(e)}))}},{key:"addMember",value:function(e){return this._iceClient.conferenceAddMember(this._sessionId,e)}},{key:"becomeConference",value:function(e){this._becomeConference=!0;var t={sender:this,changeToConference:e};this._forceInterposeEventEmitter.emit("event",t)}},{key:"startDecoderWall",value:function(e,t){return this._iceClient.startDecoderWall(e,t,this._sessionId,this.number)}},{key:"stopDecoderWall",value:function(e,t){return this._iceClient.stopDecoderWall(e,t)}},{key:"transferVideo",value:function(e,t){return this._iceClient.transferVideo(this._sessionId,e,t).then((function(e){return Promise.resolve(e.newcid)})).catch((function(e){return Promise.reject(e)}))}},{key:"changeVideoElement",value:function(e){this._sphone.changeVideoElement(this._callId,e)}},{key:"sendDTMF",value:function(e){return this._sphone.sendDTMF(this._callId,e)}},{key:"transferVideo1",value:function(e,t){var i=this,n=new mn(this._iceClient,e,t,this._sessionId);return n.start().then((function(e){return i._transferVideos[e]=n,n.onStateChanged.on((function(t){t.state==gn.Release&&delete i._transferVideos[e]})),Promise.resolve(n)})).catch((function(e){return Promise.reject(e)}))}},{key:"requestSendVideo",value:function(){return!!this.isVideo&&(!!this._isSendVideo&&(this._isSendVideo=!1,this._iceClient.requestSendVideoByJson(this._sessionId)))}},{key:"hangdleRequestVideo",value:function(e){return!!this.isVideo&&(!!this._isSendVideo&&(this._isSendVideo=!1,this._mediaControl=e,this._iceClient.requestSendVideoByJson(this._sessionId)))}},{key:"requestKeyframe",value:function(){return this._iceClient.getKeyframe(this._sessionId,this.number)}},{key:"peerConnection",get:function(){return this._sipCall?this._sipCall.peerConnection:null}},{key:"shareScreen",value:function(){var t=this,i=navigator.mediaDevices;i.getDisplayMedia({video:!0,audio:!1}).then((function(e){var i=e.getVideoTracks()[0];t.peerConnection.getSenders().forEach((function(e){e.track&&"video"==e.track.kind&&e.replaceTrack(i)}))})),e("log","pc senders count: "+this.peerConnection.getSenders().length," at util/webrtc.js:32748")}},{key:"changeVideoCodec",value:function(e){return this._iceClient.reqChangeVideoCodec(this._sessionId,e)}}]),t}();(function(e){e[e["CallState"]=0]="CallState"})(vn||(vn={}));var _n,Sn,In,wn,kn=function(){function e(){(0,h.default)(this,e),this._eventEmiiter=new y}return(0,f.default)(e,[{key:"newEvent",value:function(e){this._eventEmiiter.on(_n.newEvent.toString(),e)}},{key:"dataChanged",value:function(e){this._eventEmiiter.on(_n.datachange.toString(),e)}},{key:"heartBeat",value:function(e){this._eventEmiiter.on(_n.haartbeat.toString(),e)}},{key:"materalChanged",value:function(e){this._eventEmiiter.on(_n.materialchange.toString(),e)}},{key:"newTast",value:function(e){this._eventEmiiter.on(_n.newtask.toString(),e)}},{key:"stateChanged",value:function(e){this._eventEmiiter.on(_n.statechange.toString(),e)}},{key:"tastStateChanged",value:function(e){this._eventEmiiter.on(_n.taskstatechange.toString(),e)}},{key:"wareHouseChanged",value:function(e){this._eventEmiiter.on(_n.warehousechange.toString(),e)}},{key:"regist",value:function(e,t,i){return this._serverIP=e,this._serverPort=t,this._username=i,this.iceInit(),this.connect()}},{key:"iceInit",value:function(){var e=i.Ice.createProperties();e.setProperty("Ice.ACM.Close","0");var t=new i.Ice.InitializationData;t.properties=e,this._iceCommunicator=i.Ice.initialize(t)}},{key:"connect",value:function(){var e=(0,d.default)(s.default.mark((function e(){var t,n,r,a,o;return s.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=this._iceCommunicator.stringToProxy("EMSrv:wss -h "+this._serverIP+" -p "+this._serverPort),t.ice_timeout(1e4),3e3,t=t.ice_invocationTimeout(3e3),t=t.ice_twoway(),this._proxy=ee.EMSrvPrx.uncheckedCast(t),e.next=8,this._iceCommunicator.createObjectAdapter("");case 8:return n=e.sent,r=new i.Ice.Identity(this._username,"EMCli"),this._myid=new ee.EMIdentity(this._username),this._myReceiver=new Cn,this._myReceiver.eventEmiter=this._eventEmiiter,n.add(this._myReceiver,r),e.next=16,this._proxy.ice_getConnection();case 16:return a=e.sent,a.setAdapter(n),o=new ee.EMIdentity,o.user=this._username,e.abrupt("return",this._proxy.EMRegisterOP(o,""));case 21:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getEventsList",value:function(e){var t=new ee.EMIdentity;return t.user=this._username,this._proxy.EMGetEventsOP(t,e)}},{key:"getEventPara",value:function(){var e=new ee.EMIdentity;return e.user=this._username,this._proxy.EMEventGetParam(e,"")}},{key:"getEventDetail",value:function(e){var t=new ee.EMIdentity;return t.user=this._username,this._proxy.EMGetEventDetialOP(t,e)}},{key:"getTastList",value:function(e){var t=new ee.EMIdentity;return t.user=this._username,this._proxy.EMGetTaskBySelfOP(t,e)}},{key:"returnTast",value:function(e){var t=new ee.EMIdentity;return t.user=this._username,this._proxy.EMEventReturnOP(t,e)}},{key:"startProcessTast",value:function(e){var t=new ee.EMIdentity;return t.user=this._username,this._proxy.EMEventStartProcessOP(t,e)}},{key:"overProcessTast",value:function(e){var t=new ee.EMIdentity;return t.user=this._username,this._proxy.EMEventProcessOverOP(t,e)}},{key:"reportNewevent",value:function(e){var t=new ee.EMIdentity;return t.user=this._username,this._proxy.EMEventReportOP(t,e)}},{key:"eventDistribute",value:function(e){var t=new ee.EMIdentity;return t.user=this._username,this._proxy.EMEventDistributeOP(t,e)}},{key:"eventConfirm",value:function(e){var t=new ee.EMIdentity;return t.user=this._username,this._proxy.EMEventConfirmOP(t,e)}},{key:"eventView",value:function(e){var t=new ee.EMIdentity;return t.user=this._username,this._proxy.EMEventViewOP(t,e)}}],[{key:"getInstance",value:function(){return null==e.s_bsclient&&(e.s_bsclient=new e),e.s_bsclient}}]),e}(),Cn=function(e){(0,g.default)(i,e);var t=_(i);function i(){return(0,h.default)(this,i),t.call(this)}return(0,f.default)(i,[{key:"EMCBNotifyNewEvent",value:function(e,t){this.eventEmiter.emit(_n.newEvent.toString(),e)}},{key:"EMCBNotifyEventStateChanged",value:function(e,t){this.eventEmiter.emit(_n.statechange.toString(),e)}},{key:"EMCBNotifyNewTask",value:function(e,t){this.eventEmiter.emit(_n.newtask.toString(),e)}},{key:"EMCBNotifyTaskStateChanged",value:function(e,t){this.eventEmiter.emit(_n.taskstatechange.toString(),e)}},{key:"EMCBNotifyWarehouseChanged",value:function(e,t,i){this.eventEmiter.emit(_n.warehousechange.toString(),e,t)}},{key:"EMCBNotifyMaterialChanged",value:function(e,t,i){this.eventEmiter.emit(_n.materialchange.toString(),e,t)}},{key:"EMHeartbeatCB",value:function(e,t){this.eventEmiter.emit(_n.haartbeat.toString(),e)}},{key:"EMDataChangedCB",value:function(e,t){this.eventEmiter.emit(_n.datachange.toString(),e)}}]),i}(ee.EMCli);(function(e){e[e["newEvent"]=0]="newEvent",e[e["statechange"]=1]="statechange",e[e["newtask"]=2]="newtask",e[e["taskstatechange"]=3]="taskstatechange",e[e["warehousechange"]=4]="warehousechange",e[e["materialchange"]=5]="materialchange",e[e["haartbeat"]=6]="haartbeat",e[e["datachange"]=7]="datachange"})(_n||(_n={})),function(e){e[e["None"]=0]="None",e[e["Connecting"]=1]="Connecting",e[e["Connected"]=2]="Connected",e[e["Kickout"]=3]="Kickout",e[e["Terminaled"]=4]="Terminaled",e[e["Leave"]=5]="Leave"}(Sn||(Sn={})),function(e){e[e["Enter"]=0]="Enter",e[e["Leave"]=1]="Leave",e[e["Speak"]=2]="Speak",e[e["Unspeak"]=3]="Unspeak",e[e["listen"]=4]="listen",e[e["unlisten"]=5]="unlisten",e[e["Reject"]=6]="Reject",e[e["ringing"]=7]="ringing",e[e["connected"]=8]="connected",e[e["MuteLocalMic"]=9]="MuteLocalMic",e[e["UnmuteLocalMic"]=10]="UnmuteLocalMic",e[e["MuteLocalCamera"]=11]="MuteLocalCamera",e[e["UnmuteLocalCamera"]=12]="UnmuteLocalCamera"}(In||(In={})),function(e){e[e["stop"]=0]="stop",e[e["start"]=1]="start"}(wn||(wn={}));var bn,En,Tn=function(){function t(e,i,n,s,a){var o=this,c=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];(0,h.default)(this,t),this._logger=Ze.getInstance(),this._members={},this._calls={},this._tempOutgoingCalls=new Array,this.isReEnter=!1,this._startVideo=!0,this.isSchedule=!1,this._transferVideos={},this._isVideo=!1,this._sessionRelease=!1,this.isCaller=!1,this.monitorVideoCall=!1,this._pushAudioToRTSPState=wn.stop,this.isPlan=!1,this.state=Sn.None,this._stateChangeEmiiter=new y,this._memberStateChangeEmiiter=new y,this._currentVideoChanged=new y,this._pushAudioToRTSPStateEmitter=new y,this._lastOpenMemberVideoTime=0,this._isSendVideo=!0,this._mediaControl=e,this.name=n,this._iceClient=s,this._sphone=a,this._initMembers=i,this._startVideo=c,this._iceClient.on(st.SessionMemberChange.toString(),(function(e){if(o.state!=Sn.Terminaled&&o.state!=Sn.Kickout&&o.state!=Sn.Leave){var t=JSON.parse(e),i=t[0].cid;if(i==o._sessionId){var n,s,a,c=t[0].state,u=t[0].employeeid,l=t[0].name,d=o._members[u],h=ut.convertIceCallState1(c),f=t[0].notspeak;s="0"==f;var g=t[0].nothear;a="0"==g;var p=!1;p="0"!=t[0].muteLocalMic;var v=!1;v="0"!=t[0].muteLocalCamera;var m=r.None;null==d?(d={number:u,name:l,allowSpeak:s,allowListen:a,hasVideo:!0,callState:h,muteLocalCamera:!1,muteLocalMic:!1,email:""},o._members[u]=d,n={sender:o,state:In.Enter,member:u},o._memberStateChangeEmiiter.emit("event",n)):(m=d.callState,d.callState=h);var y=t[0].havevideo;switch(d.hasVideo="0"!=y,c){case"1":n={sender:o,state:In.ringing,member:u},o._memberStateChangeEmiiter.emit("event",n);break;case"6":if(m!=r.Connect)n={sender:o,state:In.connected,member:u},o._memberStateChangeEmiiter.emit("event",n);else{if(s!=d.allowSpeak){d.allowSpeak=s;var _=In.Speak;s||(_=In.Unspeak),n={sender:o,state:_,member:u},o._memberStateChangeEmiiter.emit("event",n)}if(a!=d.allowListen){d.allowListen=a;var S=In.listen;a||(S=In.unlisten),n={sender:o,state:S,member:u},o._memberStateChangeEmiiter.emit("event",n)}if(p!=d.muteLocalMic){d.muteLocalMic=p;var I=In.MuteLocalMic;p||(I=In.UnmuteLocalMic),n={sender:o,state:I,member:u},o._memberStateChangeEmiiter.emit("event",n)}if(v!=d.muteLocalCamera){d.muteLocalCamera=v;var w=In.MuteLocalCamera;v||(w=In.UnmuteLocalCamera),n={sender:o,state:w,member:u},o._memberStateChangeEmiiter.emit("event",n)}}var k=t[0].ispush;1==k&&o.currentVideoMember!=u&&(o.currentVideoMember=u,o._currentVideoChanged.emit("event",{sender:o,member:u}));break;case"10":null!=d&&(delete o._members[u],n={sender:o,state:In.Leave,member:u},o._memberStateChangeEmiiter.emit("event",n),o.closeMemberVideo(u));break;default:break}d.email=t[0].email}}else o._logger.warn("not in conference")}));var u=this._handleIncomingCall.bind(this);this._sphone.on(dn.IncomingCall.toString(),u),this.removeListeners=function(){this._sphone.removeListener(dn.IncomingCall.toString(),u)}}return(0,f.default)(t,[{key:"sipCall",set:function(e){var t=this;this._sipCall=e,this._sipCall.stateChange.on((function(e){e==Vi.Terminated&&(t._sipCall=null,t._sessionRelease?(t._logger.warn("call sipCall State terminated"),t.stateInternal=Sn.Terminaled):t._logger.warn("call sipCall State terminated but session not release return"))}))}},{key:"currentVideoMember",get:function(){return this.isMCU?"*":this._currentVideoMember},set:function(e){this._currentVideoMember=e}},{key:"isVideo",get:function(){return!!this.monitorVideoCall||(this._isVideo?this._isVideo:this._sphone.getIsVideoByCallId(this._callId))},set:function(e){this._isVideo=e}},{key:"transferVideos",get:function(){var e=new Array;for(var t in this._transferVideos)if(Object.prototype.hasOwnProperty.call(this._transferVideos,t)){var i=this._transferVideos[t];e.push(i)}return e}},{key:"pushAudioToRTSPState",get:function(){return this._pushAudioToRTSPState},set:function(e){if(this._pushAudioToRTSPState!=e){var t={sender:this,state:e};this._pushAudioToRTSPStateEmitter.emit("event",t)}this._pushAudioToRTSPState=e}},{key:"_handleIncomingCall",value:function(t){if("*5*get"==t.orgCaller){var i=this._tempOutgoingCalls.shift();if(null==i)return;return i._callId=t.id,i.sipCall=t.invitation,i._sessionId=t.cid,this._calls[i.number]=i,i.offerVideo=!1,e("warn","conference autoanswer member call "+i.number," at util/webrtc.js:33349"),void i.answer(i._mediaControl,!0)}if("*5*record"==t.orgCaller){if(this._sessionId==t.cid){var n=document.createElement("video"),r=new yn("record",n,this._iceClient,this._sphone);r._callId=t.id,r._sessionId=t.cid,r.sipCall=t.invitation;var s=t.invitation;s.useDisplayMedia=!0,r.answer(n,!0)}}else if("*5*share"==t.orgCaller&&this._sessionId==t.cid){var a=document.createElement("video"),o=new yn("share",a,this._iceClient,this._sphone);o._callId=t.id,o._sessionId=t.cid,o.sipCall=t.invitation;var c=t.invitation;c.useDisplayMedia=!0,o.answer(a,!0)}}},{key:"memberStateChange",get:function(){return Hi(this._memberStateChangeEmiiter)}},{key:"stateChange",get:function(){return Hi(this._stateChangeEmiiter)}},{key:"currentVideoChanged",get:function(){return Hi(this._currentVideoChanged)}},{key:"pushAudioToRTSPStateChanged",get:function(){return Hi(this._pushAudioToRTSPStateEmitter)}},{key:"members",get:function(){return this.getMembers(),this._members}},{key:"getMembers",value:function(){var e=this;return this._iceClient.getConfMembers1(this._sessionId).then((function(t){e._logger.warn("getconfMembers: "+t);var i=JSON.parse(t);return i.forEach((function(t){var i=t.state,n=t.stateDecorate.substr(0,1),r=!0;"1"==n&&(r=!1);var s=t.stateDecorate.substr(1,1),a=!0;"1"==s&&(a=!1);var o=t.stateDecorate.substr(5,1),c=!0;"0"==o&&(c=!1);var u=t.stateDecorate.substr(4,1),l=!0;"0"==u&&(l=!1);var d={number:t.employeeid,name:t.name,allowSpeak:r,allowListen:a,hasVideo:!0,callState:i,muteLocalCamera:c,muteLocalMic:l,email:t.email};e._members[d.number]=d;var h=t.stateDecorate.substr(3,1);"1"==h&&(e._logger.warn("member "+t.employeeid+", is current push Video"),e.currentVideoMember!=t.employeeid&&(e.currentVideoMember=t.employeeid,e._currentVideoChanged.emit("event",{sender:e,member:e.currentVideoMember})))})),Promise.resolve(e._members)})).catch((function(t){return Promise.resolve(e._members)}))}},{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rt.getInstance().number;return this._iceClient.createConference(this._initMembers,this._startVideo,t).then((function(t){e._logger.log("createConf sucess "+JSON.stringify(t)),e._sessionId=t.cid}))}},{key:"accept",value:function(e,t){return this._mediaControl=e,this.isVideo||(t=!1),this._sphone.answer2(this._callId,this._mediaControl,t,rt.getInstance().audioInputDeviceConfig.id,rt.getInstance().videoInputDeviceConfig.id,rt.getInstance().videoInputDeviceConfig.width,rt.getInstance().videoInputDeviceConfig.height,rt.getInstance().videoInputDeviceConfig.frameRate)}},{key:"reEnter",value:function(){return this.isReEnter=!0,this.add(rt.getInstance().number)}},{key:"add",value:function(e){return this._iceClient.conferenceAddMember(this._sessionId,e)}},{key:"remove",value:function(e){return this._iceClient.conferenceDeleteMember(this._sessionId,e)}},{key:"end",value:function(){return this.removeListeners&&this.removeListeners(),this._iceClient.endConference(this._sessionId)}},{key:"exit",value:function(){return this.stateInternal=Sn.Leave,this.monitorVideoCall?this._sphone.hangup1(this._callId):this._iceClient.hangup(this._sessionId)}},{key:"openMemberVideo",value:function(t,i){var n=this,r=function(){var r=n._calls[t];return null!=r?Promise.reject():(r=new yn(t,i,n._iceClient,n._sphone),r.isConferenceMember=!0,n._tempOutgoingCalls.push(r),r.callStateChange.on((function(e){n._logger.log("conference member ipcall statechange "+e.sender.number+", "+e.sender.isVideo)})),n._lastOpenMemberVideoTime=(new Date).valueOf(),e("warn","openMembervideo "+t," at util/webrtc.js:33511"),n._iceClient.conferenceGetVideo(n._sessionId,t).then((function(i){return i.indexOf("cannot find member")>0?(n._tempOutgoingCalls.shift(),e("warn","openMembervideo fail "+t," at util/webrtc.js:33515"),Promise.reject("")):(e("warn","openMembervideo success "+t+", "+i," at util/webrtc.js:33519"),Promise.resolve(r))})).catch((function(i){return e("warn","openMembervideo fail "+t+", "+i," at util/webrtc.js:33523"),Promise.reject(i)})))};if(0==this._lastOpenMemberVideoTime||(new Date).valueOf()-this._lastOpenMemberVideoTime>1e3)return r();setTimeout((function(){return r()}),2e3)}},{key:"openMemberVideoMCU",value:function(t,i){var n=this,r=function(){var r=n._calls[t];return null!=r?Promise.reject():(r=new yn(t,i,n._iceClient,n._sphone),r.callType=nt.TransferVideoToMCU,n._tempOutgoingCalls.push(r),n._lastOpenMemberVideoTime=(new Date).valueOf(),e("warn","openMembervideo "+t," at util/webrtc.js:33549"),n._iceClient.conferenceGetVideoMCU(n._sessionId,t).then((function(i){return e("warn","openMembervideo success "+t+", "+i," at util/webrtc.js:33551"),Promise.resolve(i)})).catch((function(i){return e("warn","openMembervideo fail "+t+", "+i," at util/webrtc.js:33554"),Promise.reject(i)})))};return 0==this._lastOpenMemberVideoTime||(new Date).valueOf()-this._lastOpenMemberVideoTime>1e3?r():setTimeout((function(){return r()}),2e3),Promise.resolve()}},{key:"closeMemberVideo",value:function(e){var t=this._calls[e];if(null!=t)return delete this._calls[e],t.hangup()}},{key:"setConferenceVideo",value:function(e){return this._iceClient.conferencePushMember(this._sessionId,e)}},{key:"confunPushMember",value:function(e){return this._iceClient.conferenceunPushMember(this._sessionId,e)}},{key:"allowSpeak",value:function(e,t){return this._iceClient.allowSpeak(this._sessionId,e,t)}},{key:"allowListen",value:function(e,t){return this._iceClient.allowListen(this._sessionId,e,t)}},{key:"stateice",set:function(e){var t=this.state;switch(e){case"1":break;case"2":break;case"3":t=Sn.Connecting;break;case"4":break;case"5":break;case"6":t=Sn.Connected;break;case"7":break;case"10":t=Sn.Terminaled;break;case"14":break;case"15":this.state!=Sn.Leave&&(t=Sn.Kickout);break;default:break}this.stateInternal=t}},{key:"stateInternal",set:function(e){if(e==Sn.Terminaled){if(this._sessionRelease=!0,null!=this._sipCall)return void this._logger.warn("conference session release but sipCall not hangup return");this._logger.warn("conference setCallstate release")}if(this.state!=e){e==Sn.Connected&&(null!=this._sipCall&&null!=this._sipCall.remoteVideoTrack&&(this._sipCall.remoteVideoTrack.enabled=!0),this.getMembers()),this.state=e;var t={sender:this,state:this.state};this._logger.log("conference state change "+this.isMCU+this.currentVideoMember),this._stateChangeEmiiter.emit("event",t)}}},{key:"startDecoderWall",value:function(e,t,i){return this._iceClient.startDecoderWall(e,t,this._sessionId,i)}},{key:"stopDecoderWall",value:function(e,t){return this._iceClient.stopDecoderWall(e,t)}},{key:"transferVideo",value:function(e,t){return this._iceClient.transferVideo(this._sessionId,e,t)}},{key:"transferVideo1",value:function(e,t){var i=this,n=new mn(this._iceClient,e,t,this._sessionId);return n.start().then((function(e){return i._transferVideos[e]=n,n.onStateChanged.on((function(t){t.state==gn.Release&&delete i._transferVideos[e]})),Promise.resolve(n)})).catch((function(e){return Promise.reject(e)}))}},{key:"mute",value:function(){return this._sphone.mute(this._callId),this._iceClient.muteLocalCamera(this._sessionId,rt.getInstance().number,!0),this._iceClient.muteLocalMic(this._sessionId,rt.getInstance().number,!0)}},{key:"unmute",value:function(){return this._sphone.unmute(this._callId),this._iceClient.muteLocalCamera(this._sessionId,rt.getInstance().number,!1),this._iceClient.muteLocalMic(this._sessionId,rt.getInstance().number,!1)}},{key:"muteAudio",value:function(){return this._sphone.muteAudio(this._callId),this._iceClient.muteLocalMic(this._sessionId,rt.getInstance().number,!0)}},{key:"muteVideo",value:function(){return this._sphone.muteVideo(this._callId),this._iceClient.muteLocalCamera(this._sessionId,rt.getInstance().number,!0)}},{key:"unmuteAudio",value:function(){return this._sphone.unmuteAudio(this._callId),this._iceClient.muteLocalMic(this._sessionId,rt.getInstance().number,!1)}},{key:"unmuteVideo",value:function(){return this._sphone.unmuteVideo(this._callId),this._iceClient.muteLocalCamera(this._sessionId,rt.getInstance().number,!1)}},{key:"requestSendVideo",value:function(){return!!this._isSendVideo&&(this._isSendVideo=!1,this._iceClient.requestSendVideoByJson(this._sessionId))}},{key:"hangdleRequestVideo",value:function(e){if(this._isSendVideo)return this._isSendVideo=!1,this._mediaControl=e,this._iceClient.requestSendVideoByJson(this._sessionId)}},{key:"requestKeyframe",value:function(){return this._iceClient.getKeyframe(this._sessionId,this.currentVideoMember)}},{key:"peerConnection",get:function(){return this._sipCall?this._sipCall.peerConnection:null}},{key:"shareScreen",value:function(e){var t=this;if(e){var i=navigator.mediaDevices;i.getDisplayMedia({video:!0,audio:!1}).then((function(e){var i=e.getVideoTracks()[0];t.peerConnection.getSenders().forEach((function(e){e.track&&"video"==e.track.kind&&e.replaceTrack(i)}))}))}else navigator.mediaDevices.getUserMedia({video:!0,audio:!1}).then((function(e){var i=e.getVideoTracks()[0];t.peerConnection.getSenders().forEach((function(e){e.track&&"video"==e.track.kind&&e.replaceTrack(i)}))}))}},{key:"startPushRTSP",value:function(e,t){return this._iceClient.PushStartCallAudio(this._sessionId,e,t)}},{key:"stopPushRTSP",value:function(){return this._iceClient.PushStopCallAudio(this._sessionId)}},{key:"getAudioContrain",value:function(){return this._sipCall.localAudioTrack.getConstraints()}},{key:"startRecordScreen",value:function(){return this._iceClient.ReqRecordScreen(this._sessionId)}},{key:"startShareScreen",value:function(){return this._iceClient.reqStartShareScreen(this._sessionId)}},{key:"endShareScreen",value:function(){return this._iceClient.reqEndShareScreen(this._sessionId)}}]),t}();(function(e){e[e["None"]=0]="None",e[e["Connecting"]=1]="Connecting",e[e["Connected"]=2]="Connected",e[e["Terminaled"]=3]="Terminaled"})(bn||(bn={})),function(e){e[e["Enter"]=0]="Enter",e[e["Leave"]=1]="Leave"}(En||(En={}));var xn,Pn,Rn=function(){function e(t,i,n,r,s){var a=this;(0,h.default)(this,e),this._logger=Ze.getInstance(),this._stateChangeEmiiter=new y,this._memberStateChangeEmiiter=new y,this._speakerChangeEmiiter=new y,this._waitingStateChangeEmiiter=new y,this._requestRejectEmiiter=new y,this._members={},this._mediaControl=t,this.name=n,this._iceClient=r,this._sphone=s,this._initMembers=i,this._iceClient.on(st.SessionMemberChange.toString(),(function(e){a._logger.warn("sessionMemberChange: "+e);var t=JSON.parse(e),i=t[0].cid;if(i==a._sessionId){var n,r=t[0].state,s=t[0].employeeid,o=t[0].name,c=a._members[s];switch(r){case"6":if(null==c){var u={number:s,name:o};a._members[s]=u,n={sender:a,state:En.Enter,member:s},a._memberStateChangeEmiiter.emit("event",n)}break;case"10":null!=c&&(delete a._members[s],n={sender:a,state:En.Leave,member:s},a._memberStateChangeEmiiter.emit("event",n));break;default:break}}})),this._iceClient.on(st.PttStateSpeaker.toString(),(function(e){var t=e.substring(e.indexOf("call_id:")+"call_id:".length).trim();if(a._logger.warn("ptt speaker changed, cid: "+t+", _cid: "+a._sessionId+"."),t==a._sessionId){var i=e.substring(e.indexOf("speaker:")+"speaker:".length,e.indexOf("call_id:")).trim();if(a._logger.warn(i),i!=a.speaker){a.speaker=i;var n={sender:a,speaker:i};a._speakerChangeEmiiter.emit("event",n)}}else a._logger.warn("ptt not equal")})),this._iceClient.on(st.PttWaiting.toString(),(function(e){var t=JSON.parse(e)[0],i=t.cid;if(a._logger.warn("ptt waiting, cid: "+i+", _cid: "+a._sessionId+"."),i==a._sessionId){var n={sender:a,state:t.nqueue};a._waitingStateChangeEmiiter.emit("event",n)}else a._logger.warn("ptt not equal")})),this._iceClient.on(st.PttReject.toString(),(function(e){var t=JSON.parse(e)[0],i=t.cid;if(a._logger.warn("ptt reject, cid: "+i+", _cid: "+a._sessionId+"."),i==a._sessionId){var n={sender:a};a._requestRejectEmiiter.emit("event",n)}else a._logger.warn("ptt not equal")}))}return(0,f.default)(e,[{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rt.getInstance().number;return this._iceClient.startTempIntercom(this._initMembers,t).then((function(t){return e._logger.warn("createTempIntercom sucess "+JSON.stringify(t)),e.groupNumber=t.sessnum,Promise.resolve(t)})).catch((function(e){return Promise.reject(e)}))}},{key:"applySpeak",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rt.getInstance().number;return this._iceClient.applySpeak(this.groupNumber,t).then((function(t){return e._logger.log("apply speak sucess "+JSON.stringify(t)),Promise.resolve(t)})).catch((function(e){return Promise.reject(e)}))}},{key:"applySpeakByLeftPhone",value:function(){return this.applySpeak(rt.getInstance().leftPhone)}},{key:"applySpeakByRightPhone",value:function(){return this.applySpeak(rt.getInstance().rightPhone)}},{key:"freeSpeak",value:function(){var e=this;return this._iceClient.releaseSpeak(this.groupNumber).then((function(t){return e._logger.log("free speak sucess "+JSON.stringify(t)),Promise.resolve(t)})).catch((function(e){return Promise.reject(e)}))}},{key:"accept",value:function(e){return this._mediaControl=e,this._sphone.answer2(this._callId,this._mediaControl,!1,rt.getInstance().audioInputDeviceConfig.id,rt.getInstance().videoInputDeviceConfig.id)}},{key:"end",value:function(){return this._iceClient.endConference(this._sessionId)}},{key:"exit",value:function(){return this._iceClient.hangup(this._sessionId)}},{key:"stateChange",get:function(){return Hi(this._stateChangeEmiiter)}},{key:"memberStateChange",get:function(){return Hi(this._memberStateChangeEmiiter)}},{key:"speakerChanged",get:function(){return Hi(this._speakerChangeEmiiter)}},{key:"waitingStateChanged",get:function(){return Hi(this._waitingStateChangeEmiiter)}},{key:"requestReject",get:function(){return Hi(this._requestRejectEmiiter)}},{key:"stateice",set:function(e){var t=this.state;switch(e){case"1":break;case"2":break;case"3":t=bn.Connecting;break;case"4":break;case"5":break;case"6":t=bn.Connected;break;case"7":break;case"10":t=bn.Terminaled;break;case"14":break;default:break}this.stateInternal=t}},{key:"stateInternal",set:function(e){if(this.state!=e){e==bn.Connected&&this.getMembers(),this.state=e;var t={sender:this,state:this.state};this._stateChangeEmiiter.emit("event",t)}}},{key:"members",get:function(){return this.getMembers(),this._members}},{key:"getMembers",value:function(){var e=this;return this._iceClient.getConfMembers(this._sessionId).then((function(t){return e._logger.warn("getMembers success: "+JSON.stringify(t)),t.forEach((function(t){if(t.state==D.CallState.CallStateConnect){var i={number:t.employeeid,name:t.name};e._members[i.number]=i}})),Promise.resolve(e._members)})).catch((function(t){return e._logger.warn("getMembers fail :"+JSON.stringify(t)),Promise.resolve(e._members)}))}}]),e}();(function(e){e[e["None"]=0]="None",e[e["Connecting"]=1]="Connecting",e[e["Connected"]=2]="Connected",e[e["Kickout"]=3]="Kickout",e[e["Terminaled"]=4]="Terminaled",e[e["Leave"]=5]="Leave"})(xn||(xn={})),function(e){e[e["Enter"]=0]="Enter",e[e["Leave"]=1]="Leave",e[e["Speak"]=2]="Speak",e[e["Unspeak"]=3]="Unspeak",e[e["listen"]=4]="listen",e[e["unlisten"]=5]="unlisten",e[e["Reject"]=6]="Reject",e[e["ringing"]=7]="ringing",e[e["connected"]=8]="connected"}(Pn||(Pn={}));var Mn=function(){function e(t,i,n,s,a){var o=this;(0,h.default)(this,e),this._logger=Ze.getInstance(),this._stateChangeEmiiter=new y,this._memberStateChangeEmiiter=new y,this._members={},this._pushAudioToRTSPState=wn.stop,this._pushAudioToRTSPStateEmitter=new y,this._mediaControl=t,this.name=n,this._iceClient=s,this._sphone=a,this._initMembers=i,this._iceClient.on(st.SessionMemberChange.toString(),(function(e){if(o.state!=xn.Terminaled&&o.state!=xn.Kickout&&o.state!=xn.Leave){var t=JSON.parse(e),i=t[0].cid;if(i==o._sessionId){var n,s,a=t[0].state,c=t[0].employeeid,u=t[0].name,l=o._members[c],d=ut.convertIceCallState1(a),h=(t[0].notspeak,t[0].nothear);s="0"==h;var f=r.None;switch(null==l?(l={number:c,name:u,allowListen:s,callState:d},o._members[c]=l,n={sender:o,state:Pn.Enter,member:c},o._memberStateChangeEmiiter.emit("event",n)):(f=l.callState,l.callState=d),a){case"1":n={sender:o,state:Pn.ringing,member:c},o._memberStateChangeEmiiter.emit("event",n);break;case"6":if(f!=r.Connect)n={sender:o,state:Pn.connected,member:c},o._memberStateChangeEmiiter.emit("event",n);else if(s!=l.allowListen){l.allowListen=s;var g=Pn.listen;s||(g=Pn.unlisten),n={sender:o,state:g,member:c},o._memberStateChangeEmiiter.emit("event",n)}break;case"10":null!=l&&(delete o._members[c],n={sender:o,state:Pn.Leave,member:c},o._memberStateChangeEmiiter.emit("event",n));break;default:break}}}else o._logger.warn("not in conference")}))}return(0,f.default)(e,[{key:"sessionId",get:function(){return this._sessionId}},{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rt.getInstance().number;return this._iceClient.startBroadcast(this._initMembers,t).then((function(t){e._logger.warn("createBroadcast sucess "+JSON.stringify(t)),e._sessionId=t.cid}))}},{key:"accept",value:function(e){return this._mediaControl=e,this._sphone.answer2(this._callId,this._mediaControl,!1,rt.getInstance().audioInputDeviceConfig.id,rt.getInstance().videoInputDeviceConfig.id,rt.getInstance().videoInputDeviceConfig.width,rt.getInstance().videoInputDeviceConfig.height,rt.getInstance().videoInputDeviceConfig.frameRate)}},{key:"end",value:function(){return this._iceClient.endConference(this._sessionId)}},{key:"exit",value:function(){return this._iceClient.hangup(this._sessionId)}},{key:"stateChange",get:function(){return Hi(this._stateChangeEmiiter)}},{key:"memberStateChange",get:function(){return Hi(this._memberStateChangeEmiiter)}},{key:"stateice",set:function(e){var t=this.state;switch(e){case"1":break;case"2":break;case"3":t=xn.Connecting;break;case"4":break;case"5":break;case"6":t=xn.Connected;break;case"7":break;case"10":t=xn.Terminaled;break;case"14":break;default:break}this.stateInternal=t}},{key:"stateInternal",set:function(e){if(this.state!=e){e==xn.Connected&&this.getMembers(),this.state=e;var t={sender:this,state:this.state};this._stateChangeEmiiter.emit("event",t)}}},{key:"members",get:function(){return this._members}},{key:"getMembers",value:function(){var e=this;this._iceClient.getConfMembers(this._sessionId).then((function(t){e._logger.warn("getMembers success: "+JSON.stringify(t)),t.forEach((function(t){var i=t.state.value,n={number:t.employeeid,name:t.name,callState:i,allowListen:!0};e._members[n.number]=n}))})).catch((function(t){e._logger.warn("getMembers fail :"+JSON.stringify(t))}))}},{key:"add",value:function(e){return this._iceClient.conferenceAddMember(this._sessionId,e)}},{key:"remove",value:function(e){return this._iceClient.conferenceDeleteMember(this._sessionId,e)}},{key:"allowListen",value:function(e,t){return this._iceClient.allowListen(this._sessionId,e,t)}},{key:"pushAudioToRTSPState",get:function(){return this._pushAudioToRTSPState},set:function(e){if(this._pushAudioToRTSPState!=e){var t={sender:this,state:e};this._pushAudioToRTSPStateEmitter.emit("event",t)}this._pushAudioToRTSPState=e}},{key:"pushAudioToRTSPStateChanged",get:function(){return Hi(this._pushAudioToRTSPStateEmitter)}},{key:"startPushRTSP",value:function(e,t){return this._iceClient.PushStartCallAudio(this._sessionId,e,t)}},{key:"stopPushRTSP",value:function(){return this._iceClient.PushStopCallAudio(this._sessionId)}}]),e}(),Dn=function(){return Dn=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Dn.apply(this,arguments)};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function On(e,t,i,n){return new(i||(i=Promise))((function(r,s){function a(e){try{c(n.next(e))}catch(t){s(t)}}function o(e){try{c(n["throw"](e))}catch(t){s(t)}}function c(e){e.done?r(e.value):function(e){return e instanceof i?e:new i((function(t){t(e)}))}(e.value).then(a,o)}c((n=n.apply(e,t||[])).next())}))}function An(e,t){var i,n,r,s,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(i)throw new TypeError("Generator is already executing.");while(a)try{if(i=1,n&&(r=2&s[0]?n["return"]:s[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(r=a.trys,!(r=r.length>0&&r[r.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(o){s=[6,o],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}}function Fn(){for(var e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;var n=Array(e),r=0;for(t=0;t<i;t++)for(var s=arguments[t],a=0,o=s.length;a<o;a++,r++)n[r]=s[a];return n}function qn(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var i=[0,0,0,0];return i[3]+=e[3]+t[3],i[2]+=i[3]>>>16,i[3]&=65535,i[2]+=e[2]+t[2],i[1]+=i[2]>>>16,i[2]&=65535,i[1]+=e[1]+t[1],i[0]+=i[1]>>>16,i[1]&=65535,i[0]+=e[0]+t[0],i[0]&=65535,[i[0]<<16|i[1],i[2]<<16|i[3]]}function Nn(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var i=[0,0,0,0];return i[3]+=e[3]*t[3],i[2]+=i[3]>>>16,i[3]&=65535,i[2]+=e[2]*t[3],i[1]+=i[2]>>>16,i[2]&=65535,i[2]+=e[3]*t[2],i[1]+=i[2]>>>16,i[2]&=65535,i[1]+=e[1]*t[3],i[0]+=i[1]>>>16,i[1]&=65535,i[1]+=e[2]*t[2],i[0]+=i[1]>>>16,i[1]&=65535,i[1]+=e[3]*t[1],i[0]+=i[1]>>>16,i[1]&=65535,i[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],i[0]&=65535,[i[0]<<16|i[1],i[2]<<16|i[3]]}function Bn(e,t){return t%=64,32===t?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])}function Ln(e,t){return t%=64,0===t?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]}function Hn(e,t){return[e[0]^t[0],e[1]^t[1]]}function Vn(e){return e=Hn(e,[0,e[0]>>>1]),e=Nn(e,[4283543511,3981806797]),e=Hn(e,[0,e[0]>>>1]),e=Nn(e,[3301882366,444984403]),e=Hn(e,[0,e[0]>>>1]),e}function Un(e,t){return new Promise((function(i){return setTimeout(i,e,t)}))}function jn(e,t){void 0===t&&(t=1/0);var i=window.requestIdleCallback;return i?new Promise((function(e){return i((function(){return e()}),{timeout:t})})):Un(Math.min(e,t))}function Gn(e){return parseInt(e)}function zn(e){return parseFloat(e)}function $n(e,t){return"number"===typeof e&&isNaN(e)?t:e}function Wn(e){return e.reduce((function(e,t){return e+(t?1:0)}),0)}function Kn(){var e=window,t=navigator;return Wn(["MSCSSMatrix"in e,"msSetImmediate"in e,"msIndexedDB"in e,"msMaxTouchPoints"in t,"msPointerEnabled"in t])>=4}function Jn(){var e=window,t=navigator;return Wn(["webkitPersistentStorage"in t,"webkitTemporaryStorage"in t,0===t.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function Xn(){var e=window,t=navigator;return Wn(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,0===t.vendor.indexOf("Apple"),"getStorageUpdates"in t,"WebKitMediaKeys"in e])>=4}function Yn(){var e=window;return Wn(["safari"in e,!("DeviceMotionEvent"in e),!("ongestureend"in e),!("standalone"in navigator)])>=3}function Zn(){var e=document;return(e.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen).call(e)}function Qn(){var e=Jn(),t=function(){var e,t,i=window;return Wn(["buildID"in navigator,"MozAppearance"in(null!==(t=null===(e=document.documentElement)||void 0===e?void 0:e.style)&&void 0!==t?t:{}),"MediaRecorderErrorEvent"in i,"mozInnerScreenX"in i,"CSSMozDocumentRule"in i,"CanvasCaptureMediaStream"in i])>=4}();if(!e&&!t)return!1;var i=window;return Wn(["onorientationchange"in i,"orientation"in i,e&&"SharedWorker"in i,t&&/android/i.test(navigator.appVersion)])>=2}function er(e){return new Promise((function(t,i){e.oncomplete=function(e){return t(e.renderedBuffer)};var n=3;(function t(){switch(e.startRendering(),e.state){case"running":setTimeout((function(){return i(ir("timeout"))}),1e3);break;case"suspended":document.hidden||n--,n>0?setTimeout(t,500):i(ir("suspended"));break}})()}))}function tr(e){for(var t=0,i=0;i<e.length;++i)t+=Math.abs(e[i]);return t}function ir(e){var t=new Error(e);return t.name=e,t}function nr(e,t,i){var n,r;return void 0===i&&(i=50),On(this,void 0,void 0,(function(){var s,a;return An(this,(function(o){switch(o.label){case 0:s=document,o.label=1;case 1:return s.body?[3,3]:[4,Un(i)];case 2:return o.sent(),[3,1];case 3:a=s.createElement("iframe"),o.label=4;case 4:return o.trys.push([4,,10,11]),[4,new Promise((function(e,i){a.onload=e,a.onerror=i;var n=a.style;n.setProperty("display","block","important"),n.position="absolute",n.top="0",n.left="0",n.visibility="hidden",s.body.appendChild(a),t&&"srcdoc"in a?a.srcdoc=t:a.src="about:blank"}))];case 5:o.sent(),o.label=6;case 6:return(null===(n=a.contentWindow)||void 0===n?void 0:n.document.body)?[3,8]:[4,Un(i)];case 7:return o.sent(),[3,6];case 8:return[4,e(a,a.contentWindow)];case 9:return[2,o.sent()];case 10:return null===(r=a.parentNode)||void 0===r||r.removeChild(a),[7];case 11:return[2]}}))}))}function rr(e){for(var t=function(e){for(var t,i,n="Unexpected syntax '"+e+"'",r=/^\s*([a-z-]*)(.*)$/i.exec(e),s=r[1]||void 0,a={},o=/([.:#][\w-]+|\[.+?\])/gi,c=function(e,t){a[e]=a[e]||[],a[e].push(t)};;){var u=o.exec(r[2]);if(!u)break;var l=u[0];switch(l[0]){case".":c("class",l.slice(1));break;case"#":c("id",l.slice(1));break;case"[":var d=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(l);if(!d)throw new Error(n);c(d[1],null!==(i=null!==(t=d[4])&&void 0!==t?t:d[5])&&void 0!==i?i:"");break;default:throw new Error(n)}}return[s,a]}(e),i=t[0],n=t[1],r=document.createElement(null!==i&&void 0!==i?i:"div"),s=0,a=Object.keys(n);s<a.length;s++){var o=a[s];r.setAttribute(o,n[o].join(" "))}return r}var sr=["monospace","sans-serif","serif"],ar=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function or(e){return e.rect(0,0,10,10),e.rect(2,2,6,6),!e.isPointInPath(5,5,"evenodd")}function cr(e,t){e.width=240,e.height=60,t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(100,1,62,20),t.fillStyle="#069",t.font='11pt "Times New Roman"';var i="Cwm fjordbank gly "+String.fromCharCode(55357,56835);return t.fillText(i,2,15),t.fillStyle="rgba(102, 204, 0, 0.2)",t.font="18pt Arial",t.fillText(i,4,45),lr(e)}function ur(e,t){e.width=122,e.height=110,t.globalCompositeOperation="multiply";for(var i=0,n=[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]];i<n.length;i++){var r=n[i],s=r[0],a=r[1],o=r[2];t.fillStyle=s,t.beginPath(),t.arc(a,o,40,0,2*Math.PI,!0),t.closePath(),t.fill()}return t.fillStyle="#f9c",t.arc(60,60,60,0,2*Math.PI,!0),t.arc(60,60,20,0,2*Math.PI,!0),t.fill("evenodd"),lr(e)}function lr(e){return e.toDataURL()}var dr,hr;function fr(){return On(this,void 0,void 0,(function(){var e;return An(this,(function(t){switch(t.label){case 0:return e=gr(),pr(e)?dr?[2,Fn(dr)]:function(){var e=document;return e.fullscreenElement||e.msFullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||null}()?[4,Zn()]:[3,2]:[3,2];case 1:t.sent(),e=gr(),t.label=2;case 2:return pr(e)||(dr=e),[2,e]}}))}))}function gr(){var e=screen;return[$n(zn(e.availTop),null),$n(zn(e.width)-zn(e.availWidth)-$n(zn(e.availLeft),0),null),$n(zn(e.height)-zn(e.availHeight)-$n(zn(e.availTop),0),null),$n(zn(e.availLeft),null)]}function pr(e){for(var t=0;t<4;++t)if(e[t])return!1;return!0}var vr={abpIndo:["#Iklan-Melayang","#Kolom-Iklan-728","#SidebarIklan-wrapper",'a[title="7naga poker" i]','[title="ALIENBOLA" i]'],abpvn:["#quangcaomb",".i-said-no-thing-can-stop-me-warning.dark",".quangcao",'[href^="https://r88.vn/"]','[href^="https://zbet.vn/"]'],adBlockFinland:[".mainostila",".sponsorit",".ylamainos",'a[href*="/clickthrgh.asp?"]','a[href^="https://app.readpeak.com/ads"]'],adBlockPersian:["#navbar_notice_50",'a[href^="https://iqoption.com/lp/mobile-partner/?aff="]',".kadr",'TABLE[width="140px"]',"#divAgahi"],adBlockWarningRemoval:["#adblock_message",".adblockInfo",".deadblocker-header-bar",".no-ad-reminder","#AdBlockDialog"],adGuardAnnoyances:['amp-embed[type="zen"]',".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil"],adGuardBase:["#gads_middle",".tjads",".BetterJsPopOverlay","#ad_300X250","#bannerfloat22"],adGuardChinese:['a[href*=".123ch.cn"]','a[href*=".ttz5.cn"]','a[href*=".yabovip2027.com/"]',".tm3all2h4b","#j-new-ad"],adGuardFrench:["#div_banniere_pub",'a[href^="https://secure.securitetotale.fr/"]','a[href*="fducks.com/"]','a[href^="http://frtyd.com/"]',".publicite1"],adGuardGerman:[".banneritemwerbung_head_1",".boxstartwerbung",".werbung3",'a[href^="http://www.ichwuerde.com/?ref="]','a[href^="http://partners.adklick.de/tracking.php?"]'],adGuardJapanese:[".ad-text-blockA01","._popIn_infinite_video","[class^=blogroll_wrapper]",'a[href^="http://ad2.trafficgate.net/"]','a[href^="http://www.rssad.jp/"]'],adGuardMobile:["amp-auto-ads","#mgid_iframe",".amp_ad","amp-sticky-ad",".plugin-blogroll"],adGuardRussian:['a[href^="https://ya-distrib.ru/r/"]','[onclick*=".twkv.ru"]',".reclama",'div[id^="smi2adblock"]','div[id^="AdFox_banner_"]'],adGuardSocial:['a[href^="//www.stumbleupon.com/submit?url="]','a[href^="//telegram.me/share/url?"]',".etsy-tweet","#inlineShare",".popup-social"],adGuardSpanishPortuguese:["#barraPublicidade","#Publicidade","#publiEspecial","#queTooltip",'[href^="http://ads.glispa.com/"]'],adGuardTrackingProtection:['amp-embed[type="taboola"]',"#qoo-counter",'a[href^="http://click.hotlog.ru/"]','a[href^="http://hitcounter.ru/top/stat.php"]','a[href^="http://top.mail.ru/jump"]'],adGuardTurkish:["#backkapat","#reklami",'a[href^="http://adserv.ontek.com.tr/"]','a[href^="http://izlenzi.com/campaign/"]','a[href^="http://www.installads.net/"]'],bulgarian:["td#freenet_table_ads","#newAd","#ea_intext_div",".lapni-pop-over","#xenium_hot_offers"],easyList:['[lazy-ad="leftthin_banner"]',"#ad_300x250_2","#interstitialAd","#wide_ad_unit",".showcaseAd"],easyListChina:['a[href*=".wensixuetang.com/"]','A[href*="/hth107.com/"]','.appguide-wrap[onclick*="bcebos.com"]',".frontpageAdvM","#taotaole"],easyListCookie:["#CookieEU","#__cookies_","#les_cookies",".asset_balaNotification",".gdpr-tab"],easyListCzechSlovak:["#onlajny-stickers","#reklamni-box",".reklama-megaboard",".sklik",'[id^="sklikReklama"]'],easyListDutch:["#advertentie","#vipAdmarktBannerBlock",".adstekst",'a[href^="http://adserver.webads.nl/adclick/"]',"#semilo-lrectangle"],easyListGermany:["#LxWerbeteaser",'a[href^="http://www.kontakt-vermittler.de/?wm="]',".werbung301",".ads_bueroklammer","#Werbung_Sky"],easyListItaly:[".box_adv_annunci",".sb-box-pubbliredazionale",'a[href^="http://affiliazioniads.snai.it/"]','a[href^="https://adserver.html.it/"]','a[href^="https://affiliazioniads.snai.it/"]'],easyListLithuania:[".reklamos_tarpas",".reklamos_nuorodos",'img[alt="Reklaminis skydelis"]','img[alt="Dedikuoti.lt serveriai"]','img[alt="Hostingas Serveriai.lt"]'],estonian:['A[href*="http://pay4results24.eu"]'],fanboyAnnoyances:["#feedback-tab","#taboola-below-article",".feedburnerFeedBlock",".widget-feedburner-counter",'[title="Subscribe to our blog"]'],fanboyAntiFacebook:[".util-bar-module-firefly-visible"],fanboyEnhancedTrackers:[".open.pushModal","#issuem-leaky-paywall-articles-zero-remaining-nag",'div[style*="box-shadow: rgb(136, 136, 136) 0px 0px 12px; color: "]','div[class$="-hide"][zoompage-fontsize][style="display: block;"]',".BlockNag__Card"],fanboySocial:[".td-tags-and-social-wrapper-box",".twitterContainer",".youtube-social",'a[title^="Like us on Facebook"]','img[alt^="Share on Digg"]'],frellwitSwedish:['a[href*="casinopro.se"][target="_blank"]','a[href*="doktor-se.onelink.me"]',"article.category-samarbete","div.holidAds","ul.adsmodern"],greekAdBlock:['A[href*="adman.otenet.gr/click?"]','A[href*="http://axiabanners.exodus.gr/"]','A[href*="http://interactive.forthnet.gr/click?"]',"DIV.agores300","TABLE.advright"],hungarian:['A[href*="ad.eval.hu"]','A[href*="ad.netmedia.hu"]','A[href*="daserver.ultraweb.hu"]',"#cemp_doboz",".optimonk-iframe-container"],iDontCareAboutCookies:['.alert-info[data-block-track*="CookieNotice"]',".ModuleTemplateCookieIndicator",".o--cookies--container",".cookie-msg-info-container","#cookies-policy-sticky"],icelandicAbp:['A[href^="/framework/resources/forms/ads.aspx"]'],latvian:['a[href="http://www.salidzini.lv/"][style="display: block; width: 120px; height: 40px; overflow: hidden; position: relative;"]','a[href="http://www.salidzini.lv/"][style="display: block; width: 88px; height: 31px; overflow: hidden; position: relative;"]'],listKr:['a[href*="//kingtoon.slnk.kr"]','a[href*="//playdsb.com/kr"]',"div.logly-lift-adz",'div[data-widget_id="ml6EJ074"]',"ins.daum_ddn_area"],listeAr:[".geminiLB1Ad",".right-and-left-sponsers",'a[href*=".aflam.info"]','a[href*="booraq.org"]','a[href*="dubizzle.com/ar/?utm_source="]'],listeFr:['a[href^="http://promo.vador.com/"]',"#adcontainer_recherche",'a[href*="weborama.fr/fcgi-bin/"]',".site-pub-interstitiel",'div[id^="crt-"][data-criteo-id]'],officialPolish:["#ceneo-placeholder-ceneo-12",'[href^="https://aff.sendhub.pl/"]','a[href^="http://advmanager.techfun.pl/redirect/"]','a[href^="http://www.trizer.pl/?utm_source"]',"div#skapiec_ad"],ro:['a[href^="//afftrk.altex.ro/Counter/Click"]','a[href^="/magazin/"]','a[href^="https://blackfridaysales.ro/trk/shop/"]','a[href^="https://event.2performant.com/events/click"]','a[href^="https://l.profitshare.ro/"]'],ruAd:['a[href*="//febrare.ru/"]','a[href*="//utimg.ru/"]','a[href*="://chikidiki.ru"]',"#pgeldiz",".yandex-rtb-block"],thaiAds:["a[href*=macau-uta-popup]","#ads-google-middle_rectangle-group",".ads300s",".bumq",".img-kosana"],webAnnoyancesUltralist:["#mod-social-share-2","#social-tools",".ctpl-fullbanner",".zergnet-recommend",".yt.btn-link.btn-md.btn"]},mr=Object.keys(vr);function yr(e){var t;return On(this,void 0,void 0,(function(){var i,n,r,s,a,o,c,u,l,d;return An(this,(function(h){switch(h.label){case 0:for(i=document,n=i.createElement("div"),r=[],s={},_r(n),a=0,o=e;a<o.length;a++)c=o[a],u=rr(c),l=i.createElement("div"),_r(l),l.appendChild(u),n.appendChild(l),r.push(u);h.label=1;case 1:return i.body?[3,3]:[4,Un(50)];case 2:return h.sent(),[3,1];case 3:i.body.appendChild(n);try{for(d=0;d<e.length;++d)r[d].offsetParent||(s[e[d]]=!0)}finally{null===(t=n.parentNode)||void 0===t||t.removeChild(n)}return[2,s]}}))}))}function _r(e){e.style.setProperty("display","block","important")}function Sr(e){return matchMedia("(inverted-colors: "+e+")").matches}function Ir(e){return matchMedia("(forced-colors: "+e+")").matches}function wr(e){return matchMedia("(prefers-contrast: "+e+")").matches}function kr(e){return matchMedia("(prefers-reduced-motion: "+e+")").matches}function Cr(e){return matchMedia("(dynamic-range: "+e+")").matches}var br=Math,Er=function(){return 0},Tr=br.acos||Er,xr=br.acosh||Er,Pr=br.asin||Er,Rr=br.asinh||Er,Mr=br.atanh||Er,Dr=br.atan||Er,Or=br.sin||Er,Ar=br.sinh||Er,Fr=br.cos||Er,qr=br.cosh||Er,Nr=br.tan||Er,Br=br.tanh||Er,Lr=br.exp||Er,Hr=br.expm1||Er,Vr=br.log1p||Er,Ur=function(e){return br.pow(br.PI,e)},jr=function(e){return br.log(e+br.sqrt(e*e-1))},Gr=function(e){return br.log(e+br.sqrt(e*e+1))},zr=function(e){return br.log((1+e)/(1-e))/2},$r=function(e){return br.exp(e)-1/br.exp(e)/2},Wr=function(e){return(br.exp(e)+1/br.exp(e))/2},Kr=function(e){return br.exp(e)-1},Jr=function(e){return(br.exp(2*e)-1)/(br.exp(2*e)+1)},Xr=function(e){return br.log(1+e)};var Yr={default:[],apple:[{font:"-apple-system-body"}],serif:[{fontFamily:"serif"}],sans:[{fontFamily:"sans-serif"}],mono:[{fontFamily:"monospace"}],min:[{fontSize:"1px"}],system:[{fontFamily:"system-ui"}]};var Zr={fonts:function(){return nr((function(e,t){var i=t.document,n=i.body;n.style.fontSize="48px";var r=i.createElement("div"),s={},a={},o=function(e){var t=i.createElement("span"),n=t.style;return n.position="absolute",n.top="0",n.left="0",n.fontFamily=e,t.textContent="mmMwWLliI0O&1",r.appendChild(t),t},c=function(){return sr.map(o)}(),u=function(){for(var e={},t=function(t){e[t]=sr.map((function(e){return function(e,t){return o("'"+e+"',"+t)}(t,e)}))},i=0,n=ar;i<n.length;i++){var r=n[i];t(r)}return e}();n.appendChild(r);for(var l=0;l<sr.length;l++)s[sr[l]]=c[l].offsetWidth,a[sr[l]]=c[l].offsetHeight;return ar.filter((function(e){return function(e){return sr.some((function(t,i){return e[i].offsetWidth!==s[t]||e[i].offsetHeight!==a[t]}))}(u[e])}))}))},domBlockers:function(t){var i=(void 0===t?{}:t).debug;return On(this,void 0,void 0,(function(){var t,n,r,s;return An(this,(function(a){switch(a.label){case 0:return function(){return Xn()||Qn()}()?(t=(s=[]).concat.apply(s,mr.map((function(e){return vr[e]}))),[4,yr(t)]):[2,void 0];case 1:return n=a.sent(),i&&function(t){for(var i="DOM blockers debug:\n```",n=0,r=mr;n<r.length;n++){var s=r[n];i+="\n"+s+":";for(var a=0,o=vr[s];a<o.length;a++){var c=o[a];i+="\n "+c+" "+(t[c]?"\ud83d\udeab":"\u27a1\ufe0f")}}e("log",i+"\n```"," at util/webrtc.js:36157")}(n),r=mr.filter((function(e){var t=vr[e],i=Wn(t.map((function(e){return n[e]})));return i>.5*t.length})),r.sort(),[2,r]}}))}))},fontPreferences:function(){return function(e,t){void 0===t&&(t=4e3);return nr((function(i,n){var r=n.document,s=r.body,a=s.style;a.width=t+"px",a.webkitTextSizeAdjust=a.textSizeAdjust="none",Jn()?s.style.zoom=""+1/n.devicePixelRatio:Xn()&&(s.style.zoom="reset");var o=r.createElement("div");return o.textContent=Fn(Array(t/20<<0)).map((function(){return"word"})).join(" "),s.appendChild(o),e(r,s)}),'<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1">')}((function(e,t){for(var i={},n={},r=0,s=Object.keys(Yr);r<s.length;r++){var a=s[r],o=Yr[a],c=o[0],u=void 0===c?{}:c,l=o[1],d=void 0===l?"mmMwWLliI0fiflO&1":l,h=e.createElement("span");h.textContent=d,h.style.whiteSpace="nowrap";for(var f=0,g=Object.keys(u);f<g.length;f++){var p=g[f],v=u[p];void 0!==v&&(h.style[p]=v)}i[a]=h,t.appendChild(e.createElement("br")),t.appendChild(h)}for(var m=0,y=Object.keys(Yr);m<y.length;m++){a=y[m];n[a]=i[a].getBoundingClientRect().width}return n}))},audio:function(){return On(this,void 0,void 0,(function(){var e,t,i,n,r,s,a,o;return An(this,(function(c){switch(c.label){case 0:if(e=window,t=e.OfflineAudioContext||e.webkitOfflineAudioContext,!t)return[2,-2];if(function(){return Xn()&&!Yn()&&!function(){var e=window;return Wn(["DOMRectList"in e,"RTCPeerConnectionIceEvent"in e,"SVGGeometryElement"in e,"ontransitioncancel"in e])>=3}()}())return[2,-1];i=4500,5e3,n=new t(1,5e3,44100),r=n.createOscillator(),r.type="triangle",r.frequency.value=1e4,s=n.createDynamicsCompressor(),s.threshold.value=-50,s.knee.value=40,s.ratio.value=12,s.attack.value=0,s.release.value=.25,r.connect(s),s.connect(n.destination),r.start(0),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,er(n)];case 2:return a=c.sent(),[3,4];case 3:if(o=c.sent(),"timeout"===o.name||"suspended"===o.name)return[2,-3];throw o;case 4:return[2,tr(a.getChannelData(0).subarray(i))]}}))}))},screenFrame:function(){return On(this,void 0,void 0,(function(){var e,t;return An(this,(function(i){switch(i.label){case 0:return e=function(e){return null===e?null:function(e,t){if(void 0===t&&(t=1),Math.abs(t)>=1)return Math.round(e/t)*t;var i=1/t;return Math.round(e*i)/i}(e,10)},[4,fr()];case 1:return t=i.sent(),[2,[e(t[0]),e(t[1]),e(t[2]),e(t[3])]]}}))}))},osCpu:function(){return navigator.oscpu},languages:function(){var e=navigator,t=[],i=e.language||e.userLanguage||e.browserLanguage||e.systemLanguage;if(void 0!==i&&t.push([i]),Array.isArray(e.languages))Jn()&&function(){var e=window;return Wn([!("MediaSettingsRange"in e),"RTCEncodedAudioFrame"in e,""+e.Intl==="[object Intl]",""+e.Reflect==="[object Reflect]"])>=3}()||t.push(e.languages);else if("string"===typeof e.languages){var n=e.languages;n&&t.push(n.split(","))}return t},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return $n(zn(navigator.deviceMemory),void 0)},screenResolution:function(){var e=screen,t=[Gn(e.width),Gn(e.height)];return t.sort().reverse(),t},hardwareConcurrency:function(){return $n(Gn(navigator.hardwareConcurrency),void 0)},timezone:function(){var e,t=null===(e=window.Intl)||void 0===e?void 0:e.DateTimeFormat;if(t){var i=(new t).resolvedOptions().timeZone;if(i)return i}var n=-function(){var e=(new Date).getFullYear();return Math.max(zn(new Date(e,0,1).getTimezoneOffset()),zn(new Date(e,6,1).getTimezoneOffset()))}();return"UTC"+(n>=0?"+":"")+Math.abs(n)},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){if(!Kn()&&!function(){var e=window,t=navigator;return Wn(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in t,"msSaveBlob"in t])>=3&&!Kn()}())try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var e=navigator.platform;return"MacIntel"===e&&Xn()&&!Yn()?function(){if("iPad"===navigator.platform)return!0;var e=screen,t=e.width/e.height;return Wn(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,t>2/3&&t<1.5])>=2}()?"iPad":"iPhone":e},plugins:function(){var e=navigator.plugins;if(e){for(var t=[],i=0;i<e.length;++i){var n=e[i];if(n){for(var r=[],s=0;s<n.length;++s){var a=n[s];r.push({type:a.type,suffixes:a.suffixes})}t.push({name:n.name,description:n.description,mimeTypes:r})}}return t}},canvas:function(){var e=function(){var e=document.createElement("canvas");return e.width=1,e.height=1,[e,e.getContext("2d")]}(),t=e[0],i=e[1];return function(e,t){return!(!t||!e.toDataURL)}(t,i)?{winding:or(i),geometry:ur(t,i),text:cr(t,i)}:{winding:!1,geometry:"",text:""}},touchSupport:function(){var e,t=navigator,i=0;void 0!==t.maxTouchPoints?i=Gn(t.maxTouchPoints):void 0!==t.msMaxTouchPoints&&(i=t.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(r){e=!1}var n="ontouchstart"in window;return{maxTouchPoints:i,touchEvent:e,touchStart:n}},vendor:function(){return navigator.vendor||""},vendorFlavors:function(){for(var e=[],t=0,i=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];t<i.length;t++){var n=i[t],r=window[n];r&&"object"===(0,a.default)(r)&&e.push(n)}return e.sort()},cookiesEnabled:function(){var e=document;try{e.cookie="cookietest=1; SameSite=Strict;";var t=-1!==e.cookie.indexOf("cookietest=");return e.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",t}catch(i){return!1}},colorGamut:function(){for(var e=0,t=["rec2020","p3","srgb"];e<t.length;e++){var i=t[e];if(matchMedia("(color-gamut: "+i+")").matches)return i}},invertedColors:function(){return!!Sr("inverted")||!Sr("none")&&void 0},forcedColors:function(){return!!Ir("active")||!Ir("none")&&void 0},monochrome:function(){if(matchMedia("(min-monochrome: 0)").matches){for(var e=0;e<=100;++e)if(matchMedia("(max-monochrome: "+e+")").matches)return e;throw new Error("Too high value")}},contrast:function(){return wr("no-preference")?0:wr("high")||wr("more")?1:wr("low")||wr("less")?-1:wr("forced")?10:void 0},reducedMotion:function(){return!!kr("reduce")||!kr("no-preference")&&void 0},hdr:function(){return!!Cr("high")||!Cr("standard")&&void 0},math:function(){return{acos:Tr(.12312423423423424),acosh:xr(1e308),acoshPf:jr(1e154),asin:Pr(.12312423423423424),asinh:Rr(1),asinhPf:Gr(1),atanh:Mr(.5),atanhPf:zr(.5),atan:Dr(.5),sin:Or(-1e300),sinh:Ar(1),sinhPf:$r(1),cos:Fr(10.000000000123),cosh:qr(1),coshPf:Wr(1),tan:Nr(-1e300),tanh:Br(1),tanhPf:Jr(1),exp:Lr(1),expm1:Hr(1),expm1Pf:Kr(1),log1p:Vr(10),log1pPf:Xr(10),powPI:Ur(-100)}}};function Qr(e){return e&&"object"===(0,a.default)(e)&&"message"in e?e:{message:e}}function es(e,t,i){return On(this,void 0,void 0,(function(){var n,r,s,a,o,c,u;return An(this,(function(l){switch(l.label){case 0:n=[],r={},16,s=Date.now(),a=function(a){var o;return An(this,(function(c){switch(c.label){case 0:return function(e,t){return!function(e,t){for(var i=0,n=e.length;i<n;++i)if(e[i]===t)return!0;return!1}(e,t)}(i,a)?(r[a]=void 0,n.push(function(e,t){return On(this,void 0,void 0,(function(){var i,n,r,s;return An(this,(function(a){switch(a.label){case 0:n=Date.now(),a.label=1;case 1:return a.trys.push([1,3,,4]),s={},[4,e(t)];case 2:return s.value=a.sent(),i=s,[3,4];case 3:return r=a.sent(),i={error:Qr(r)},[3,4];case 4:return[2,Dn(Dn({},i),{duration:Date.now()-n})]}}))}))}(e[a],t).then((function(e){r[a]=e}))),o=Date.now(),o>=s+16?(s=o,[4,new Promise((function(e){return setTimeout(e)}))]):[3,2]):[2,"continue"];case 1:return c.sent(),[3,4];case 2:return[4,void 0];case 3:c.sent(),c.label=4;case 4:return[2]}}))},o=0,c=Object.keys(e),l.label=1;case 1:return o<c.length?(u=c[o],[5,a(u)]):[3,4];case 2:l.sent(),l.label=3;case 3:return o++,[3,1];case 4:return[4,Promise.all(n)];case 5:return l.sent(),[2,r]}}))}))}function ts(e){return es(Zr,e,[])}function is(e){return JSON.stringify(e,(function(e,t){return t instanceof Error?function(e){var t;return Dn({name:e.name,message:e.message,stack:null===(t=e.stack)||void 0===t?void 0:t.split("\n")},e)}(t):t}),2)}function ns(e){return function(e,t){e=e||"",t=t||0;var i,n=e.length%16,r=e.length-n,s=[0,t],a=[0,t],o=[0,0],c=[0,0],u=[2277735313,289559509],l=[1291169091,658871167];for(i=0;i<r;i+=16)o=[255&e.charCodeAt(i+4)|(255&e.charCodeAt(i+5))<<8|(255&e.charCodeAt(i+6))<<16|(255&e.charCodeAt(i+7))<<24,255&e.charCodeAt(i)|(255&e.charCodeAt(i+1))<<8|(255&e.charCodeAt(i+2))<<16|(255&e.charCodeAt(i+3))<<24],c=[255&e.charCodeAt(i+12)|(255&e.charCodeAt(i+13))<<8|(255&e.charCodeAt(i+14))<<16|(255&e.charCodeAt(i+15))<<24,255&e.charCodeAt(i+8)|(255&e.charCodeAt(i+9))<<8|(255&e.charCodeAt(i+10))<<16|(255&e.charCodeAt(i+11))<<24],o=Nn(o,u),o=Bn(o,31),o=Nn(o,l),s=Hn(s,o),s=Bn(s,27),s=qn(s,a),s=qn(Nn(s,[0,5]),[0,1390208809]),c=Nn(c,l),c=Bn(c,33),c=Nn(c,u),a=Hn(a,c),a=Bn(a,31),a=qn(a,s),a=qn(Nn(a,[0,5]),[0,944331445]);switch(o=[0,0],c=[0,0],n){case 15:c=Hn(c,Ln([0,e.charCodeAt(i+14)],48));case 14:c=Hn(c,Ln([0,e.charCodeAt(i+13)],40));case 13:c=Hn(c,Ln([0,e.charCodeAt(i+12)],32));case 12:c=Hn(c,Ln([0,e.charCodeAt(i+11)],24));case 11:c=Hn(c,Ln([0,e.charCodeAt(i+10)],16));case 10:c=Hn(c,Ln([0,e.charCodeAt(i+9)],8));case 9:c=Hn(c,[0,e.charCodeAt(i+8)]),c=Nn(c,l),c=Bn(c,33),c=Nn(c,u),a=Hn(a,c);case 8:o=Hn(o,Ln([0,e.charCodeAt(i+7)],56));case 7:o=Hn(o,Ln([0,e.charCodeAt(i+6)],48));case 6:o=Hn(o,Ln([0,e.charCodeAt(i+5)],40));case 5:o=Hn(o,Ln([0,e.charCodeAt(i+4)],32));case 4:o=Hn(o,Ln([0,e.charCodeAt(i+3)],24));case 3:o=Hn(o,Ln([0,e.charCodeAt(i+2)],16));case 2:o=Hn(o,Ln([0,e.charCodeAt(i+1)],8));case 1:o=Hn(o,[0,e.charCodeAt(i)]),o=Nn(o,u),o=Bn(o,31),o=Nn(o,l),s=Hn(s,o)}return s=Hn(s,[0,e.length]),a=Hn(a,[0,e.length]),s=qn(s,a),a=qn(a,s),s=Vn(s),a=Vn(a),s=qn(s,a),a=qn(a,s),("00000000"+(s[0]>>>0).toString(16)).slice(-8)+("00000000"+(s[1]>>>0).toString(16)).slice(-8)+("00000000"+(a[0]>>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)}(function(e){for(var t="",i=0,n=Object.keys(e).sort();i<n.length;i++){var r=n[i],s=e[r],a=s.error?"error":JSON.stringify(s.value);t+=(t?"|":"")+r.replace(/([:|\\])/g,"\\$1")+":"+a}return t}(e))}var rs=function(){function t(){(function(){if(void 0===hr){(function e(){var t=gr();pr(t)?hr=setTimeout(e,2500):(dr=t,hr=void 0)})()}})()}return t.prototype.get=function(t){return void 0===t&&(t={}),On(this,void 0,void 0,(function(){var i,n;return An(this,(function(r){switch(r.label){case 0:return[4,ts(t)];case 1:return i=r.sent(),n=function(e){var t;return{components:e,get visitorId(){return void 0===t&&(t=ns(this.components)),t},set visitorId(e){t=e},version:"3.1.2"}}(i),t.debug&&e("log","Copy the text below to get the debug data:\n\n```\nversion: "+n.version+"\nuserAgent: "+navigator.userAgent+"\ngetOptions: "+JSON.stringify(t,void 0,2)+"\nvisitorId: "+n.visitorId+"\ncomponents: "+is(i)+"\n```"," at util/webrtc.js:36702"),[2,n]}}))}))},t}();var ss,as={load:function(e){var t=(void 0===e?{}:e).delayFallback,i=void 0===t?50:t;return On(this,void 0,void 0,(function(){return An(this,(function(e){switch(e.label){case 0:return[4,jn(i,2*i)];case 1:return e.sent(),[2,new rs]}}))}))},hashComponents:ns,componentsToDebugString:is},os=function(){function i(){var n=this;(0,h.default)(this,i),this._eventDelegate={onRegistered:function(){null!=n._userDelegate&&n._userDelegate.onRegistered(),n.setRegistState(t.RegistState.Registed)},onUnregistered:function(){null!=n._userDelegate&&n._userDelegate.onUnregistered(),n.registState==t.RegistState.Registed&&n.setRegistState(t.RegistState.Unregisted)},onCallCreated:function(e,t){},onCallReceived:function(e,t,i,n,r){},onCallHangup:function(e,t){},onMessageReceived:function(e){}},this._domain="127.0.0.1:5060",this._userStateEventEmitter=new y,this._registStateEventEmitter=new y,this._userCallStateEventEmitter=new y,this._incomingCallEventEmitter=new y,this._receiveConferenceInviteEventEmitter=new y,this._receiveIntercomInviteEventEmitter=new y,this._receiveBroadcastInviteEventEmitter=new y,this._serverConnectStateEventEmitter=new y,this._gisInfoEventEmitter=new y,this._msgReceivedEventEmitter=new y,this._fileMsgReceivedEventEmitter=new y,this._eventEmitter=new y,this._handleAnswerIncomingCall=new y,this._handleAnswerIncomingConference=new y,this.calls={},this.conferences={},this.intercoms={},this.broadcasts={},this.unInitOutgoingCalls={},this.unInitOutGoingSubstitue=null,this._tempOutgoingCall=null,this._tempOutgoningBroadcast=null,this._userRegist=!1,this._logger=Ze.getInstance(),this.commonEventString="event",this._registState=t.RegistState.None,this._iceServer=ut.getInstance(),this._iceServer.on(st.SessionStateChange.toString(),(function(e){n._logger.log("***********"+st.SessionStateChange.toString()),n._eventEmitter.emit(ss.SessionStateChange.toString(),e);var t=JSON.parse(e),i=t[0].cid,r=!1;"2"==t[0].isVideo&&(r=!0);var s=ut.convertIceCallType(t[0].type);if(s!=nt.Conference&&s!=nt.MCUMetting&&s!=nt.Interpose)if(s!=nt.Tempintercom&&s!=nt.Intercom)if(s!=nt.Broadcast)if(s!=nt.Monitor)n.processCallSessionStateChange(t,i,r);else{var a=n.conferences[i];null!=a&&(a.stateice=t[0].state,a.stateInternal==Sn.Terminaled&&delete n.conferences[i])}else{var o=n.broadcasts[i];null!=o&&(o.name=t[0].othername,o.stateice=t[0].state,o.stateInternal==xn.Terminaled&&delete n.broadcasts[i])}else{var c=n.intercoms[i];null!=c&&(c.name=t[0].othername,c.stateice=t[0].state,c.stateInternal==bn.Terminaled&&delete n.intercoms[i])}else n.processConferenceSessionStateChange(s,t,i,r)})),this._iceServer.on(st.regStateChange.toString(),(function(e,i){var r=t.OnlineState.Offline;switch(i){case t.RegistState.Registed:r=t.OnlineState.Online;break;default:break}var s={number:e,state:r};n._userStateEventEmitter.emit("event",s)})),this._iceServer.on(st.CallStateChange.toString(),(function(e,t){var i={userNumber:e,callState:t};n._userCallStateEventEmitter.emit("event",i)})),this._iceServer.on(st.ServerDisconnect.toString(),(function(){n._logger.warn("serverState disconnected"),n._serverConnectStateEventEmitter.emit(n.commonEventString,t.ServiceConnectState.DisConnect)})),this._iceServer.on(st.ServerConnectd.toString(),(function(){n._logger.warn("serverState connected"),n._serverConnectStateEventEmitter.emit(n.commonEventString,t.ServiceConnectState.Connected)})),this._iceServer.on(st.GisInfo.toString(),(function(e){n._gisInfoEventEmitter.emit(n.commonEventString,e)})),this._iceServer.on(st.MsgReceived.toString(),(function(e){n._msgReceivedEventEmitter.emit(n.commonEventString,e)})),this._iceServer.on(st.FileMsgReceived.toString(),(function(e){n._fileMsgReceivedEventEmitter.emit(n.commonEventString,e)})),this._iceServer.on(st.registKickout.toString(),(function(e){n.setRegistState(t.RegistState.ForceKickout)})),this._iceServer.on(st.pushAudioToRTSP.toString(),(function(e){var t=JSON.parse(e),i=t.cid,r=n.conferences[i];if(null!=r)"start"==t.pushstate?r.pushAudioToRTSPState=wn.start:"stop"==t.pushstate&&(r.pushAudioToRTSPState=wn.stop);else{var s=n.broadcasts[i];null!=s&&("start"==t.pushstate?s.pushAudioToRTSPState=wn.start:"stop"==t.pushstate&&(s.pushAudioToRTSPState=wn.stop))}}));var r=as.load();(0,d.default)(s.default.mark((function t(){var i,a,o;return s.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,r;case 2:return i=t.sent,t.next=5,i.get();case 5:a=t.sent,o=a.visitorId,e("log","visitorId: "+o," at util/webrtc.js:36968"),n.uuid=o,rt.getInstance().uuid=n.uuid;case 10:case"end":return t.stop()}}),t)})))()}return(0,f.default)(i,[{key:"setUserDelegate",value:function(e){this._userDelegate=e}},{key:"enableLog",set:function(e){Ze.getInstance().enable=e}},{key:"setRegistState",value:function(e){if(this._registState!=e){this._registState=e;var t={state:e};this._logger.warn("registStateChange: "+e),this._registStateEventEmitter.emit("event",t)}}},{key:"registState",get:function(){return this._registState}},{key:"isRegisted",get:function(){return this._registState==t.RegistState.Registed}},{key:"registStateChange",get:function(){return Hi(this._registStateEventEmitter)}},{key:"userOnlineStateChange",get:function(){return Hi(this._userStateEventEmitter)}},{key:"userCallStateChange",get:function(){return Hi(this._userCallStateEventEmitter)}},{key:"incomingCall",get:function(){return Hi(this._incomingCallEventEmitter)}},{key:"receiveConferenceInvite",get:function(){return Hi(this._receiveConferenceInviteEventEmitter)}},{key:"receiveIntercomInvite",get:function(){return Hi(this._receiveIntercomInviteEventEmitter)}},{key:"receiveBroadcastInvite",get:function(){return Hi(this._receiveBroadcastInviteEventEmitter)}},{key:"serverConnectStateChanged",get:function(){return Hi(this._serverConnectStateEventEmitter)}},{key:"gisInfoNotify",get:function(){return Hi(this._gisInfoEventEmitter)}},{key:"msgReceived",get:function(){return Hi(this._msgReceivedEventEmitter)}},{key:"fileMsgReceived",get:function(){return Hi(this._fileMsgReceivedEventEmitter)}},{key:"handleAnswerIncomingCall",get:function(){return Hi(this._handleAnswerIncomingCall)}},{key:"handleAnswerIncomingConference",get:function(){return Hi(this._handleAnswerIncomingConference)}},{key:"regist",value:function(i){var n=this;this._userRegist=!0,this._registState=t.RegistState.None,this._registOption=i,this._serverIP=i.ip,this._domain=this._serverIP,this._userNumber=i.userName,rt.getInstance().number=i.userName,this._password=i.password;var r="";null!=i.resourceUrl&&(r=i.resourceUrl),this.webSocketServerAlice="wss://"+this._serverIP+":"+i.port+"/"+r;var s="";null!=i.businessResourceUrl&&(s=i.businessResourceUrl),this._iceServer.regist(i.ip,i.businesPort,i.userName,this._businessHandler,s);var a=this.getUrlByNumber(i.userName);return this.alice=this.buildUser1(this.webSocketServerAlice,a,i.userName,null,null,i.userType),this.alice.on(dn.IncomingCall.toString(),(function(t){if(n._logger.warn("sphone incomingCall: "+t.caller+", "+t.cid),"*5*get"!=t.orgCaller&&"*5*record"!=t.orgCaller&&"*5*share"!=t.orgCaller){var i=ut.convertIceCallType(t.calltype);if(i!=nt.Conference&&i!=nt.MCUMetting)if(i!=nt.Tempintercom&&i!=nt.Intercom)if(i!=nt.Broadcast){if(null!=n._interposConference&&(i==nt.Monitor||i==nt.Interpose)){var r=n._interposConference;r._callId=t.id,r._sessionId=t.cid,n.conferences[t.cid]=r,n._interposConference=null,n._logger.warn("auto answer interpose conf call isvideo: "+r.isVideo);var s=r.isVideo;return i==nt.Monitor&&(r.monitorVideoCall=!0,s=!1),void r.accept(r._mediaControl,s)}null!=n._tempOutgoingCall&&(n._tempOutgoingCall.number,t.caller);var a=n.calls[t.cid];if(null==a){var o=t.orgCaller.replace("*5*","");n._logger.warn("incomingcall not found in calls otherNumber: "+o),a=n.unInitOutgoingCalls[o],null!=a?(a._sessionId=t.cid,n.calls[t.cid]=a,n._logger.warn("init session by incomingcall otherNumber: "+o),delete n.unInitOutgoingCalls[o]):null!=n._tempOutgoingCall&&t.caller==n._tempOutgoingCall.number&&(n._logger.warn("tmp incoming back call"),a=n._tempOutgoingCall,a._sessionId=t.cid,n.calls[t.cid]=a)}if(null!=a)a._callId=t.id,a.sipCall=t.invitation,n._logger.warn("auto answer call "+a.number+", sessionId: "+t.cid),a.answer(a._mediaControl,!0);else if(null!=n.unInitOutGoingSubstitue)n.unInitOutGoingSubstitue._callId=t.id,n.unInitOutGoingSubstitue._sessionId=t.cid,n.unInitOutGoingSubstitue.sipCall=t.invitation,n._logger.warn("auto answer call unInitOutGoingSubstitue "+n.unInitOutGoingSubstitue.number+", sessionId: "+t.cid),n.calls[t.cid]=n.unInitOutGoingSubstitue,n.unInitOutGoingSubstitue.answer(n.unInitOutGoingSubstitue._mediaControl,n.unInitOutGoingSubstitue.isVideo),n.unInitOutGoingSubstitue=null;else{t.caller!=rt.getInstance().currentNumber||e("warn","receive incomingcall self!!"," at util/webrtc.js:37346");var c=new yn(t.caller,null,n._iceServer,n.alice);n.setCallStateChangeListener(c),c._callId=t.id,c.sipCall=t.invitation,c._sessionId=t.cid,c.callType=i;var u=t.orgCaller.replace("*5*","");c.otherName=u,n.calls[t.cid]=c;setTimeout((function(){(function(){n._incomingCallEventEmitter.emit("event",{call:c})})()}),500)}}else{n._logger.warn("incoming broadcast");var l=n.broadcasts[t.cid];null!=l&&t.caller==n._userNumber?(l._callId=t.id,l._sessionId=t.cid,l.caller=t.caller,n.broadcasts[t.cid]=l,l.accept(l._mediaControl)):(l=new Mn(null,null,null,n._iceServer,n.alice),l._callId=t.id,l._sessionId=t.cid,l.caller=t.caller,n.broadcasts[t.cid]=l,n._receiveBroadcastInviteEventEmitter.emit("event",{broadcast:l}))}else{n._logger.warn("incoming temp intercom");setTimeout((function(){(function(){var e=n.intercoms[t.cid];null!=e&&t.caller==n._userNumber?(e._callId=t.id,e._sessionId=t.cid,n.intercoms[t.cid]=e,i==nt.Tempintercom&&(e.groupNumber=t.orgCaller.replace("*9*","").substr(0,t.orgCaller.indexOf("~")-3)),e.accept(e._mediaControl)):(e=new Rn(null,null,null,n._iceServer,n.alice),e._callId=t.id,e._sessionId=t.cid,i==nt.Tempintercom?e.groupNumber=t.orgCaller.replace("*9*","").substr(0,t.orgCaller.indexOf("~")-3):e.groupNumber=t.orgCaller.replace(t.caller,"").replace("~",""),n._logger.warn("intercom groupnumber:"+e.groupNumber),n.intercoms[t.cid]=e,n._receiveIntercomInviteEventEmitter.emit("event",{intercom:e}))})()}),500)}else{var d=!1;i==nt.MCUMetting&&(d=!0);var h=n.conferences[t.cid],f=function(){var e=n.conferences[t.cid];null==e||e.state==Sn.Leave&&!e.isReEnter?(null==e&&(e=new Tn(null,null,null,n._iceServer,n.alice),e.isMCU=d,e._sessionId=t.cid,n.conferences[t.cid]=e),e._callId=t.id,e.caller=t.caller,e.isSchedule=t.isScheduleConference,e.sipCall=t.invitation,e.isPlan=t.isPlan,e.stateChange.on((function(t){t.state==Sn.Terminaled&&(delete n.conferences[e._sessionId],n._logger.warn("remove conf :"+e._sessionId))})),n._receiveConferenceInviteEventEmitter.emit("event",{conference:e})):(e.isMCU=d,e._callId=t.id,e.caller=t.caller,e.isSchedule=t.isScheduleConference,e.isPlan=t.isPlan,e.isReEnter&&(e.isReEnter=!1),e.sipCall=t.invitation,e.accept(e._mediaControl,e.isVideo))};null==h?setTimeout((function(){f()}),500):f()}}})),this.repeatRegist()}},{key:"unRegist",value:function(){return this.conferences={},this._userRegist=!1,this._iceServer.unRegist(),null!=this.alice?this.alice.unregister():Promise.resolve()}},{key:"getGroups",value:function(){return this._iceServer.getRootGroups()}},{key:"getGroupDetailById",value:function(e){return this._iceServer.getGroupWithUsersById(e)}},{key:"getGroupDetailJsonById",value:function(e){return this._iceServer.getGroupWithUsersJsonById(e)}},{key:"get28281Groups",value:function(){return this._iceServer.get28281Groups()}},{key:"getMonitors28281ByGroupId",value:function(e,t){return this._iceServer.getMonitors28281ByGroupId(e,t)}},{key:"getLocalMonitors",value:function(){return this._iceServer.getLocalVideos()}},{key:"getBusinessClient",value:function(){return kn.getInstance()}},{key:"getUserDetail",value:function(){return this._iceServer.getUserDetail()}},{key:"getUserDetailByNumber",value:function(e){var t=this;return this._iceServer.getUserDetailByNumber(e).then((function(i){return t._iceServer.GetUserSessions(e).then((function(e){var t=new Array,n=new Array;e.forEach((function(e){switch(e.type){case D.CallType.CallTypeSingle:case D.CallType.CallTypeSingle2:t.push({id:e.cid,called:e.othernum,caller:e.callingnum});break;case D.CallType.CallTypeTemporary:n.push({id:e.cid,name:e.othernum});break;default:break}}));var r={number:i.employeeId,name:i.name,longitude:i.longitude,latitude:i.latitude,calls:t,conferences:n};return Promise.resolve(r)}))}))}},{key:"getAllSessions",value:function(e,t){return this._iceServer.GetUserSessions1(e,t)}},{key:"getUserDetailByNumber1",value:function(e){return this._iceServer.getUserDetailByNumber1(e)}},{key:"getUserSessions",value:function(e){return this._iceServer.GetUserSessions(e)}},{key:"getOrgId",value:function(){return this._iceServer.getUserDetail().then((function(e){return Promise.resolve(e.monFlag)})).catch((function(e){return Promise.reject(e)}))}},{key:"getOnlineUsers",value:function(){return this._iceServer.getAllRegistedUsers()}},{key:"getOnlineUsersById",value:function(e){return this._iceServer.getAllRegistedUsersById(e)}},{key:"makeCallAudio",value:function(e,t){this.makecallInner(!1,e,t,null)}},{key:"makeCall",value:function(e,t,i){var n=this;if(null!=this.unInitOutgoingCalls[e]){if(Date.now()-this.unInitOutgoingCalls[e].requestStartTime<5e3)return Promise.reject("busy, wait moment");this._logger.warn("outgoing call timeout "+e),delete this.unInitOutgoingCalls[e]}var r=new yn(e,t,this._iceServer,this.alice);return r._disabelVideoTrack=!0,r.isCaller=!0,this.setCallStateChangeListener(r),this.unInitOutgoingCalls[e]=r,r.invite(i).then((function(){return Promise.resolve(r)})).catch((function(t){return delete n.unInitOutgoingCalls[e],Promise.reject(t)}))}},{key:"openMonitor",value:function(e,t){var i=this;if(null!=this.unInitOutgoingCalls[e])return this._logger.error("there is same number call outgoing!"),Promise.reject("busy");var n=new yn(e,t,this._iceServer,this.alice);return this.setCallStateChangeListener(n),this.unInitOutgoingCalls[e]=n,n.invite(!0,1).then((function(){return Promise.resolve(n)})).catch((function(t){return delete i.unInitOutgoingCalls[e],Promise.reject(t)}))}},{key:"openMonitor3g",value:function(e,t,i,n){var r=this;if(null!=this.unInitOutgoingCalls[e])return this._logger.error("there is same number call outgoing!"),Promise.reject("busy");var s=new yn(e,t,this._iceServer,this.alice);return s.offerVideo=!1,this.setCallStateChangeListener(s),this.unInitOutgoingCalls[e]=s,s.open(i,n).then((function(){return Promise.resolve(s)})).catch((function(t){return delete r.unInitOutgoingCalls[e],Promise.reject(t)}))}},{key:"startUnattended",value:function(e){return this._iceServer.startAttended(e)}},{key:"stopUnattended",value:function(){return this._iceServer.startAttended("")}},{key:"getUnattendedState",value:function(){return this._iceServer.getUnattendedState()}},{key:"bindPhoneHandle",value:function(e,t){var i=this;return this._iceServer.bindPhoneHandle(e,t).then((function(n){return i._logger.log("bind left right phone success: "+JSON.stringify(n)),rt.getInstance().leftPhone=e,rt.getInstance().rightPhone=t,Promise.resolve()})).catch((function(e){return i._logger.log("bind left right phone fail: "+JSON.stringify(e)),Promise.reject(e)}))}},{key:"makeCallByLeftPhone",value:function(e,t,i){var n=this,r=new yn(e,t,this._iceServer,this.alice);return this.setCallStateChangeListener(r),r.inviteByLeftPhone(i).then((function(){return n.calls[r._sessionId]=r,Promise.resolve(r)})).catch((function(e){return Promise.reject(e)}))}},{key:"makeCallByRightPhone",value:function(e,t){this._iceServer.makecallByRightPhone(e,t)}},{key:"SubsituteCall",value:function(e,t,i,n){var r=this;if(null!=this.unInitOutGoingSubstitue)return this._logger.error("there is a substitue call outgoing, wait a moment"),Promise.reject("busy");var s=new yn(e,t,this._iceServer,this.alice);return this.unInitOutGoingSubstitue=s,s.SubsituteCall(n).then((function(){return r.calls[s._sessionId]=s,Promise.resolve(s)})).catch((function(e){return r.unInitOutGoingSubstitue=null,Promise.reject(e)}))}},{key:"forceInterposeCall",value:function(e,t){var i=new Tn(t,null,null,this._iceServer,this.alice);return i._interposeCalled=e.called,this._interposConference=i,this._iceServer.forceInterposeCall(e.id,e.caller).then((function(e){return Promise.resolve(i)})).catch((function(e){return Promise.reject(e)}))}},{key:"forceRemoveOther",value:function(e,t){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.caller;return this._tempOutgoingCall=new yn(n,t,this._iceServer,this.alice),this.setCallStateChangeListener(this._tempOutgoingCall),this._iceServer.forceRemoveOther(e.id,n).then((function(e){return Promise.resolve(i._tempOutgoingCall)}))}},{key:"monitorCall",value:function(e,t){var i=new Tn(t,null,null,this._iceServer,this.alice);return i._interposeCalled=e.called,this._interposConference=i,this._iceServer.MonitorCall(e.id,e.caller).then((function(e){return Promise.resolve(i)}))}},{key:"forceRemoveCall",value:function(e){return this._iceServer.forceRemoveCall(e.id,e.caller)}},{key:"startConference",value:function(e,t,i){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this.startConferenceByNumber(e,t,i,n,rt.getInstance().currentNumber)}},{key:"enterConference",value:function(e){return this._iceServer.conferenceAddMember(e,this._userNumber)}},{key:"createShecduleConference",value:function(e,t,i,n){var r=this;return this._iceServer.createShecduleConf(e,i,n,t).then((function(t){r._logger.warn("create scheduel result: "+t);var s=JSON.parse(t),a={name:s.meeting_name,sessionId:s.meeting_cid,isVideo:i,startTime:n,members:e};return Promise.resolve(a)})).catch((function(e){return Promise.reject(e)}))}},{key:"modifyShecduleConference",value:function(e){return this._iceServer.fixScheduleConf(e.sessionId,e.members,e.isVideo,e.startTime,e.name)}},{key:"getScheduleConferences",value:function(){return this._iceServer.getScheduleConf().then((function(e){var t=JSON.parse(e),i=t.meetings,n=new Array;return null!=i&&i.forEach((function(e){var t=!1;"2"==e.media_type&&(t=!0);var i=new Date(e.start_time),r=new Array,s=e.members;s.split(",").forEach((function(e){r.push(e)}));var a={name:e.meeting_name,sessionId:e.cid,isVideo:t,startTime:i,members:r};n.push(a)})),Promise.resolve(n)})).catch((function(e){return Promise.reject(e)}))}},{key:"deleteScheduleConferences",value:function(e){return this._iceServer.deleteScheduleConf(e.sessionId)}},{key:"startTempIntercom",value:function(e,t,i){var n=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:rt.getInstance().currentNumber,s=new Rn(t,e,i,this._iceServer,this.alice);return s.start(r).then((function(e){return s._sessionId=e.cid,s.stateChange.on((function(e){e.state==bn.Terminaled&&delete n.intercoms[s._sessionId]})),n.intercoms[s._sessionId]=s,Promise.resolve(s)})).catch((function(e){return Promise.reject(e)}))}},{key:"startIntercom",value:function(e,t){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:rt.getInstance().currentNumber,r=new Rn(t,null,"",this._iceServer,this.alice);return r.groupNumber=e,r.applySpeak(n).then((function(e){return r._sessionId=e.cid,r.stateChange.on((function(e){e.state==bn.Terminaled&&delete i.intercoms[r._sessionId]})),i.intercoms[r._sessionId]=r,Promise.resolve(r)})).catch((function(e){return Promise.reject(e)}))}},{key:"startBroadcast",value:function(e,t,i){var n=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:rt.getInstance().currentNumber;return this._tempOutgoningBroadcast=new Mn(t,e,i,this._iceServer,this.alice),this._tempOutgoningBroadcast.start(r).then((function(){n._tempOutgoningBroadcast.stateChange.on((function(e){e.state==xn.Terminaled&&delete n.broadcasts[e.sender.sessionId]})),n.broadcasts[n._tempOutgoningBroadcast._sessionId]=n._tempOutgoningBroadcast;var e=n._tempOutgoningBroadcast;return n._tempOutgoningBroadcast=null,Promise.resolve(e)})).catch((function(e){return Promise.reject(e)}))}},{key:"getDecoderDevices",value:function(){return this._iceServer.getDecoderDevices()}},{key:"getDecoderDeviceConfig",value:function(e){return this._iceServer.getDecoderDeviceConfig(e)}},{key:"getDecoderDeviceChannelState",value:function(e,t){return this._iceServer.getDecoderChannelState(e,t)}},{key:"setDecoderDeviceWindows",value:function(e,t){return this._iceServer.setDecoderWindows(e,t)}},{key:"uploadGisInfo",value:function(e,t,i){return this._iceServer.uploadGISInfo(e,t,i)}},{key:"setGisTrace",value:function(e){return this._iceServer.setGisTrace(e)}},{key:"cancelGisTrace",value:function(e){return this._iceServer.cancelGisTrace(e)}},{key:"getGisPosition",value:function(e){return this._iceServer.getGisPosition(e)}},{key:"getGisHistory",value:function(e,t,i){return this._iceServer.getGisHistory(e,t,i)}},{key:"getGisHistoryPage",value:function(e,t,i,n,r){return this._iceServer.getGisHistoryPage(e,t,i,n,r)}},{key:"getGisInfoByRectangle",value:function(e,t,i,n,r){return this._iceServer.getGisInfoByRectangle(e,t,i,n,r)}},{key:"getGisInfoByEllipse",value:function(e,t,i,n,r){return this._iceServer.getGisInfoByEllipse(e,t,i,n,r)}},{key:"getSmsGis",value:function(e){return this._iceServer.getSmsGis(e)}},{key:"getSmsGisRepeat",value:function(e,t){return this._iceServer.getSmsGisRepeat(e,t)}},{key:"sendMessage",value:function(e,t){var i=this.getUrlByNumber(e);this.alice.message(i,t)}},{key:"sendGroupMessage",value:function(e,t){return this._iceServer.SendMsg(t,e)}},{key:"getOfflineMsg",value:function(e){return this._iceServer.getOfflineMsg(e)}},{key:"setMessageRecevied",value:function(e,t){return this._iceServer.SetMessageRecevied(e,t)}},{key:"applyUploadFile",value:function(e,t,i){return this._iceServer.ApplyUploadFile(e,t,i)}},{key:"setUploadFileResult",value:function(e,t){return this._iceServer.SetUploadFileResult(e,t)}},{key:"setFileReceived",value:function(e,t){return this._iceServer.SetFileRecieved(e,t)}},{key:"getPlanInfo",value:function(){return this._iceServer.getPlanInfo()}},{key:"startPlan",value:function(e){return this._iceServer.startPlan(e)}},{key:"handleMode",get:function(){return rt.getInstance().handleMode},set:function(e){rt.getInstance().handleMode=e}},{key:"audioInputDeviceConfig",get:function(){return rt.getInstance().audioInputDeviceConfig},set:function(e){rt.getInstance().audioInputDeviceConfig=e}},{key:"videoInputDeviceConfig",get:function(){return rt.getInstance().videoInputDeviceConfig},set:function(e){rt.getInstance().videoInputDeviceConfig=e}},{key:"getServerVersion",value:function(){return this._iceServer.getVersion()}},{key:"getCompanyName",value:function(){return this._iceServer.getCompanyName()}},{key:"getVersion",value:function(){return"2.2.2"}},{key:"previewCamera",value:function(e){return this.alice.previewCamera(e)}},{key:"getBindPhoneInfo",value:function(){return{leftPhone:rt.getInstance().leftPhone,rightPhone:rt.getInstance().rightPhone}}},{key:"enterSession",value:function(e){return this._iceServer.conferenceAddMember(e,rt.getInstance().currentNumber)}},{key:"forceKickout",value:function(){return this._iceServer.forceKickOut(this._userNumber)}},{key:"checkSessionIsRuning",value:function(e){return this._iceServer.IFCReqCheckSessionIsRuning(e)}},{key:"reqCreateConfByJson",value:function(e){return this._iceServer.IFCReqCreateConfByJson(JSON.stringify(e))}},{key:"getLoginState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rt.getInstance().currentNumber;return this._iceServer.getLoginState(e)}},{key:"forceLogin",value:function(){var e=this;return this.forceKickout().then((function(t){return t?e.regist(e._registOption):Promise.reject()})).catch((function(e){return Promise.reject(e)}))}},{key:"startFileBroadcast",value:function(e,t,i){return this._iceServer.startFileBroadcast(e,t,i)}},{key:"getFileBroadcastState",value:function(e){return this._iceServer.getFileBroadcastState(e)}},{key:"reqChangePasswd",value:function(e,t,i){return this._iceServer.reqChangePasswd(e,t,i)}},{key:"startConferenceByNumber",value:function(e,t,i){var n=this,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:rt.getInstance().number,a=new Tn(t,e,i,this._iceServer,this.alice,r);return a.isCaller=!0,a.start(s).then((function(){return n.conferences[a._sessionId]=a,a.stateChange.on((function(e){e.state==Sn.Terminaled&&delete n.conferences[a._sessionId]})),Promise.resolve(a)})).catch((function(e){return Promise.reject(e)}))}},{key:"printConfs",value:function(){var e=" ";for(var t in this.conferences)if(Object.prototype.hasOwnProperty.call(this.conferences,t)){var i=this.conferences[t];e+=",",e+=null!=i?i._sessionId:"null"}return e}},{key:"getUrlByNumber",value:function(e){return"sip:"+e+"@"+this._domain}},{key:"makecallInner",value:function(e,t,i,n){var r=this,s=this.getUrlByNumber(t),a={sessionDescriptionHandlerOptions:{constraints:{audio:!0,video:e}}};this.alice.call1(s,null,i,n,a,{requestDelegate:{onReject:function(e){}}}).catch((function(e){r._logger.error(e),alert("Failed to begin session.\n"+e)}))}},{key:"makecall",value:function(e,t){var i=this,n=this.getUrlByNumber(e);this.alice.call1(n,null,t,null,{sessionDescriptionHandlerOptions:{constraints:{audio:!0,video:!0}}},{requestDelegate:{onReject:function(e){}}}).catch((function(e){i._logger.error(e),alert("Failed to begin session.\n"+e)}))}},{key:"iceMakecall",value:function(e){this._iceServer.makecall(e.toString(),!0)}},{key:"hangup",value:function(e){this.alice.hangup1(e)}},{key:"createConference",value:function(e,t){this._conferenceVideoControl=t,this._iceServer.createConference(e,!0)}},{key:"acceptConference",value:function(e){this.answerVideo(this._conferenceCallId,e)}},{key:"rejectConference",value:function(){this.hangup(this._conferenceCallId)}},{key:"applySpeakClick",value:function(){var e=(0,d.default)(s.default.mark((function e(){return s.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this._iceServer.applySpeak("20001");case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"releaseSpeakClick",value:function(){var e=(0,d.default)(s.default.mark((function e(){return s.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this._iceServer.releaseSpeak("20001");case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"endConference",value:function(){this._iceServer.endConference(this._conferenceSessionId)}},{key:"conferenceAddMember",value:function(){var e=(0,d.default)(s.default.mark((function e(t){return s.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this._iceServer.conferenceAddMember(this._conferenceSessionId,t);case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"conferenceDeleteMember",value:function(e){this._iceServer.conferenceDeleteMember(this._conferenceSessionId,e)}},{key:"conferenceGetVideo",value:function(e,t){this._conferenceMemberVideo=t,this._iceServer.conferenceGetVideo(this._conferenceSessionId,e)}},{key:"conferencePushMember",value:function(e){this._iceServer.conferencePushMember(this._conferenceSessionId,e)}},{key:"setCallStateChangeListener",value:function(e){var t=this;e.callStateChange.on((function(e){if(e.state==r.Release){t._logger.warn("remove call ");var i=e.sender;delete t.calls[i._sessionId]}}))}},{key:"makecallWithControl",value:function(e,t,i,n){var r=this,s=this.getUrlByNumber(e);this.alice.call1(s,t,i,n,{sessionDescriptionHandlerOptions:{constraints:{audio:!0,video:!1}}},{requestDelegate:{onReject:function(e){}}}).catch((function(e){r._logger.error(e),alert("Failed to begin session.\n"+e)}))}},{key:"makeCallVideo",value:function(e,t){this.makecallInner(!0,e,t,null)}},{key:"connect",value:function(){var e=this;return this._userRegist?this.alice.connect().then((function(){return e.registInner()})).catch((function(i){return e._logger.warn("[".concat(e.alice.id,"] failed to connect")),e._logger.warn(i),e.setRegistState(t.RegistState.ConnectError),Promise.reject})):Promise.resolve(null)}},{key:"registInner",value:function(){var e=this;return i.getInstance().alice.register({extraHeaders:["auth-uuid: "+this.uuid]},{requestDelegate:{onReject:function(n){i.getInstance()._logger.warn("[".concat(i.getInstance().alice.id,"] REGISTER rejected"));"Reason: ".concat(n.message.reasonPhrase,"\n"),"Reason: ".concat(n.message.statusCode,"\n");var r=t.RegistState.OtherError;switch(n.message.statusCode){case 403:r=t.RegistState.PasswordError;break;case 404:r=t.RegistState.UserNotExist;break;case 405:r=t.RegistState.RepeatLogin;break;case 406:r=t.RegistState.TypeError;break;case 408:r=t.RegistState.Timeout;break;case 502:case 504:r=t.RegistState.ConnectError;break;default:n.message.statusCode>=500&&n.message.statusCode<=599&&(r=t.RegistState.ServerError);break}e.setRegistState(r),r==t.RegistState.Timeout&&e.regist(e._registOption)}}}).then((function(){return Promise.resolve(1)})).catch((function(e){return i.getInstance()._logger.warn("[".concat(i.getInstance().alice.id,"] failed to register")),i.getInstance()._logger.warn(e),Promise.reject}))}},{key:"repeatRegist",value:function(){return i.getInstance().connect()}},{key:"answerVideo",value:function(e,t){this._logger.log("[".concat(this.alice.id,"] call received")),this.alice.answerVideo(e,t)}},{key:"answerAudio",value:function(e,t){this._logger.log("[".concat(this.alice.id,"] call received")),this.alice.answerAudio(e,t)}},{key:"decline",value:function(e){this.alice.declineById(e)}},{key:"buildUser1",value:function(e,t,i,n,r,s){this._logger.log('Creating "'.concat(name,'" <').concat(t,">..."));var a="sip";s==fn.APPDevice?a="xyphone":s==fn.Dispatcher&&(a="xyplat");var o={aor:t,media:{constraints:{audio:!0,video:!0},local:{video:n},remote:{video:r,audio:r}},userAgentOptions:{displayName:i,authorizationPassword:this._password,sessionDescriptionHandlerFactoryOptions:{},hackWssInTransport:!0,userAgentString:a,logLevel:"debug"}},c=new hn(e,o);return c.delegate=this._eventDelegate,c}},{key:"changeCallCid",value:function(e){var t=this;this._logger.warn("sessionStateChange session not found in calls");var i,n=e[0].frontcid1,r=e[0].frontcid2,s=null;if(null!=n&&""!=n&&(s=this.calls[n],null==s?null!=r&&""!=r&&(s=this.calls[r],null!=s&&(i=r)):i=n),null!=s){this._logger.warn("sessionStateChange update cid by frontcid");var a=e[0].othernum,o=e[0].cid;s._sessionId=o,s.number=a,delete this.calls[i],this.calls[o]=s,this._iceServer.getKeyframe(o,a).then((function(){t._logger.warn("getkeyframe success")})).catch((function(e){t._logger.warn("getkeyframe fail: "+e)}))}return s}},{key:"processCallSessionStateChange",value:function(e,t,i){var n=e[0].othernum,s=this.calls[t];null==s&&(s=this.changeCallCid(e)),null==s&&(s=this.unInitOutgoingCalls[n],null==s||(this._logger.warn(" init call by sessionStateChange "),s._sessionId=t,this.calls[t]=this.unInitOutgoingCalls[n],delete this.unInitOutgoingCalls[n])),s.isVideo=i,s.callstate=e[0].state;try{s.otherLatitude=e[0].lat,s.otherLongitude=e[0].lon,s.otherMark=e[0].otherremark,s.otherName=e[0].othername,s.number=e[0].othernum,s.otherUserType=ut.getUserTypeByIceCode(Number.parseInt(e[0].othertype));var a=tt.Out;"2"==e[0].direction&&(a=tt.In),s.otherDirection=a}catch(o){}s.state==r.Release||s.state==r.Connect&&(s.callingNumber=e[0].callingnum,e[0].callingnum!=rt.getInstance().leftPhone&&e[0].callingnum!=rt.getInstance().rightPhone||(this._logger.log("callout by handanswer, request send video"),s.isCaller?s.requestSendVideo():s._isSendVideo&&this._handleAnswerIncomingCall.emit(this.commonEventString,s)))}},{key:"processConferenceSessionStateChange",value:function(e,t,i,n){var r=this,s=this.conferences[i];if(null!=s)this._logger.log("conference session state change found conference in confs"),e==nt.Interpose&&(this._logger.warn("interpose conf sessionstatechange set caller myself!"),s.caller=rt.getInstance().number),s.stateice=t[0].state,s.isVideo=n,s.name=t[0].othername,s.state==Sn.Terminaled||s.state==Sn.Kickout?(delete this.conferences[i],this._logger.warn("remove conf :"+s._sessionId)):s.state==Sn.Connected&&(s.callingNumber=t[0].callingnum,t[0].callingnum!=rt.getInstance().leftPhone&&t[0].callingnum!=rt.getInstance().rightPhone||(s.isCaller?(this._logger.log("session state change conf is caller, auto requestSendVideo"),s.requestSendVideo()):s._isSendVideo&&this._handleAnswerIncomingConference.emit(this.commonEventString,s)));else{this._logger.warn("conference session state change not found conference sessionid "+this.printConfs());var a=t[0].frontcid1;if(null!=a&&""!=a){var o=this.calls[a];if(null!=o){this._logger.warn("call change to conference by frontcid");var c=new Tn(o._mediaControl,null,null,this._iceServer,this.alice);c._callId=o._callId,c._sessionId=i,this.conferences[i]=c,delete this.calls[a],c.name=t[0].othername,o.becomeConference(c)}}if("6"==t[0].state&&(t[0].callingnum==rt.getInstance().leftPhone||t[0].callingnum==rt.getInstance().rightPhone)){this._logger.log(" session state change start conference by handle");var u=new Tn(null,null,null,this._iceServer,this.alice);u.callingNumber=t[0].callingnum;var l=!1;e==nt.MCUMetting&&(l=!0),u.isMCU=l,u._sessionId=i,this.conferences[i]=u,this._logger.warn("add conf :"+u._sessionId),u.caller="",u.isSchedule=!1,u.isVideo=n,u.stateChange.on((function(e){if(e.state==Sn.Terminaled){var t=e.sender;delete r.conferences[t._sessionId],r._logger.warn("remove conf :"+t._sessionId)}})),this._handleAnswerIncomingConference.emit(this.commonEventString,u)}}}},{key:"setCookie",value:function(e,t){var i=new Date;i.setTime(i.getTime()+2592e6),document.cookie=e+"="+escape(t)+";expires="+i.toUTCString()}},{key:"getCookie",value:function(e){var t,i=new RegExp("(^| )"+e+"=([^;]*)(;|$)");return(t=document.cookie.match(i))?unescape(t[2]):null}}],[{key:"getInstance",value:function(){return null==i.s_instance&&(i.s_instance=new i),i.s_instance}}]),i}();return function(e){e[e["None"]=0]="None",e[e["Registed"]=1]="Registed",e[e["Unregisted"]=2]="Unregisted",e[e["ConnectError"]=3]="ConnectError",e[e["PasswordError"]=4]="PasswordError",e[e["UserNotExist"]=5]="UserNotExist",e[e["ServerError"]=6]="ServerError",e[e["OtherError"]=7]="OtherError",e[e["RepeatLogin"]=8]="RepeatLogin",e[e["TypeError"]=9]="TypeError",e[e["ForceKickout"]=10]="ForceKickout",e[e["Timeout"]=11]="Timeout",e[e["TTOnline"]=20]="TTOnline"}(t.RegistState||(t.RegistState={})),function(e){e[e["DisConnect"]=0]="DisConnect",e[e["Connected"]=1]="Connected"}(t.ServiceConnectState||(t.ServiceConnectState={})),function(e){e[e["Online"]=0]="Online",e[e["Offline"]=1]="Offline"}(t.OnlineState||(t.OnlineState={})),function(e){e[e["IncomingCall"]=0]="IncomingCall",e[e["SessionStateChange"]=1]="SessionStateChange",e[e["RegistState"]=2]="RegistState",e[e["UserOnlineState"]=3]="UserOnlineState",e[e["UserCallState"]=4]="UserCallState",e[e["GisInfo"]=5]="GisInfo"}(ss||(ss={})),function(e){e[e["Normal"]=0]="Normal",e[e["Left"]=1]="Left",e[e["Right"]=2]="Right"}(t.HandleMode||(t.HandleMode={})),t.DispatcherClient=os,t}({},ice);t.XYClient=S}).call(this,i("0de9")["default"],i("c8ba"))},"3bc6":function(e,t,i){"use strict";var n=i("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(i("4967")),s={name:"UniIcons",emits:["click"],props:{type:{type:String,default:""},color:{type:String,default:"#333333"},size:{type:[Number,String],default:16},customPrefix:{type:String,default:""}},data:function(){return{icons:r.default.glyphs}},computed:{unicode:function(){var e=this,t=this.icons.find((function(t){return t.font_class===e.type}));return t?unescape("%u".concat(t.unicode)):""},iconSize:function(){return function(e){return"number"===typeof e||/^[0-9]*$/g.test(e)?e+"px":e}(this.size)}},methods:{_onClick:function(){this.$emit("click")}}};t.default=s},"3c96":function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports["default"]=e.exports},"3ff9":function(e,t,i){"use strict";i.r(t);var n=i("f0d8"),r=i("98e8");for(var s in r)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(s);var a=i("f0c5"),o=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=o.exports},"448a":function(e,t,i){var n=i("2236"),r=i("11b0"),s=i("6613"),a=i("0676");e.exports=function(e){return n(e)||r(e)||s(e)||a()},e.exports.__esModule=!0,e.exports["default"]=e.exports},"47fe":function(e,t,i){"use strict";var n=i("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(i("a34a")),s=n(i("ed6d")),a=n(i("6b58")),o=n(i("36c6")),c=n(i("c973")),u=n(i("970b")),l=n(i("5bc3")),d=n(i("7037"));function h(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=(0,o.default)(e);if(t){var r=(0,o.default)(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return(0,a.default)(this,i)}}var f={email:/^\S+?@\S+?\.\S+?$/,idcard:/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i")},g={int:"integer",bool:"boolean",double:"number",long:"number",password:"string"};function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=["label"];i.forEach((function(t){void 0===e[t]&&(e[t]="")}));var n=t;for(var r in e){var s=new RegExp("{"+r+"}");n=n.replace(s,e[r])}return n}var v={integer:function(e){return v.number(e)&&parseInt(e,10)===e},string:function(e){return"string"===typeof e},number:function(e){return!isNaN(e)&&"number"===typeof e},boolean:function(e){return"boolean"===typeof e},float:function(e){return v.number(e)&&!v.integer(e)},array:function(e){return Array.isArray(e)},object:function(e){return"object"===(0,d.default)(e)&&!v.array(e)},date:function(e){return e instanceof Date},timestamp:function(e){return!(!this.integer(e)||Math.abs(e).toString().length>16)},file:function(e){return"string"===typeof e.url},email:function(e){return"string"===typeof e&&!!e.match(f.email)&&e.length<255},url:function(e){return"string"===typeof e&&!!e.match(f.url)},pattern:function(e,t){try{return new RegExp(e).test(t)}catch(i){return!1}},method:function(e){return"function"===typeof e},idcard:function(e){return"string"===typeof e&&!!e.match(f.idcard)},"url-https":function(e){return this.url(e)&&e.startsWith("https://")},"url-scheme":function(e){return e.startsWith("://")},"url-web":function(e){return!1}},m=function(){function e(t){(0,u.default)(this,e),this._message=t}return(0,l.default)(e,[{key:"validateRule",value:function(){var e=(0,c.default)(r.default.mark((function e(t,i,n,s,a){var o,c,u,l,d,h,f,g,p;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(o=null,c=i.rules,u=c.findIndex((function(e){return e.required})),!(u<0)){e.next=8;break}if(null!==n&&void 0!==n){e.next=6;break}return e.abrupt("return",o);case 6:if("string"!==typeof n||n.length){e.next=8;break}return e.abrupt("return",o);case 8:if(l=this._message,void 0!==c){e.next=11;break}return e.abrupt("return",l["default"]);case 11:d=0;case 12:if(!(d<c.length)){e.next=35;break}if(h=c[d],f=this._getValidateType(h),Object.assign(h,{label:i.label||'["'.concat(t,'"]')}),!y[f]){e.next=20;break}if(o=y[f](h,n,l),null==o){e.next=20;break}return e.abrupt("break",35);case 20:if(!h.validateExpr){e.next=26;break}if(g=Date.now(),p=h.validateExpr(n,a,g),!1!==p){e.next=26;break}return o=this._getMessage(h,h.errorMessage||this._message["default"]),e.abrupt("break",35);case 26:if(!h.validateFunction){e.next=32;break}return e.next=29,this.validateFunction(h,n,s,a,f);case 29:if(o=e.sent,null===o){e.next=32;break}return e.abrupt("break",35);case 32:d++,e.next=12;break;case 35:return null!==o&&(o=l.TAG+o),e.abrupt("return",o);case 37:case"end":return e.stop()}}),e,this)})));return function(t,i,n,r,s){return e.apply(this,arguments)}}()},{key:"validateFunction",value:function(){var e=(0,c.default)(r.default.mark((function e(t,i,n,s,a){var o,c,u;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return o=null,e.prev=1,c=null,e.next=5,t.validateFunction(t,i,s||n,(function(e){c=e}));case 5:u=e.sent,(c||"string"===typeof u&&u||!1===u)&&(o=this._getMessage(t,c||u,a)),e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](1),o=this._getMessage(t,e.t0.message,a);case 12:return e.abrupt("return",o);case 13:case"end":return e.stop()}}),e,this,[[1,9]])})));return function(t,i,n,r,s){return e.apply(this,arguments)}}()},{key:"_getMessage",value:function(e,t,i){return p(e,t||e.errorMessage||this._message[i]||t["default"])}},{key:"_getValidateType",value:function(e){var t="";return e.required?t="required":e.format?t="format":e.arrayType?t="arrayTypeFormat":e.range?t="range":void 0!==e.maximum||void 0!==e.minimum?t="rangeNumber":void 0!==e.maxLength||void 0!==e.minLength?t="rangeLength":e.pattern?t="pattern":e.validateFunction&&(t="validateFunction"),t}}]),e}(),y={required:function(e,t,i){return e.required&&function(e,t){return void 0===e||null===e||("string"===typeof e&&!e||(!(!Array.isArray(e)||e.length)||"object"===t&&!Object.keys(e).length))}(t,e.format||(0,d.default)(t))?p(e,e.errorMessage||i.required):null},range:function(e,t,i){for(var n=e.range,r=e.errorMessage,s=new Array(n.length),a=0;a<n.length;a++){var o=n[a];v.object(o)&&void 0!==o.value?s[a]=o.value:s[a]=o}var c=!1;return Array.isArray(t)?c=new Set(t.concat(s)).size===s.length:s.indexOf(t)>-1&&(c=!0),c?null:p(e,r||i["enum"])},rangeNumber:function(e,t,i){if(!v.number(t))return p(e,e.errorMessage||i.pattern.mismatch);var n=e.minimum,r=e.maximum,s=e.exclusiveMinimum,a=e.exclusiveMaximum,o=s?t<=n:t<n,c=a?t>=r:t>r;return void 0!==n&&o?p(e,e.errorMessage||i["number"][s?"exclusiveMinimum":"minimum"]):void 0!==r&&c?p(e,e.errorMessage||i["number"][a?"exclusiveMaximum":"maximum"]):void 0!==n&&void 0!==r&&(o||c)?p(e,e.errorMessage||i["number"].range):null},rangeLength:function(e,t,i){if(!v.string(t)&&!v.array(t))return p(e,e.errorMessage||i.pattern.mismatch);var n=e.minLength,r=e.maxLength,s=t.length;return void 0!==n&&s<n?p(e,e.errorMessage||i["length"].minLength):void 0!==r&&s>r?p(e,e.errorMessage||i["length"].maxLength):void 0!==n&&void 0!==r&&(s<n||s>r)?p(e,e.errorMessage||i["length"].range):null},pattern:function(e,t,i){return v["pattern"](e.pattern,t)?null:p(e,e.errorMessage||i.pattern.mismatch)},format:function(e,t,i){var n=Object.keys(v),r=g[e.format]?g[e.format]:e.format||e.arrayType;return n.indexOf(r)>-1&&!v[r](t)?p(e,e.errorMessage||i.typeError):null},arrayTypeFormat:function(e,t,i){if(!Array.isArray(t))return p(e,e.errorMessage||i.typeError);for(var n=0;n<t.length;n++){var r=t[n],s=this.format(e,r,i);if(null!==s)return s}return null}},_=function(e){(0,s.default)(i,e);var t=h(i);function i(e,n){var r;return(0,u.default)(this,i),r=t.call(this,i.message),r._schema=e,r._options=n||null,r}return(0,l.default)(i,[{key:"updateSchema",value:function(e){this._schema=e}},{key:"validate",value:function(){var e=(0,c.default)(r.default.mark((function e(t,i){var n;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=this._checkFieldInSchema(t),n){e.next=5;break}return e.next=4,this.invokeValidate(t,!1,i);case 4:n=e.sent;case 5:return e.abrupt("return",n.length?n[0]:null);case 6:case"end":return e.stop()}}),e,this)})));return function(t,i){return e.apply(this,arguments)}}()},{key:"validateAll",value:function(){var e=(0,c.default)(r.default.mark((function e(t,i){var n;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=this._checkFieldInSchema(t),n){e.next=5;break}return e.next=4,this.invokeValidate(t,!0,i);case 4:n=e.sent;case 5:return e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)})));return function(t,i){return e.apply(this,arguments)}}()},{key:"validateUpdate",value:function(){var e=(0,c.default)(r.default.mark((function e(t,i){var n;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=this._checkFieldInSchema(t),n){e.next=5;break}return e.next=4,this.invokeValidateUpdate(t,!1,i);case 4:n=e.sent;case 5:return e.abrupt("return",n.length?n[0]:null);case 6:case"end":return e.stop()}}),e,this)})));return function(t,i){return e.apply(this,arguments)}}()},{key:"invokeValidate",value:function(){var e=(0,c.default)(r.default.mark((function e(t,i,n){var s,a,o,c,u;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:s=[],a=this._schema,e.t0=r.default.keys(a);case 3:if((e.t1=e.t0()).done){e.next=15;break}return o=e.t1.value,c=a[o],e.next=8,this.validateRule(o,c,t[o],t,n);case 8:if(u=e.sent,null==u){e.next=13;break}if(s.push({key:o,errorMessage:u}),i){e.next=13;break}return e.abrupt("break",15);case 13:e.next=3;break;case 15:return e.abrupt("return",s);case 16:case"end":return e.stop()}}),e,this)})));return function(t,i,n){return e.apply(this,arguments)}}()},{key:"invokeValidateUpdate",value:function(){var e=(0,c.default)(r.default.mark((function e(t,i,n){var s,a,o;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:s=[],e.t0=r.default.keys(t);case 2:if((e.t1=e.t0()).done){e.next=13;break}return a=e.t1.value,e.next=6,this.validateRule(a,this._schema[a],t[a],t,n);case 6:if(o=e.sent,null==o){e.next=11;break}if(s.push({key:a,errorMessage:o}),i){e.next=11;break}return e.abrupt("break",13);case 11:e.next=2;break;case 13:return e.abrupt("return",s);case 14:case"end":return e.stop()}}),e,this)})));return function(t,i,n){return e.apply(this,arguments)}}()},{key:"_checkFieldInSchema",value:function(e){var t=Object.keys(e),n=Object.keys(this._schema);if(new Set(t.concat(n)).size===n.length)return"";var r=t.filter((function(e){return n.indexOf(e)<0})),s=p({field:JSON.stringify(r)},i.message.TAG+i.message["defaultInvalid"]);return[{key:"invalid",errorMessage:s}]}}]),i}(m);_.message=new function(){return{TAG:"",default:"\u9a8c\u8bc1\u9519\u8bef",defaultInvalid:"\u63d0\u4ea4\u7684\u5b57\u6bb5{field}\u5728\u6570\u636e\u5e93\u4e2d\u5e76\u4e0d\u5b58\u5728",validateFunction:"\u9a8c\u8bc1\u65e0\u6548",required:"{label}\u5fc5\u586b",enum:"{label}\u8d85\u51fa\u8303\u56f4",timestamp:"{label}\u683c\u5f0f\u65e0\u6548",whitespace:"{label}\u4e0d\u80fd\u4e3a\u7a7a",typeError:"{label}\u7c7b\u578b\u65e0\u6548",date:{format:"{label}\u65e5\u671f{value}\u683c\u5f0f\u65e0\u6548",parse:"{label}\u65e5\u671f\u65e0\u6cd5\u89e3\u6790,{value}\u65e0\u6548",invalid:"{label}\u65e5\u671f{value}\u65e0\u6548"},length:{minLength:"{label}\u957f\u5ea6\u4e0d\u80fd\u5c11\u4e8e{minLength}",maxLength:"{label}\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7{maxLength}",range:"{label}\u5fc5\u987b\u4ecb\u4e8e{minLength}\u548c{maxLength}\u4e4b\u95f4"},number:{minimum:"{label}\u4e0d\u80fd\u5c0f\u4e8e{minimum}",maximum:"{label}\u4e0d\u80fd\u5927\u4e8e{maximum}",exclusiveMinimum:"{label}\u4e0d\u80fd\u5c0f\u4e8e\u7b49\u4e8e{minimum}",exclusiveMaximum:"{label}\u4e0d\u80fd\u5927\u4e8e\u7b49\u4e8e{maximum}",range:"{label}\u5fc5\u987b\u4ecb\u4e8e{minimum}and{maximum}\u4e4b\u95f4"},pattern:{mismatch:"{label}\u683c\u5f0f\u4e0d\u5339\u914d"}}};var S=_;t.default=S},4967:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={id:"2852637",name:"uniui\u56fe\u6807\u5e93",font_family:"uniicons",css_prefix_text:"uniui-",description:"",glyphs:[{icon_id:"25027049",name:"yanse",font_class:"color",unicode:"e6cf",unicode_decimal:59087},{icon_id:"25027048",name:"wallet",font_class:"wallet",unicode:"e6b1",unicode_decimal:59057},{icon_id:"25015720",name:"settings-filled",font_class:"settings-filled",unicode:"e6ce",unicode_decimal:59086},{icon_id:"25015434",name:"shimingrenzheng-filled",font_class:"auth-filled",unicode:"e6cc",unicode_decimal:59084},{icon_id:"24934246",name:"shop-filled",font_class:"shop-filled",unicode:"e6cd",unicode_decimal:59085},{icon_id:"24934159",name:"staff-filled-01",font_class:"staff-filled",unicode:"e6cb",unicode_decimal:59083},{icon_id:"24932461",name:"VIP-filled",font_class:"vip-filled",unicode:"e6c6",unicode_decimal:59078},{icon_id:"24932462",name:"plus_circle_fill",font_class:"plus-filled",unicode:"e6c7",unicode_decimal:59079},{icon_id:"24932463",name:"folder_add-filled",font_class:"folder-add-filled",unicode:"e6c8",unicode_decimal:59080},{icon_id:"24932464",name:"yanse-filled",font_class:"color-filled",unicode:"e6c9",unicode_decimal:59081},{icon_id:"24932465",name:"tune-filled",font_class:"tune-filled",unicode:"e6ca",unicode_decimal:59082},{icon_id:"24932455",name:"a-rilidaka-filled",font_class:"calendar-filled",unicode:"e6c0",unicode_decimal:59072},{icon_id:"24932456",name:"notification-filled",font_class:"notification-filled",unicode:"e6c1",unicode_decimal:59073},{icon_id:"24932457",name:"wallet-filled",font_class:"wallet-filled",unicode:"e6c2",unicode_decimal:59074},{icon_id:"24932458",name:"paihangbang-filled",font_class:"medal-filled",unicode:"e6c3",unicode_decimal:59075},{icon_id:"24932459",name:"gift-filled",font_class:"gift-filled",unicode:"e6c4",unicode_decimal:59076},{icon_id:"24932460",name:"fire-filled",font_class:"fire-filled",unicode:"e6c5",unicode_decimal:59077},{icon_id:"24928001",name:"refreshempty",font_class:"refreshempty",unicode:"e6bf",unicode_decimal:59071},{icon_id:"24926853",name:"location-ellipse",font_class:"location-filled",unicode:"e6af",unicode_decimal:59055},{icon_id:"24926735",name:"person-filled",font_class:"person-filled",unicode:"e69d",unicode_decimal:59037},{icon_id:"24926703",name:"personadd-filled",font_class:"personadd-filled",unicode:"e698",unicode_decimal:59032},{icon_id:"24923351",name:"back",font_class:"back",unicode:"e6b9",unicode_decimal:59065},{icon_id:"24923352",name:"forward",font_class:"forward",unicode:"e6ba",unicode_decimal:59066},{icon_id:"24923353",name:"arrowthinright",font_class:"arrow-right",unicode:"e6bb",unicode_decimal:59067},{icon_id:"24923353",name:"arrowthinright",font_class:"arrowthinright",unicode:"e6bb",unicode_decimal:59067},{icon_id:"24923354",name:"arrowthinleft",font_class:"arrow-left",unicode:"e6bc",unicode_decimal:59068},{icon_id:"24923354",name:"arrowthinleft",font_class:"arrowthinleft",unicode:"e6bc",unicode_decimal:59068},{icon_id:"24923355",name:"arrowthinup",font_class:"arrow-up",unicode:"e6bd",unicode_decimal:59069},{icon_id:"24923355",name:"arrowthinup",font_class:"arrowthinup",unicode:"e6bd",unicode_decimal:59069},{icon_id:"24923356",name:"arrowthindown",font_class:"arrow-down",unicode:"e6be",unicode_decimal:59070},{icon_id:"24923356",name:"arrowthindown",font_class:"arrowthindown",unicode:"e6be",unicode_decimal:59070},{icon_id:"24923349",name:"arrowdown",font_class:"bottom",unicode:"e6b8",unicode_decimal:59064},{icon_id:"24923349",name:"arrowdown",font_class:"arrowdown",unicode:"e6b8",unicode_decimal:59064},{icon_id:"24923346",name:"arrowright",font_class:"right",unicode:"e6b5",unicode_decimal:59061},{icon_id:"24923346",name:"arrowright",font_class:"arrowright",unicode:"e6b5",unicode_decimal:59061},{icon_id:"24923347",name:"arrowup",font_class:"top",unicode:"e6b6",unicode_decimal:59062},{icon_id:"24923347",name:"arrowup",font_class:"arrowup",unicode:"e6b6",unicode_decimal:59062},{icon_id:"24923348",name:"arrowleft",font_class:"left",unicode:"e6b7",unicode_decimal:59063},{icon_id:"24923348",name:"arrowleft",font_class:"arrowleft",unicode:"e6b7",unicode_decimal:59063},{icon_id:"24923334",name:"eye",font_class:"eye",unicode:"e651",unicode_decimal:58961},{icon_id:"24923335",name:"eye-filled",font_class:"eye-filled",unicode:"e66a",unicode_decimal:58986},{icon_id:"24923336",name:"eye-slash",font_class:"eye-slash",unicode:"e6b3",unicode_decimal:59059},{icon_id:"24923337",name:"eye-slash-filled",font_class:"eye-slash-filled",unicode:"e6b4",unicode_decimal:59060},{icon_id:"24923305",name:"info-filled",font_class:"info-filled",unicode:"e649",unicode_decimal:58953},{icon_id:"24923299",name:"reload-01",font_class:"reload",unicode:"e6b2",unicode_decimal:59058},{icon_id:"24923195",name:"mic_slash_fill",font_class:"micoff-filled",unicode:"e6b0",unicode_decimal:59056},{icon_id:"24923165",name:"map-pin-ellipse",font_class:"map-pin-ellipse",unicode:"e6ac",unicode_decimal:59052},{icon_id:"24923166",name:"map-pin",font_class:"map-pin",unicode:"e6ad",unicode_decimal:59053},{icon_id:"24923167",name:"location",font_class:"location",unicode:"e6ae",unicode_decimal:59054},{icon_id:"24923064",name:"starhalf",font_class:"starhalf",unicode:"e683",unicode_decimal:59011},{icon_id:"24923065",name:"star",font_class:"star",unicode:"e688",unicode_decimal:59016},{icon_id:"24923066",name:"star-filled",font_class:"star-filled",unicode:"e68f",unicode_decimal:59023},{icon_id:"24899646",name:"a-rilidaka",font_class:"calendar",unicode:"e6a0",unicode_decimal:59040},{icon_id:"24899647",name:"fire",font_class:"fire",unicode:"e6a1",unicode_decimal:59041},{icon_id:"24899648",name:"paihangbang",font_class:"medal",unicode:"e6a2",unicode_decimal:59042},{icon_id:"24899649",name:"font",font_class:"font",unicode:"e6a3",unicode_decimal:59043},{icon_id:"24899650",name:"gift",font_class:"gift",unicode:"e6a4",unicode_decimal:59044},{icon_id:"24899651",name:"link",font_class:"link",unicode:"e6a5",unicode_decimal:59045},{icon_id:"24899652",name:"notification",font_class:"notification",unicode:"e6a6",unicode_decimal:59046},{icon_id:"24899653",name:"staff",font_class:"staff",unicode:"e6a7",unicode_decimal:59047},{icon_id:"24899654",name:"VIP",font_class:"vip",unicode:"e6a8",unicode_decimal:59048},{icon_id:"24899655",name:"folder_add",font_class:"folder-add",unicode:"e6a9",unicode_decimal:59049},{icon_id:"24899656",name:"tune",font_class:"tune",unicode:"e6aa",unicode_decimal:59050},{icon_id:"24899657",name:"shimingrenzheng",font_class:"auth",unicode:"e6ab",unicode_decimal:59051},{icon_id:"24899565",name:"person",font_class:"person",unicode:"e699",unicode_decimal:59033},{icon_id:"24899566",name:"email-filled",font_class:"email-filled",unicode:"e69a",unicode_decimal:59034},{icon_id:"24899567",name:"phone-filled",font_class:"phone-filled",unicode:"e69b",unicode_decimal:59035},{icon_id:"24899568",name:"phone",font_class:"phone",unicode:"e69c",unicode_decimal:59036},{icon_id:"24899570",name:"email",font_class:"email",unicode:"e69e",unicode_decimal:59038},{icon_id:"24899571",name:"personadd",font_class:"personadd",unicode:"e69f",unicode_decimal:59039},{icon_id:"24899558",name:"chatboxes-filled",font_class:"chatboxes-filled",unicode:"e692",unicode_decimal:59026},{icon_id:"24899559",name:"contact",font_class:"contact",unicode:"e693",unicode_decimal:59027},{icon_id:"24899560",name:"chatbubble-filled",font_class:"chatbubble-filled",unicode:"e694",unicode_decimal:59028},{icon_id:"24899561",name:"contact-filled",font_class:"contact-filled",unicode:"e695",unicode_decimal:59029},{icon_id:"24899562",name:"chatboxes",font_class:"chatboxes",unicode:"e696",unicode_decimal:59030},{icon_id:"24899563",name:"chatbubble",font_class:"chatbubble",unicode:"e697",unicode_decimal:59031},{icon_id:"24881290",name:"upload-filled",font_class:"upload-filled",unicode:"e68e",unicode_decimal:59022},{icon_id:"24881292",name:"upload",font_class:"upload",unicode:"e690",unicode_decimal:59024},{icon_id:"24881293",name:"weixin",font_class:"weixin",unicode:"e691",unicode_decimal:59025},{icon_id:"24881274",name:"compose",font_class:"compose",unicode:"e67f",unicode_decimal:59007},{icon_id:"24881275",name:"qq",font_class:"qq",unicode:"e680",unicode_decimal:59008},{icon_id:"24881276",name:"download-filled",font_class:"download-filled",unicode:"e681",unicode_decimal:59009},{icon_id:"24881277",name:"pengyouquan",font_class:"pyq",unicode:"e682",unicode_decimal:59010},{icon_id:"24881279",name:"sound",font_class:"sound",unicode:"e684",unicode_decimal:59012},{icon_id:"24881280",name:"trash-filled",font_class:"trash-filled",unicode:"e685",unicode_decimal:59013},{icon_id:"24881281",name:"sound-filled",font_class:"sound-filled",unicode:"e686",unicode_decimal:59014},{icon_id:"24881282",name:"trash",font_class:"trash",unicode:"e687",unicode_decimal:59015},{icon_id:"24881284",name:"videocam-filled",font_class:"videocam-filled",unicode:"e689",unicode_decimal:59017},{icon_id:"24881285",name:"spinner-cycle",font_class:"spinner-cycle",unicode:"e68a",unicode_decimal:59018},{icon_id:"24881286",name:"weibo",font_class:"weibo",unicode:"e68b",unicode_decimal:59019},{icon_id:"24881288",name:"videocam",font_class:"videocam",unicode:"e68c",unicode_decimal:59020},{icon_id:"24881289",name:"download",font_class:"download",unicode:"e68d",unicode_decimal:59021},{icon_id:"24879601",name:"help",font_class:"help",unicode:"e679",unicode_decimal:59001},{icon_id:"24879602",name:"navigate-filled",font_class:"navigate-filled",unicode:"e67a",unicode_decimal:59002},{icon_id:"24879603",name:"plusempty",font_class:"plusempty",unicode:"e67b",unicode_decimal:59003},{icon_id:"24879604",name:"smallcircle",font_class:"smallcircle",unicode:"e67c",unicode_decimal:59004},{icon_id:"24879605",name:"minus-filled",font_class:"minus-filled",unicode:"e67d",unicode_decimal:59005},{icon_id:"24879606",name:"micoff",font_class:"micoff",unicode:"e67e",unicode_decimal:59006},{icon_id:"24879588",name:"closeempty",font_class:"closeempty",unicode:"e66c",unicode_decimal:58988},{icon_id:"24879589",name:"clear",font_class:"clear",unicode:"e66d",unicode_decimal:58989},{icon_id:"24879590",name:"navigate",font_class:"navigate",unicode:"e66e",unicode_decimal:58990},{icon_id:"24879591",name:"minus",font_class:"minus",unicode:"e66f",unicode_decimal:58991},{icon_id:"24879592",name:"image",font_class:"image",unicode:"e670",unicode_decimal:58992},{icon_id:"24879593",name:"mic",font_class:"mic",unicode:"e671",unicode_decimal:58993},{icon_id:"24879594",name:"paperplane",font_class:"paperplane",unicode:"e672",unicode_decimal:58994},{icon_id:"24879595",name:"close",font_class:"close",unicode:"e673",unicode_decimal:58995},{icon_id:"24879596",name:"help-filled",font_class:"help-filled",unicode:"e674",unicode_decimal:58996},{icon_id:"24879597",name:"plus-filled",font_class:"paperplane-filled",unicode:"e675",unicode_decimal:58997},{icon_id:"24879598",name:"plus",font_class:"plus",unicode:"e676",unicode_decimal:58998},{icon_id:"24879599",name:"mic-filled",font_class:"mic-filled",unicode:"e677",unicode_decimal:58999},{icon_id:"24879600",name:"image-filled",font_class:"image-filled",unicode:"e678",unicode_decimal:59e3},{icon_id:"24855900",name:"locked-filled",font_class:"locked-filled",unicode:"e668",unicode_decimal:58984},{icon_id:"24855901",name:"info",font_class:"info",unicode:"e669",unicode_decimal:58985},{icon_id:"24855903",name:"locked",font_class:"locked",unicode:"e66b",unicode_decimal:58987},{icon_id:"24855884",name:"camera-filled",font_class:"camera-filled",unicode:"e658",unicode_decimal:58968},{icon_id:"24855885",name:"chat-filled",font_class:"chat-filled",unicode:"e659",unicode_decimal:58969},{icon_id:"24855886",name:"camera",font_class:"camera",unicode:"e65a",unicode_decimal:58970},{icon_id:"24855887",name:"circle",font_class:"circle",unicode:"e65b",unicode_decimal:58971},{icon_id:"24855888",name:"checkmarkempty",font_class:"checkmarkempty",unicode:"e65c",unicode_decimal:58972},{icon_id:"24855889",name:"chat",font_class:"chat",unicode:"e65d",unicode_decimal:58973},{icon_id:"24855890",name:"circle-filled",font_class:"circle-filled",unicode:"e65e",unicode_decimal:58974},{icon_id:"24855891",name:"flag",font_class:"flag",unicode:"e65f",unicode_decimal:58975},{icon_id:"24855892",name:"flag-filled",font_class:"flag-filled",unicode:"e660",unicode_decimal:58976},{icon_id:"24855893",name:"gear-filled",font_class:"gear-filled",unicode:"e661",unicode_decimal:58977},{icon_id:"24855894",name:"home",font_class:"home",unicode:"e662",unicode_decimal:58978},{icon_id:"24855895",name:"home-filled",font_class:"home-filled",unicode:"e663",unicode_decimal:58979},{icon_id:"24855896",name:"gear",font_class:"gear",unicode:"e664",unicode_decimal:58980},{icon_id:"24855897",name:"smallcircle-filled",font_class:"smallcircle-filled",unicode:"e665",unicode_decimal:58981},{icon_id:"24855898",name:"map-filled",font_class:"map-filled",unicode:"e666",unicode_decimal:58982},{icon_id:"24855899",name:"map",font_class:"map",unicode:"e667",unicode_decimal:58983},{icon_id:"24855825",name:"refresh-filled",font_class:"refresh-filled",unicode:"e656",unicode_decimal:58966},{icon_id:"24855826",name:"refresh",font_class:"refresh",unicode:"e657",unicode_decimal:58967},{icon_id:"24855808",name:"cloud-upload",font_class:"cloud-upload",unicode:"e645",unicode_decimal:58949},{icon_id:"24855809",name:"cloud-download-filled",font_class:"cloud-download-filled",unicode:"e646",unicode_decimal:58950},{icon_id:"24855810",name:"cloud-download",font_class:"cloud-download",unicode:"e647",unicode_decimal:58951},{icon_id:"24855811",name:"cloud-upload-filled",font_class:"cloud-upload-filled",unicode:"e648",unicode_decimal:58952},{icon_id:"24855813",name:"redo",font_class:"redo",unicode:"e64a",unicode_decimal:58954},{icon_id:"24855814",name:"images-filled",font_class:"images-filled",unicode:"e64b",unicode_decimal:58955},{icon_id:"24855815",name:"undo-filled",font_class:"undo-filled",unicode:"e64c",unicode_decimal:58956},{icon_id:"24855816",name:"more",font_class:"more",unicode:"e64d",unicode_decimal:58957},{icon_id:"24855817",name:"more-filled",font_class:"more-filled",unicode:"e64e",unicode_decimal:58958},{icon_id:"24855818",name:"undo",font_class:"undo",unicode:"e64f",unicode_decimal:58959},{icon_id:"24855819",name:"images",font_class:"images",unicode:"e650",unicode_decimal:58960},{icon_id:"24855821",name:"paperclip",font_class:"paperclip",unicode:"e652",unicode_decimal:58962},{icon_id:"24855822",name:"settings",font_class:"settings",unicode:"e653",unicode_decimal:58963},{icon_id:"24855823",name:"search",font_class:"search",unicode:"e654",unicode_decimal:58964},{icon_id:"24855824",name:"redo-filled",font_class:"redo-filled",unicode:"e655",unicode_decimal:58965},{icon_id:"24841702",name:"list",font_class:"list",unicode:"e644",unicode_decimal:58948},{icon_id:"24841489",name:"mail-open-filled",font_class:"mail-open-filled",unicode:"e63a",unicode_decimal:58938},{icon_id:"24841491",name:"hand-thumbsdown-filled",font_class:"hand-down-filled",unicode:"e63c",unicode_decimal:58940},{icon_id:"24841492",name:"hand-thumbsdown",font_class:"hand-down",unicode:"e63d",unicode_decimal:58941},{icon_id:"24841493",name:"hand-thumbsup-filled",font_class:"hand-up-filled",unicode:"e63e",unicode_decimal:58942},{icon_id:"24841494",name:"hand-thumbsup",font_class:"hand-up",unicode:"e63f",unicode_decimal:58943},{icon_id:"24841496",name:"heart-filled",font_class:"heart-filled",unicode:"e641",unicode_decimal:58945},{icon_id:"24841498",name:"mail-open",font_class:"mail-open",unicode:"e643",unicode_decimal:58947},{icon_id:"24841488",name:"heart",font_class:"heart",unicode:"e639",unicode_decimal:58937},{icon_id:"24839963",name:"loop",font_class:"loop",unicode:"e633",unicode_decimal:58931},{icon_id:"24839866",name:"pulldown",font_class:"pulldown",unicode:"e632",unicode_decimal:58930},{icon_id:"24813798",name:"scan",font_class:"scan",unicode:"e62a",unicode_decimal:58922},{icon_id:"24813786",name:"bars",font_class:"bars",unicode:"e627",unicode_decimal:58919},{icon_id:"24813788",name:"cart-filled",font_class:"cart-filled",unicode:"e629",unicode_decimal:58921},{icon_id:"24813790",name:"checkbox",font_class:"checkbox",unicode:"e62b",unicode_decimal:58923},{icon_id:"24813791",name:"checkbox-filled",font_class:"checkbox-filled",unicode:"e62c",unicode_decimal:58924},{icon_id:"24813794",name:"shop",font_class:"shop",unicode:"e62f",unicode_decimal:58927},{icon_id:"24813795",name:"headphones",font_class:"headphones",unicode:"e630",unicode_decimal:58928},{icon_id:"24813796",name:"cart",font_class:"cart",unicode:"e631",unicode_decimal:58929}]}},"4a4b":function(e,t){function i(t,n){return e.exports=i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports["default"]=e.exports,i(t,n)}e.exports=i,e.exports.__esModule=!0,e.exports["default"]=e.exports},"4da6":function(e,t,i){"use strict";i.r(t);var n=i("1dfe"),r=i("8adb");for(var s in r)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(s);var a=i("f0c5"),o=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=o.exports},"4e2a":function(e,t,i){"use strict";function n(e){var t="";for(var i in e){var n=e[i];t+="".concat(i,":").concat(n,";")}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={name:"uni-easyinput",emits:["click","iconClick","update:modelValue","input","focus","blur","confirm","clear","eyes","change","keyboardheightchange"],model:{prop:"modelValue",event:"update:modelValue"},options:{virtualHost:!0},inject:{form:{from:"uniForm",default:null},formItem:{from:"uniFormItem",default:null}},props:{name:String,value:[Number,String],modelValue:[Number,String],type:{type:String,default:"text"},clearable:{type:Boolean,default:!0},autoHeight:{type:Boolean,default:!1},placeholder:{type:String,default:" "},placeholderStyle:String,focus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},maxlength:{type:[Number,String],default:140},confirmType:{type:String,default:"done"},clearSize:{type:[Number,String],default:24},inputBorder:{type:Boolean,default:!0},prefixIcon:{type:String,default:""},suffixIcon:{type:String,default:""},trim:{type:[Boolean,String],default:!1},cursorSpacing:{type:Number,default:0},passwordIcon:{type:Boolean,default:!0},primaryColor:{type:String,default:"#2979ff"},styles:{type:Object,default:function(){return{color:"#333",backgroundColor:"#fff",disableColor:"#F7F6F6",borderColor:"#e5e5e5"}}},errorMessage:{type:[String,Boolean],default:""}},data:function(){return{focused:!1,val:"",showMsg:"",border:!1,isFirstBorder:!1,showClearIcon:!1,showPassword:!1,focusShow:!1,localMsg:"",isEnter:!1}},computed:{isVal:function(){var e=this.val;return!(!e&&0!==e)},msg:function(){return this.localMsg||this.errorMessage},inputMaxlength:function(){return Number(this.maxlength)},boxStyle:function(){return"color:".concat(this.inputBorder&&this.msg?"#e43d33":this.styles.color,";")},inputContentClass:function(){return function(e){var t="";for(var i in e){var n=e[i];n&&(t+="".concat(i," "))}return t}({"is-input-border":this.inputBorder,"is-input-error-border":this.inputBorder&&this.msg,"is-textarea":"textarea"===this.type,"is-disabled":this.disabled,"is-focused":this.focusShow})},inputContentStyle:function(){var e=this.focusShow?this.primaryColor:this.styles.borderColor,t=this.inputBorder&&this.msg?"#dd524d":e;return n({"border-color":t||"#e5e5e5","background-color":this.disabled?this.styles.disableColor:this.styles.backgroundColor})},inputStyle:function(){var e="password"===this.type||this.clearable||this.prefixIcon?"":"10px";return n({"padding-right":e,"padding-left":this.prefixIcon?"":"10px"})}},watch:{value:function(e){this.val=e},modelValue:function(e){this.val=e},focus:function(e){var t=this;this.$nextTick((function(){t.focused=t.focus,t.focusShow=t.focus}))}},created:function(){var e=this;this.init(),this.form&&this.formItem&&this.$watch("formItem.errMsg",(function(t){e.localMsg=t}))},mounted:function(){var e=this;this.$nextTick((function(){e.focused=e.focus,e.focusShow=e.focus}))},methods:{init:function(){this.value||0===this.value?this.val=this.value:this.modelValue||0===this.modelValue||""===this.modelValue?this.val=this.modelValue:this.val=null},onClickIcon:function(e){this.$emit("iconClick",e)},onEyes:function(){this.showPassword=!this.showPassword,this.$emit("eyes",this.showPassword)},onInput:function(e){var t=e.detail.value;this.trim&&("boolean"===typeof this.trim&&this.trim&&(t=this.trimStr(t)),"string"===typeof this.trim&&(t=this.trimStr(t,this.trim))),this.errMsg&&(this.errMsg=""),this.val=t,this.$emit("input",t),this.$emit("update:modelValue",t)},onFocus:function(){var e=this;this.$nextTick((function(){e.focused=!0})),this.$emit("focus",null)},_Focus:function(e){this.focusShow=!0,this.$emit("focus",e)},onBlur:function(){this.focused=!1,this.$emit("focus",null)},_Blur:function(e){e.detail.value;if(this.focusShow=!1,this.$emit("blur",e),!1===this.isEnter&&this.$emit("change",this.val),this.form&&this.formItem){var t=this.form.validateTrigger;"blur"===t&&this.formItem.onFieldChange()}},onConfirm:function(e){var t=this;this.$emit("confirm",this.val),this.isEnter=!0,this.$emit("change",this.val),this.$nextTick((function(){t.isEnter=!1}))},onClear:function(e){this.val="",this.$emit("input",""),this.$emit("update:modelValue",""),this.$emit("clear")},onkeyboardheightchange:function(e){this.$emit("keyboardheightchange",e)},trimStr:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"both";return"both"===t?e.trim():"left"===t?e.trimLeft():"right"===t?e.trimRight():"start"===t?e.trimStart():"end"===t?e.trimEnd():"all"===t?e.replace(/\s+/g,""):e}}};t.default=r},"4ea4":function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports["default"]=e.exports},"5a43":function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n},e.exports.__esModule=!0,e.exports["default"]=e.exports},"5bc3":function(e,t,i){var n=i("a395");function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}e.exports=function(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports["default"]=e.exports},6602:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return r})),i.d(t,"a",(function(){}));var n=function(){var e=this.$createElement,t=this._self._c||e;return t("view",{staticClass:this._$s(0,"sc","container"),attrs:{_i:0}},[t("view",{staticClass:this._$s(1,"sc","intro"),attrs:{_i:1}}),t("text",{staticClass:this._$s(2,"sc","intro"),attrs:{_i:2}}),t("navigator",{},[t("button",{})]),t("navigator",{},[t("button",{})]),t("navigator",{},[t("button",{})])])},r=[]},6613:function(e,t,i){var n=i("5a43");e.exports=function(e,t){if(e){if("string"===typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports["default"]=e.exports},"6b58":function(e,t,i){var n=i("7037")["default"],r=i("3c96");e.exports=function(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return r(e)},e.exports.__esModule=!0,e.exports["default"]=e.exports},"6d76":function(e,t,i){"use strict";(function(e){var n=i("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(i("a34a")),s=n(i("c973")),a=n(i("9523")),o=n(i("47fe")),c=i("299c"),u=n(i("8bbf"));u.default.prototype.binddata=function(t,i,n){if(n)this.$refs[n].setValue(t,i);else{var r;for(var s in this.$refs){var a=this.$refs[s];if(a&&a.$options&&"uniForms"===a.$options.name){r=a;break}}if(!r)return e("error","\u5f53\u524d uni-froms \u7ec4\u4ef6\u7f3a\u5c11 ref \u5c5e\u6027"," at uni_modules/uni-forms/components/uni-forms/uni-forms.vue:38");r.setValue(t,i)}};var l={name:"uniForms",emits:["validate","submit"],options:{virtualHost:!0},props:{value:{type:Object,default:function(){return null}},modelValue:{type:Object,default:function(){return null}},model:{type:Object,default:function(){return null}},rules:{type:Object,default:function(){return{}}},errShowType:{type:String,default:"undertext"},validateTrigger:{type:String,default:"submit"},labelPosition:{type:String,default:"left"},labelWidth:{type:[String,Number],default:""},labelAlign:{type:String,default:"left"},border:{type:Boolean,default:!1}},provide:function(){return{uniForm:this}},data:function(){return{formData:{},formRules:{}}},computed:{localData:function(){var e=this.model||this.modelValue||this.value;return e?(0,c.deepCopy)(e):{}}},watch:{rules:{handler:function(e,t){this.setRules(e)},deep:!0,immediate:!0}},created:function(){this.childrens=[],this.inputChildrens=[],this.setRules(this.rules)},methods:{setRules:function(e){this.formRules=Object.assign({},this.formRules,e),this.validator=new o.default(e)},setValue:function(e,t){var i=this.childrens.find((function(t){return t.name===e}));return i?(this.formData[e]=(0,c.getValue)(e,t,this.formRules[e]&&this.formRules[e].rules||[]),i.onFieldChange(this.formData[e])):null},validate:function(e,t){return this.checkAll(this.formData,e,t)},validateField:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1?arguments[1]:void 0;t=[].concat(t);var n={};return this.childrens.forEach((function(i){var r=(0,c.realName)(i.name);-1!==t.indexOf(r)&&(n=Object.assign({},n,(0,a.default)({},r,e.formData[r])))})),this.checkAll(n,[],i)},clearValidate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e=[].concat(e),this.childrens.forEach((function(t){if(0===e.length)t.errMsg="";else{var i=(0,c.realName)(t.name);-1!==e.indexOf(i)&&(t.errMsg="")}}))},submit:function(t,i,n){var r=this,s=function(e){var t=r.childrens.find((function(t){return t.name===e}));t&&void 0===r.formData[e]&&(r.formData[e]=r._getValue(e,r.dataValue[e]))};for(var a in this.dataValue)s(a);return n||e("warn","submit \u65b9\u6cd5\u5373\u5c06\u5e9f\u5f03\uff0c\u8bf7\u4f7f\u7528validate\u65b9\u6cd5\u4ee3\u66ff\uff01"," at uni_modules/uni-forms/components/uni-forms/uni-forms.vue:289"),this.checkAll(this.formData,t,i,"submit")},checkAll:function(e,t,i,n){var a=this;return(0,s.default)(r.default.mark((function s(){var o,u,l,d,h,f,g,p,v,m,y;return r.default.wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(a.validator){s.next=2;break}return s.abrupt("return");case 2:for(l in o=[],u=function(e){var t=a.childrens.find((function(t){return(0,c.realName)(t.name)===e}));t&&o.push(t)},e)u(l);i||"function"!==typeof t||(i=t),!i&&"function"!==typeof i&&Promise&&(d=new Promise((function(e,t){i=function(i,n){i?t(i):e(n)}}))),h=[],f=JSON.parse(JSON.stringify(e)),s.t0=r.default.keys(o);case 10:if((s.t1=s.t0()).done){s.next=23;break}return g=s.t1.value,p=o[g],v=(0,c.realName)(p.name),s.next=16,p.onFieldChange(f[v]);case 16:if(m=s.sent,!m){s.next=21;break}if(h.push(m),"toast"!==a.errShowType&&"modal"!==a.errShowType){s.next=21;break}return s.abrupt("break",23);case 21:s.next=10;break;case 23:if(Array.isArray(h)&&0===h.length&&(h=null),Array.isArray(t)&&t.forEach((function(e){var t=(0,c.realName)(e),i=(0,c.getDataValue)(e,a.localData);void 0!==i&&(f[t]=i)})),"submit"===n?a.$emit("submit",{detail:{value:f,errors:h}}):a.$emit("validate",h),{},y=(0,c.rawData)(f,a.name),i&&"function"===typeof i&&i(h,y),!d||!i){s.next=33;break}return s.abrupt("return",d);case 33:return s.abrupt("return",null);case 34:case"end":return s.stop()}}),s)})))()},validateCheck:function(e){this.$emit("validate",e)},_getValue:c.getValue,_isRequiredField:c.isRequiredField,_setDataValue:c.setDataValue,_getDataValue:c.getDataValue,_realName:c.realName,_isRealName:c.isRealName,_isEqual:c.isEqual}};t.default=l}).call(this,i("0de9")["default"])},"6f8f":function(e,t){e.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports["default"]=e.exports},7037:function(e,t){function i(t){return e.exports=i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports["default"]=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports["default"]=e.exports},"75e4":function(e,t,i){"use strict";i.r(t);var n=i("00e3"),r=i("257f");for(var s in r)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(s);var a=i("f0c5"),o=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=o.exports},"7bd1":function(e,t,i){"use strict";var n=i("4ea4"),r=n(i("9523"));i("2e3e");var s=n(i("8bbf")),a=n(i("e2b9"));function o(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}s.default.config.productionTip=!1,a.default.mpType="app";var c=new s.default(function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?o(Object(i),!0).forEach((function(t){(0,r.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},a.default));c.$mount()},"7ec2":function(e,t,i){var n=i("7037")["default"];function r(){"use strict";
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e.exports=r=function(){return t},e.exports.__esModule=!0,e.exports["default"]=e.exports;var t={},i=Object.prototype,s=i.hasOwnProperty,a=Object.defineProperty||function(e,t,i){e[t]=i.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function d(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(M){d=function(e,t,i){return e[t]=i}}function h(e,t,i,n){var r=t&&t.prototype instanceof p?t:p,s=Object.create(r.prototype),o=new x(n||[]);return a(s,"_invoke",{value:C(e,i,o)}),s}function f(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(M){return{type:"throw",arg:M}}}t.wrap=h;var g={};function p(){}function v(){}function m(){}var y={};d(y,c,(function(){return this}));var _=Object.getPrototypeOf,S=_&&_(_(P([])));S&&S!==i&&s.call(S,c)&&(y=S);var I=m.prototype=p.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){var i;a(this,"_invoke",{value:function(r,a){function o(){return new t((function(i,o){(function i(r,a,o,c){var u=f(e[r],e,a);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==n(d)&&s.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,o,c)}),(function(e){i("throw",e,o,c)})):t.resolve(d).then((function(e){l.value=e,o(l)}),(function(e){return i("throw",e,o,c)}))}c(u.arg)})(r,a,i,o)}))}return i=i?i.then(o,o):o()}})}function C(e,t,i){var n="suspendedStart";return function(r,s){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw s;return R()}for(i.method=r,i.arg=s;;){var a=i.delegate;if(a){var o=b(a,i);if(o){if(o===g)continue;return o}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var c=f(e,t,i);if("normal"===c.type){if(n=i.done?"completed":"suspendedYield",c.arg===g)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(n="completed",i.method="throw",i.arg=c.arg)}}}function b(e,t){var i=t.method,n=e.iterator[i];if(void 0===n)return t.delegate=null,"throw"===i&&e.iterator["return"]&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method)||"return"!==i&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+i+"' method")),g;var r=f(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,g;var s=r.arg;return s?s.done?(t[e.resultName]=s.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,g):s:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,n=function t(){for(;++i<e.length;)if(s.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:R}}function R(){return{value:void 0,done:!0}}return v.prototype=m,a(I,"constructor",{value:m,configurable:!0}),a(m,"constructor",{value:v,configurable:!0}),v.displayName=d(m,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,d(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},w(k.prototype),d(k.prototype,u,(function(){return this})),t.AsyncIterator=k,t.async=function(e,i,n,r,s){void 0===s&&(s=Promise);var a=new k(h(e,i,n,r),s);return t.isGeneratorFunction(i)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(I),d(I,l,"Generator"),d(I,c,(function(){return this})),d(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),i=[];for(var n in t)i.push(n);return i.reverse(),function e(){for(;i.length;){var n=i.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&s.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(i,n){return a.type="throw",a.arg=e,t.next=i,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n],a=r.completion;if("root"===r.tryLoc)return i("end");if(r.tryLoc<=this.prev){var o=s.call(r,"catchLoc"),c=s.call(r,"finallyLoc");if(o&&c){if(this.prev<r.catchLoc)return i(r.catchLoc,!0);if(this.prev<r.finallyLoc)return i(r.finallyLoc)}else if(o){if(this.prev<r.catchLoc)return i(r.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return i(r.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&s.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),T(i),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;T(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:P(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=void 0),g}},t}e.exports=r,e.exports.__esModule=!0,e.exports["default"]=e.exports},8009:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={name:"UniSection",emits:["click"],props:{type:{type:String,default:""},title:{type:String,required:!0,default:""},titleFontSize:{type:String,default:"14px"},titleColor:{type:String,default:"#333"},subTitle:{type:String,default:""},subTitleFontSize:{type:String,default:"12px"},subTitleColor:{type:String,default:"#999"},padding:{type:[Boolean,String],default:!1}},computed:{_padding:function(){return"string"===typeof this.padding?this.padding:this.padding?"10px":""}},watch:{title:function(e){uni.report&&""!==e&&uni.report("title",e)}},methods:{onClick:function(){this.$emit("click")}}};t.default=n},"824d":function(e,t,i){"use strict";var n=i("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(i("a34a")),s=n(i("7037")),a=n(i("9523")),o=n(i("c973")),c={name:"uniFormsItem",options:{virtualHost:!0},provide:function(){return{uniFormItem:this}},inject:{form:{from:"uniForm",default:null}},props:{rules:{type:Array,default:function(){return null}},name:{type:[String,Array],default:""},required:{type:Boolean,default:!1},label:{type:String,default:""},labelWidth:{type:[String,Number],default:""},labelAlign:{type:String,default:""},errorMessage:{type:[String,Boolean],default:""},leftIcon:String,iconColor:{type:String,default:"#606266"}},data:function(){return{errMsg:"",userRules:null,localLabelAlign:"left",localLabelWidth:"65px",localLabelPos:"left",border:!1,isFirstBorder:!1}},computed:{msg:function(){return this.errorMessage||this.errMsg}},watch:{"form.formRules":function(e){this.init()},"form.labelWidth":function(e){this.localLabelWidth=this._labelWidthUnit(e)},"form.labelPosition":function(e){this.localLabelPos=this._labelPosition()},"form.labelAlign":function(e){}},created:function(){var e=this;this.init(!0),this.name&&this.form&&this.$watch((function(){var t=e.form._getDataValue(e.name,e.form.localData);return t}),(function(t,i){var n=e.form._isEqual(t,i);if(!n){var r=e.itemSetValue(t);e.onFieldChange(r,!1)}}),{immediate:!1})},destroyed:function(){this.__isUnmounted||this.unInit()},methods:{setRules:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.userRules=e,this.init(!1)},setValue:function(){},onFieldChange:function(e){var t=arguments,i=this;return(0,o.default)(r.default.mark((function n(){var s,o,c,u,l,d,h,f,g,p,v,m;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(s=!(t.length>1&&void 0!==t[1])||t[1],o=i.form,c=o.formData,o.localData,u=o.errShowType,l=o.validateCheck,d=o.validateTrigger,h=o._isRequiredField,f=o._realName,g=f(i.name),e||(e=i.form.formData[g]),p=i.itemRules.rules&&i.itemRules.rules.length,i.validator&&p&&0!==p){n.next=7;break}return n.abrupt("return");case 7:if(v=h(i.itemRules.rules||[]),m=null,"bind"!==d&&!s){n.next=18;break}return n.next=12,i.validator.validateUpdate((0,a.default)({},g,e),c);case 12:m=n.sent,v||void 0!==e&&""!==e||(m=null),m&&m.errorMessage?("undertext"===u&&(i.errMsg=m?m.errorMessage:""),"toast"===u&&uni.showToast({title:m.errorMessage||"\u6821\u9a8c\u9519\u8bef",icon:"none"}),"modal"===u&&uni.showModal({title:"\u63d0\u793a",content:m.errorMessage||"\u6821\u9a8c\u9519\u8bef"})):i.errMsg="",l(m||null),n.next=19;break;case 18:i.errMsg="";case 19:return n.abrupt("return",m||null);case 20:case"end":return n.stop()}}),n)})))()},init:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.form||{},i=t.validator,n=t.formRules,r=t.childrens,a=(t.formData,t.localData),o=t._realName,c=t.labelWidth,u=t._getDataValue;t._setDataValue;if(this.localLabelAlign=this._justifyContent(),this.localLabelWidth=this._labelWidthUnit(c),this.localLabelPos=this._labelPosition(),this.form&&e&&r.push(this),i&&n){this.form.isFirstBorder||(this.form.isFirstBorder=!0,this.isFirstBorder=!0),this.group&&(this.group.isFirstBorder||(this.group.isFirstBorder=!0,this.isFirstBorder=!0)),this.border=this.form.border;var l=o(this.name),d=this.userRules||this.rules;"object"===(0,s.default)(n)&&d&&(n[l]={rules:d},i.updateSchema(n));var h=n[l]||{};this.itemRules=h,this.validator=i,this.itemSetValue(u(this.name,a))}},unInit:function(){var e=this;if(this.form){var t=this.form,i=t.childrens,n=t.formData,r=t._realName;i.forEach((function(t,i){t===e&&(e.form.childrens.splice(i,1),delete n[r(t.name)])}))}},itemSetValue:function(e){var t=this.form._realName(this.name),i=this.itemRules.rules||[],n=this.form._getValue(t,e,i);return this.form._setDataValue(t,this.form.formData,n),n},clearValidate:function(){this.errMsg=""},_isRequired:function(){return this.required},_justifyContent:function(){if(this.form){var e=this.form.labelAlign,t=this.labelAlign?this.labelAlign:e;if("left"===t)return"flex-start";if("center"===t)return"center";if("right"===t)return"flex-end"}return"flex-start"},_labelWidthUnit:function(e){return this.num2px(this.labelWidth?this.labelWidth:e||(this.label?65:"auto"))},_labelPosition:function(){return this.form&&this.form.labelPosition||"left"},isTrigger:function(e,t,i){return"submit"!==e&&e?"bind":void 0===e?"bind"!==t?t?"submit":""===i?"bind":"submit":"bind":"submit"},num2px:function(e){return"number"===typeof e?"".concat(e,"px"):e}}};t.default=c},"843b":function(e,t,i){"use strict";i.r(t);var n=i("f001"),r=i("a2e3");for(var s in r)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(s);var a=i("f0c5"),o=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=o.exports},8962:function(e,t,i){var n=i("9f70");function r(){return"undefined"!==typeof Reflect&&Reflect.get?(e.exports=r=Reflect.get.bind(),e.exports.__esModule=!0,e.exports["default"]=e.exports):(e.exports=r=function(e,t,i){var r=n(e,t);if(r){var s=Object.getOwnPropertyDescriptor(r,t);return s.get?s.get.call(arguments.length<3?e:i):s.value}},e.exports.__esModule=!0,e.exports["default"]=e.exports),r.apply(this,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports["default"]=e.exports},"8adb":function(e,t,i){"use strict";i.r(t);var n=i("4e2a"),r=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=r.a},"8ae5":function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={onLaunch:function(){e("warn","\u5f53\u524d\u7ec4\u4ef6\u4ec5\u652f\u6301 uni_modules \u76ee\u5f55\u7ed3\u6784 \uff0c\u8bf7\u5347\u7ea7 HBuilderX \u5230 3.1.0 \u7248\u672c\u4ee5\u4e0a\uff01"," at App.vue:4"),e("log","App Launch"," at App.vue:5")},onShow:function(){e("log","App Show"," at App.vue:8")},onHide:function(){e("log","App Hide"," at App.vue:11")}};t.default=i}).call(this,i("0de9")["default"])},"8bbf":function(e,t){e.exports=Vue},"8e98":function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return r})),i.d(t,"a",(function(){}));var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("view",{staticClass:e._$s(0,"sc","uni-section"),attrs:{_i:0}},[i("view",{staticClass:e._$s(1,"sc","uni-section-header"),attrs:{_i:1},on:{click:e.onClick}},[e._$s(2,"i",e.type)?i("view",{staticClass:e._$s(2,"sc","uni-section-header__decoration"),class:e._$s(2,"c",e.type),attrs:{_i:2}}):e._t("decoration",null,{_i:3}),i("view",{staticClass:e._$s(4,"sc","uni-section-header__content"),attrs:{_i:4}},[i("text",{staticClass:e._$s(5,"sc","uni-section__content-title"),class:e._$s(5,"c",{distraction:!e.subTitle}),style:e._$s(5,"s",{"font-size":e.titleFontSize,color:e.titleColor}),attrs:{_i:5}},[e._v(e._$s(5,"t0-0",e._s(e.title)))]),e._$s(6,"i",e.subTitle)?i("text",{staticClass:e._$s(6,"sc","uni-section-header__content-sub"),style:e._$s(6,"s",{"font-size":e.subTitleFontSize,color:e.subTitleColor}),attrs:{_i:6}},[e._v(e._$s(6,"t0-0",e._s(e.subTitle)))]):e._e()]),i("view",{staticClass:e._$s(7,"sc","uni-section-header__slot-right"),attrs:{_i:7}},[e._t("right",null,{_i:8})],2)],2),i("view",{staticClass:e._$s(9,"sc","uni-section-content"),style:e._$s(9,"s",{padding:e._padding}),attrs:{_i:9}},[e._t("default",null,{_i:10})],2)])},r=[]},9523:function(e,t,i){var n=i("a395");e.exports=function(e,t,i){return t=n(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},e.exports.__esModule=!0,e.exports["default"]=e.exports},"970b":function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports["default"]=e.exports},"98e8":function(e,t,i){"use strict";i.r(t);var n=i("3481"),r=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=r.a},"9b42":function(e,t){e.exports=function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,s,a,o=[],c=!0,u=!1;try{if(s=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;c=!1}else for(;!(c=(n=s.call(i)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(l){u=!0,r=l}finally{try{if(!c&&null!=i["return"]&&(a=i["return"](),Object(a)!==a))return}finally{if(u)throw r}}return o}},e.exports.__esModule=!0,e.exports["default"]=e.exports},"9edb":function(e,t,i){"use strict";i.r(t);var n=i("b829"),r=i("1852");for(var s in r)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(s);var a=i("f0c5"),o=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=o.exports},"9f70":function(e,t,i){var n=i("36c6");e.exports=function(e,t){while(!Object.prototype.hasOwnProperty.call(e,t))if(e=n(e),null===e)break;return e},e.exports.__esModule=!0,e.exports["default"]=e.exports},a128:function(e,t,i){var n=i("36c6"),r=i("4a4b"),s=i("c5f7"),a=i("b17c");function o(t){var i="function"===typeof Map?new Map:void 0;return e.exports=o=function(e){if(null===e||!s(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof i){if(i.has(e))return i.get(e);i.set(e,t)}function t(){return a(e,arguments,n(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),r(t,e)},e.exports.__esModule=!0,e.exports["default"]=e.exports,o(t)}e.exports=o,e.exports.__esModule=!0,e.exports["default"]=e.exports},a2e3:function(e,t,i){"use strict";i.r(t);var n=i("fb7b"),r=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=r.a},a34a:function(e,t,i){var n=i("7037"),r=i("7ec2")();e.exports=r;try{regeneratorRuntime=r}catch(s){"object"===("undefined"===typeof globalThis?"undefined":n(globalThis))?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},a395:function(e,t,i){var n=i("7037")["default"],r=i("e50d");e.exports=function(e){var t=r(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports["default"]=e.exports},a431:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return r})),i.d(t,"a",(function(){}));var n=function(){var e=this.$createElement,t=this._self._c||e;return t("view",{staticClass:this._$s(0,"sc","uni-forms"),attrs:{_i:0}},[t("form",[this._t("default",null,{_i:2})],2)])},r=[]},b0b9:function(e,t,i){(function(e,t){var n=i("8962"),r=i("a34a"),s=i("278c"),a=i("3c96"),o=i("a128"),c=i("7037"),u=i("ed6d"),l=i("6b58"),d=i("36c6"),h=i("970b"),f=i("5bc3");function g(e,t){var i="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"===typeof e)return p(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return p(e,t)}(e))||t&&e&&"number"===typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,o=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw s}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function v(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=d(e);if(t){var r=d(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return l(this,i)}}(function(){var i="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},l=i.ice||{};i.Ice=i.Ice||{},l.Ice=i.Ice,Ice.Slice=Ice.Slice||{},i.IceMX=i.IceMX||{},l.IceMX=i.IceMX,i.IceSSL=i.IceSSL||{},l.IceSSL=i.IceSSL;var p=Ice.Slice;(function(){var t="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},i=function(){"use strict";function e(){h(this,e)}return f(e,null,[{key:"module",value:function(e){var i=t[e];return void 0===i&&(i={},t[e]=i),i}},{key:"require",value:function(e){return t}},{key:"type",value:function(e){if(void 0!==e){for(var i=e.split("."),n=t,r=0,s=i.length;r<s;++r)if(n=n[i[r]],void 0===n)return;return n}}}]),e}();Ice._require=function(){return t},Ice.Slice=Ice.Slice||{},Ice._ModuleRegistry=i})(),function(){var e=Ice._ModuleRegistry,t=Ice.Slice,i=function e(t,i){return t===i||null!==t&&void 0!==t&&null!==i&&void 0!==i&&(t.prototype===i.prototype&&("function"==typeof t.equals?t.equals(i):(t instanceof Array||t instanceof Uint8Array)&&n.equals(t,i,e)))},n=function(){"use strict";function e(){h(this,e)}return f(e,null,[{key:"clone",value:function(e){return void 0===e?e:null===e?[]:e.slice()}},{key:"equals",value:function(e,t,n){if(e.length!=t.length)return!1;for(var r=n||i,s=0;s<e.length;++s)if(!r.call(r,e[s],t[s]))return!1;return!0}},{key:"shuffle",value:function(e){for(var t=e.length;t>1;--t){var i=e[t-1],n=Math.floor(Math.random()*t);e[t-1]=e[n],e[n]=i}}}]),e}();n.eq=i,t.defineSequence=function(t,i,n,r,s){var a=null;Object.defineProperty(t,i,{get:function(){return null===a&&(a=Ice.StreamHelpers.generateSeqHelper(e.type(n),r,e.type(s))),a}})},Ice.ArrayUtil=n}(),function(){var e=function(){"use strict";function e(t,i){h(this,e),this._name=t,this._value=i}return f(e,[{key:"equals",value:function(e){return this===e||e instanceof Object.getPrototypeOf(this).constructor&&this._value==e._value}},{key:"hashCode",value:function(){return this._value}},{key:"toString",value:function(){return this._name}},{key:"name",get:function(){return this._name}},{key:"value",get:function(){return this._value}}]),e}();Ice.EnumBase=e;var t=function(){"use strict";function e(t){h(this,e),this._enumType=t}return f(e,[{key:"write",value:function(e,t){this._enumType._write(e,t)}},{key:"writeOptional",value:function(e,t,i){this._enumType._writeOpt(e,t,i)}},{key:"read",value:function(e){return this._enumType._read(e)}},{key:"readOptional",value:function(e,t){return this._enumType._readOpt(e,t)}}]),e}();Ice.EnumHelper=t;var i=Ice.Slice;i.defineEnum=function(i){var n=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(e),r=[],s=0,a=null;for(var o in i){var c=i[o][0],l=i[o][1],d=new n(c,l);r[l]=d,a||(a=d),Object.defineProperty(n,c,{enumerable:!0,value:d}),l>s&&(s=l)}return Object.defineProperty(n,"minWireSize",{get:function(){return 1}}),n._write=function(e,t){t?e.writeEnum(t):e.writeEnum(a)},n._read=function(e){return e.readEnum(n)},n._writeOpt=function(e,t,i){void 0!==i&&e.writeOptional(t,Ice.OptionalFormat.Size)&&n._write(e,i)},n._readOpt=function(e,t){return e.readOptionalEnum(t,n)},n._helper=new t(n),Object.defineProperty(n,"valueOf",{value:function(e){return void 0===e?n:r[e]}}),Object.defineProperty(n,"maxValue",{value:s}),Object.defineProperty(n.prototype,"maxValue",{value:s}),n}}(),function(){var e=function(){"use strict";function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(h(this,e),!Number.isSafeInteger(t))throw new RangeError(void 0===i?"Number must be a safe integer":"High word must be a safe integer");if(void 0===i)this.low=t>>>0,this.high=(t-this.low)/e.HIGH_MASK>>>0;else{if(!Number.isSafeInteger(i))throw new RangeError("Low word must be a safe integer");if(i<0||i>e.MAX_UINT32)throw new RangeError("Low word must be between 0 and 0xFFFFFFFF");if(t<0||t>e.MAX_UINT32)throw new RangeError("High word must be between 0 and 0xFFFFFFFF");this.high=t,this.low=i}}return f(e,[{key:"hashCode",value:function(){return this.low}},{key:"equals",value:function(t){return this===t||t instanceof e&&(this.high===t.high&&this.low===t.low)}},{key:"toString",value:function(){return this.high+":"+this.low}},{key:"toNumber",value:function(){if(0!==(this.high&e.SIGN_MASK)){var t=~this.low>>>0,i=~this.high>>>0;return i>e.HIGH_MAX||i==e.HIGH_MAX&&t==e.MAX_UINT32?Number.NEGATIVE_INFINITY:-(i*e.HIGH_MASK+t+1)}return this.high>e.HIGH_MAX?Number.POSITIVE_INFINITY:this.high*e.HIGH_MASK+this.low}}]),e}();e.MAX_UINT32=4294967295,e.SIGN_MASK=2147483648,e.HIGH_MASK=4294967296,e.HIGH_MAX=2097151,Ice.Long=e}(),function(){Ice.AsyncStatus={Queued:0,Sent:1}}(),function(){var e=Ice.Long,t=function(){"use strict";function t(e){h(this,t),void 0!==e?(this.b=e,this.v=new DataView(this.b),this._limit=this.b.byteLength):(this.b=null,this.v=null,this._limit=0),this._position=0,this._shrinkCounter=0}return f(t,[{key:"empty",value:function(){return 0===this._limit}},{key:"resize",value:function(e){0===e?this.clear():e>this.capacity&&this.reserve(e),this._limit=e}},{key:"clear",value:function(){this.b=null,this.v=null,this._position=0,this._limit=0}},{key:"expand",value:function(e){var t=0===this.capacity?e:this._position+e;t>this._limit&&this.resize(t)}},{key:"reset",value:function(){this._limit>0&&2*this._limit<this.capacity?++this._shrinkCounter>2&&(this.reserve(this._limit),this._shrinkCounter=0):this._shrinkCounter=0,this._limit=this.capacity(),this._position=0}},{key:"reserve",value:function(e){if(e>this.capacity){var t=Math.max(1024,Math.max(e,2*this.capacity));if(this.b){var i=new Uint8Array(t);i.set(new Uint8Array(this.b)),this.b=i.buffer}else this.b=new ArrayBuffer(t);this.v=new DataView(this.b)}else e<this.capacity&&(this.b=this.b.slice(0,e),this.v=new DataView(this.b))}},{key:"put",value:function(e){if(this._position===this._limit)throw new RangeError("BufferOverflowException");this.v.setUint8(this._position,e),this._position++}},{key:"putAt",value:function(e,t){if(e>=this._limit)throw new RangeError("IndexOutOfBoundsException");this.v.setUint8(e,t)}},{key:"putArray",value:function(e){if(!(e instanceof Uint8Array))throw new TypeError("argument is not a Uint8Array");if(e.byteLength>0){if(this._position+e.length>this._limit)throw new RangeError("BufferOverflowException");new Uint8Array(this.b,0,this.b.byteLength).set(e,this._position),this._position+=e.byteLength}}},{key:"putShort",value:function(e){if(this._position+2>this._limit)throw new RangeError("BufferOverflowException");this.v.setInt16(this._position,e,!0),this._position+=2}},{key:"putInt",value:function(e){if(this._position+4>this._limit)throw new RangeError("BufferOverflowException");this.v.setInt32(this._position,e,!0),this._position+=4}},{key:"putIntAt",value:function(e,t){if(e+4>this._limit||e<0)throw new RangeError("IndexOutOfBoundsException");this.v.setInt32(e,t,!0)}},{key:"putFloat",value:function(e){if(this._position+4>this._limit)throw new RangeError("BufferOverflowException");this.v.setFloat32(this._position,e,!0),this._position+=4}},{key:"putDouble",value:function(e){if(this._position+8>this._limit)throw new RangeError("BufferOverflowException");this.v.setFloat64(this._position,e,!0),this._position+=8}},{key:"putLong",value:function(e){if(this._position+8>this._limit)throw new RangeError("BufferOverflowException");this.v.setInt32(this._position,e.low,!0),this._position+=4,this.v.setInt32(this._position,e.high,!0),this._position+=4}},{key:"writeString",value:function(e,t){var i=unescape(encodeURIComponent(t));e.writeSize(i.length),e.expand(i.length),this.putString(i,i.length)}},{key:"putString",value:function(e,t){if(this._position+t>this._limit)throw new RangeError("BufferOverflowException");for(var i=0;i<t;++i)this.v.setUint8(this._position,e.charCodeAt(i)),this._position++}},{key:"get",value:function(){if(this._position>=this._limit)throw new RangeError("BufferUnderflowException");var e=this.v.getUint8(this._position);return this._position++,e}},{key:"getAt",value:function(e){if(e<0||e>=this._limit)throw new RangeError("IndexOutOfBoundsException");return this.v.getUint8(e)}},{key:"getArray",value:function(e){if(this._position+e>this._limit)throw new RangeError("BufferUnderflowException");var t=this.b.slice(this._position,this._position+e);return this._position+=e,new Uint8Array(t)}},{key:"getArrayAt",value:function(e,t){if(e+t>this._limit)throw new RangeError("BufferUnderflowException");return new Uint8Array(this.b.slice(e,e+t===void 0?this.b.byteLength-e:t))}},{key:"getShort",value:function(){if(this._limit-this._position<2)throw new RangeError("BufferUnderflowException");var e=this.v.getInt16(this._position,!0);return this._position+=2,e}},{key:"getInt",value:function(){if(this._limit-this._position<4)throw new RangeError("BufferUnderflowException");var e=this.v.getInt32(this._position,!0);return this._position+=4,e}},{key:"getFloat",value:function(){if(this._limit-this._position<4)throw new RangeError("BufferUnderflowException");var e=this.v.getFloat32(this._position,!0);return this._position+=4,e}},{key:"getDouble",value:function(){if(this._limit-this._position<8)throw new RangeError("BufferUnderflowException");var e=this.v.getFloat64(this._position,!0);return this._position+=8,e}},{key:"getLong",value:function(){if(this._limit-this._position<8)throw new RangeError("BufferUnderflowException");var t=this.v.getUint32(this._position,!0);this._position+=4;var i=this.v.getUint32(this._position,!0);return this._position+=4,new e(i,t)}},{key:"getString",value:function(e){if(this._position+e>this._limit)throw new RangeError("BufferUnderflowException");for(var t=new DataView(this.b,this._position,e),i="",n=0;n<e;++n)i+=String.fromCharCode(t.getUint8(n));return this._position+=e,decodeURIComponent(escape(i))}},{key:"position",get:function(){return this._position},set:function(e){e>=0&&e<=this._limit&&(this._position=e)}},{key:"limit",get:function(){return this._limit},set:function(e){e<=this.capacity&&(this._limit=e,this._position>e&&(this._position=e))}},{key:"capacity",get:function(){return null===this.b?0:this.b.byteLength}},{key:"remaining",get:function(){return this._limit-this._position}}]),t}();Ice.Buffer=t}(),function(){Ice.CompactIdRegistry=new Map}(),function(){var e=function(t,i,n,r){if(r+=" ",null===i)return"\n"+r+t+": (null)";if(void 0===i)return"\n"+r+t+": (undefined)";if("stack"==t||"function"==typeof i)return"";if("object"!=c(i))return"\n"+r+t+': "'+i+'"';if(-1!=n.indexOf(i))return"\n"+r+t+": (recursive)";n.push(i);var s="\n"+r+t+":";for(var a in i)0!==t.indexOf("_")&&"function"!=typeof i[a]&&(s+=r+e(a,i[a],n,r));return s},t=function(t){"use strict";u(n,t);var i=v(n);function n(e){var t;return h(this,n),t=i.call(this),e&&(t.ice_cause=e),t}return f(n,[{key:"ice_name",value:function(){return this.constructor._id.substr(2)}},{key:"ice_id",value:function(){return this.constructor._id}},{key:"toString",value:function(){if(this._inToStringAlready)return"";this._inToStringAlready=!0;var t=this.ice_id();for(var i in this)"_inToStringAlready"!=i&&(t+=e(i,this[i],[],""));return!0===Ice._printStackTraces&&this.stack&&(t+="\n"+this.stack),this._inToStringAlready=!1,t}}],[{key:"_id",get:function(){return"::Ice::Exception"}},{key:"captureStackTrace",value:function(e){var t=(new Error).stack;void 0!==t&&Object.defineProperty(e,"stack",{get:function(){return t}})}}]),n}(o(Error));Ice.Exception=t;var i=function(e){"use strict";u(n,e);var i=v(n);function n(e){var r;return h(this,n),r=i.call(this,e),t.captureStackTrace(a(r)),r}return f(n,null,[{key:"_id",get:function(){return"::Ice::LocalException"}}]),n}(t);Ice.LocalException=i;var n=function(e){"use strict";u(n,e);var i=v(n);function n(e){var r;return h(this,n),r=i.call(this,e),t.captureStackTrace(a(r)),r}return f(n,[{key:"ice_getSlicedData",value:function(){return null}},{key:"_write",value:function(e){e.startException(null),r(this,e,this._mostDerivedType()),e.endException()}},{key:"_read",value:function(e){e.startException(),s(this,e,this._mostDerivedType()),e.endException(!1)}},{key:"_usesClasses",value:function(){return!1}},{key:"_mostDerivedType",value:function(){return Ice.UserException}}],[{key:"_id",get:function(){return"::Ice::UserException"}}]),n}(t);Ice.UserException=n;var r=function e(t,i,r){void 0!==r&&r!==n&&(i.startSlice(r._id,-1,r._parent===n),r.prototype.hasOwnProperty("_writeMemberImpl")&&r.prototype._writeMemberImpl.call(t,i),i.endSlice(),e(t,i,r._parent))},s=function e(t,i,r){void 0!==r&&r!==n&&(i.startSlice(),r.prototype.hasOwnProperty("_readMemberImpl")&&r.prototype._readMemberImpl.call(t,i),i.endSlice(),e(t,i,r._parent))},l=function(e){e.startException(this._slicedData),r(this,e,this._mostDerivedType()),e.endException()},d=function(e){e.startException(),s(this,e,this._mostDerivedType()),this._slicedData=e.endException(!0)},g=function(){return this._slicedData};Ice.Slice.PreservedUserException=function(e){e.prototype.ice_getSlicedData=g,e.prototype._write=l,e.prototype._read=d}}(),function(){Ice.FormatType=Ice.Slice.defineEnum([["DefaultFormat",0],["CompactFormat",1],["SlicedFormat",2]])}(),function(){var e=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n;return h(this,i),n=t.call(this),Ice.Exception.captureStackTrace(a(n)),n.message=e,n}return f(i)}(o(Error));Ice.AssertionFailedException=e;var i=function(){"use strict";function e(){h(this,e)}return f(e,null,[{key:"assert",value:function(e,i){if(!e)throw t("log",void 0===i?"assertion failed":i," at util/thirdlib/Ice.js:1238"),t("log",Error().stack," at util/thirdlib/Ice.js:1239"),new Ice.AssertionFailedException(void 0===i?"assertion failed":i)}}]),e}();Ice.Debug=i}(),function(){var e=Ice.Debug;function t(t,i,n,r){switch(t){case 92:i.push("\\\\");break;case 39:i.push("\\'");break;case 34:i.push('\\"');break;case 7:r==Ice.ToStringMode.Compat?i.push("\\007"):i.push("\\a");break;case 8:i.push("\\b");break;case 12:i.push("\\f");break;case 10:i.push("\\n");break;case 13:i.push("\\r");break;case 9:i.push("\\t");break;case 11:r==Ice.ToStringMode.Compat?i.push("\\013"):i.push("\\v");break;default:var s=String.fromCharCode(t);if(null!==n&&-1!==n.indexOf(s))i.push("\\"),i.push(s);else if(t<32||t>126)if(r===Ice.ToStringMode.Compat){e.assert(t<256),i.push("\\");for(var a=t.toString(8),o=a.length;o<3;o++)i.push("0");i.push(a)}else if(t<32||127==t||r===Ice.ToStringMode.ASCII){i.push("\\u");for(var c=t.toString(16),u=c.length;u<4;u++)i.push("0");i.push(c)}else i.push(s);else i.push(s);break}}function i(e,t){var i,n=e.charCodeAt(t);if(n<32||127===n)throw i=t>0?"character after `"+e.substring(0,t)+"'":"first character",i+=" has invalid ordinal value"+n,new RangeError(i);return e.charAt(t)}function n(t,n,r,s,a){if(e.assert(n>=0),e.assert(n<r),e.assert(r<=t.length),"\\"!=t.charAt(n))a.push(i(t,n++));else if(n+1===r)++n,a.push("\\");else{var o=t.charAt(++n);switch(o){case"\\":case"'":case'"':case"?":++n,a.push(o);break;case"a":++n,a.append("\x07");break;case"b":++n,a.push("\b");break;case"f":++n,a.push("\f");break;case"n":++n,a.push("\n");break;case"r":++n,a.push("\r");break;case"t":++n,a.push("\t");break;case"v":++n,a.push("\v");break;case"u":case"U":var c=0,u="u"===o,l=u?4:8;++n;while(l>0&&n<r){var d=t.charCodeAt(n++);if(d>=48&&d<=57)d-=48;else if(d>=97&&d<=102)d+=-87;else{if(!(d>=65&&d<=70))break;d+=-55}c=16*c+d,--l}if(l>0)throw new RangeError("Invalid universal character name: too few hex digits");if(c>=55296&&c<=57343)throw new RangeError("A universal character name cannot designate a surrogate");u||c<=65535?a.push(String.fromCharCode(c)):a.push(String.fromCodePoint(c));break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"x":var h=[],f=!0;while(f){var g=0;if("x"===o){var p=2;++n;while(p>0&&n<r){var v=t.charCodeAt(n++);if(v>=48&&v<=57)v-=48;else if(v>=97&&v<=102)v+=-87;else{if(!(v>=65&&v<=70))break;v+=-55}g=16*g+v,--p}if(2===p)throw new RangeError("Invalid \\x escape sequence: no hex digit")}else{for(var m=0;m<3&&n<r;++m){var y=t.charCodeAt(n++)-"0".charCodeAt(0);if(y<0||y>7){--n,e.assert(0!==m);break}g=8*g+y}if(g>255)throw new RangeError("octal value \\"+g.toString(8)+" ("+g+") is out of range")}if(h.push(String.fromCharCode(g)),f=!1,n+1<r&&"\\"===t.charAt(n)){o=t.charAt(n+1);var _=t.charCodeAt(n+1);("x"===o||_>=48&&_<=57)&&(n++,f=!0)}}a.push(decodeURIComponent(escape(h.join(""))));break;default:null!==s&&0!==s.length&&-1!==s.indexOf(o)||a.push("\\"),a.push(i(t,n++));break}}return n}Ice.StringUtil=function(){"use strict";function r(){h(this,r)}return f(r,null,[{key:"findFirstOf",value:function(e,t,i){i=void 0===i?0:i;for(var n=i;n<e.length;n++){var r=e.charAt(n);if(-1!=t.indexOf(r))return n}return-1}},{key:"findFirstNotOf",value:function(e,t,i){i=void 0===i?0:i;for(var n=i;n<e.length;n++){var r=e.charAt(n);if(-1==t.indexOf(r))return n}return-1}},{key:"escapeString",value:function(i,n,r){if(n=void 0===n?null:n,null!==n)for(var s=0;s<n.length;++s)if(n.charCodeAt(s)<32||n.charCodeAt(s)>126)throw new RangeError("special characters must be in ASCII range 32-126");var a=[];if(r===Ice.ToStringMode.Compat)for(var o=unescape(encodeURIComponent(i)),c=0;c<o.length;++c){var u=o.charCodeAt(c);t(u,a,n,r)}else for(var l=0;l<i.length;++l){var d=i.charCodeAt(l);if(r===Ice.ToStringMode.Unicode||d<55296||d>57343)t(d,a,n,r);else{if(e.assert(r===Ice.ToStringMode.ASCII&&d>=55296&&d<=57343),l+1===i.length)throw new RangeError("High surrogate without low surrogate");var h=i.codePointAt(l);e.assert(h>65535),l++,a.push("\\U");for(var f=h.toString(16),g=f.length;g<8;g++)a.push("0");a.push(f)}}return a.join("")}},{key:"unescapeString",value:function(t,r,s,a){if(r=void 0===r?0:r,s=void 0===s?t.length:s,a=void 0===a?null:a,e.assert(r>=0&&r<=s&&s<=t.length),null!==a)for(var o=0;o<a.length;++o)if(a.charCodeAt(o)<32||a.charCodeAt(o)>126)throw new RangeError("special characters must be in ASCII range 32-126");var c=t.indexOf("\\",r);if(-1==c||c>=s){c=r;while(c<s)i(t,c++);return t.substring(r,s)}var u=[];while(r<s)r=n(t,r,s,a,u);return u.join("")}},{key:"splitString",value:function(e,t){var i=[],n="",r=0,s=null;while(r<e.length)if(null!==s||'"'!==e.charAt(r)&&"'"!==e.charAt(r)){if(null===s&&"\\"===e.charAt(r)&&r+1<e.length&&('"'===e.charAt(r+1)||"'"===e.charAt(r+1)))++r;else if(null!==s&&"\\"===e.charAt(r)&&r+1<e.length&&e.charAt(r+1)===s)++r;else{if(null!==s&&e.charAt(r)===s){++r,s=null;continue}if(-1!==t.indexOf(e.charAt(r))&&null===s){++r,n.length>0&&(i.push(n),n="");continue}}r<e.length&&(n+=e.charAt(r++))}else s=e.charAt(r++);return n.length>0&&i.push(n),null!==s?null:i}},{key:"checkQuote",value:function(e,t){t=void 0===t?0:t;var i=e.charAt(t);if('"'==i||"'"==i){var n;t++;while(t<e.length&&-1!=(n=e.indexOf(i,t))){if("\\"!=e.charAt(n-1))return n;t=n+1}return-1}return 0}},{key:"hashCode",value:function(e){for(var t=0,i=0;i<e.length;i++)t=31*t+e.charCodeAt(i);return t}},{key:"toInt",value:function(e){var t=parseInt(e,10);if(isNaN(t))throw new RangeError("conversion of `"+e+"' to int failed");return t}}]),r}()}(),function(){Ice.ReferenceMode={ModeTwoway:0,ModeOneway:1,ModeBatchOneway:2,ModeDatagram:3,ModeBatchDatagram:4,ModeLast:4}}(),function(){Ice.OptionalFormat=Ice.Slice.defineEnum([["F1",0],["F2",1],["F4",2],["F8",3],["Size",4],["VSize",5],["FSize",6],["Class",7]])}(),function(){var e=Object.defineProperty,t=Ice.OptionalFormat,i={FSizeOptHelper:function(){this.writeOptional=function(e,i,n){if(void 0!==n&&e.writeOptional(i,t.FSize)){var r=e.startSize();this.write(e,n),e.endSize(r)}},this.readOptional=function(e,i){var n;return e.readOptional(i,t.FSize)&&(e.skip(4),n=this.read(e)),n}},VSizeOptHelper:function(){this.writeOptional=function(e,i,n){void 0!==n&&e.writeOptional(i,t.VSize)&&(e.writeSize(this.minWireSize),this.write(e,n))},this.readOptional=function(e,i){var n;return e.readOptional(i,t.VSize)&&(e.skipSize(),n=this.read(e)),n}},VSizeContainerOptHelper:function(e){this.writeOptional=function(i,n,r){if(void 0!==r&&i.writeOptional(n,t.VSize)){var s=this.size(r);i.writeSize(s>254?s*e+5:s*e+1),this.write(i,r)}},this.readOptional=function(e,i){var n;return e.readOptional(i,t.VSize)&&(e.skipSize(),n=this.read(e)),n}},VSizeContainer1OptHelper:function(){this.writeOptional=function(e,i,n){void 0!==n&&e.writeOptional(i,t.VSize)&&this.write(e,n)},this.readOptional=function(e,i){var n;return e.readOptional(i,t.VSize)&&(n=this.read(e)),n}}},n=function(){"use strict";function e(){h(this,e)}return f(e,[{key:"write",value:function(e,t){if(null===t||0===t.length)e.writeSize(0);else{var i=this.elementHelper;e.writeSize(t.length);for(var n=0;n<t.length;++n)i.write(e,t[n])}}},{key:"read",value:function(e){var t=this.elementHelper,i=e.readAndCheckSeqSize(t.minWireSize),n=[];n.length=i;for(var r=0;r<i;++r)n[r]=t.read(e);return n}},{key:"size",value:function(e){return null===e||void 0===e?0:e.length}},{key:"minWireSize",get:function(){return 1}}]),e}(),r=new n;r.write=function(e,t){return e.writeByteSeq(t)},r.read=function(e){return e.readByteSeq()},e(r,"elementHelper",{get:function(){return Ice.ByteHelper}}),i.VSizeContainer1OptHelper.call(r);var a=function(e){var t=e.readAndCheckSeqSize(1),i=[];i.length=t;for(var n=this.elementType,r=function(t){e.readValue((function(e){i[t]=e}),n)},s=0;s<t;++s)r(s);return i};i.generateSeqHelper=function(t,s,o){if(t===Ice.ByteHelper)return r;var c=new n;return s?1===t.minWireSize?i.VSizeContainer1OptHelper.call(c):i.VSizeContainerOptHelper.call(c,t.minWireSize):i.FSizeOptHelper.call(c),e(c,"elementHelper",{get:function(){return t}}),t==Ice.ObjectHelper&&(e(c,"elementType",{get:function(){return o}}),c.read=a),c};var o=function(){"use strict";function e(){h(this,e)}return f(e,[{key:"write",value:function(e,t){if(null===t||0===t.size)e.writeSize(0);else{var i=this.keyHelper,n=this.valueHelper;e.writeSize(t.size);var r,a=g(t);try{for(a.s();!(r=a.n()).done;){var o=s(r.value,2),c=o[0],u=o[1];i.write(e,c),n.write(e,u)}}catch(l){a.e(l)}finally{a.f()}}}},{key:"read",value:function(e){for(var t=this.mapType,i=new t,n=e.readSize(),r=this.keyHelper,s=this.valueHelper,a=0;a<n;++a)i.set(r.read(e),s.read(e));return i}},{key:"size",value:function(e){return null===e||void 0===e?0:e.size}},{key:"minWireSize",get:function(){return 1}}]),e}(),c=function(e){for(var t=e.readSize(),i=this.mapType,n=new i,r=this.valueType,s=function(t){e.readValue((function(e){return n.set(t,e)}),r)},a=this.keyHelper,o=0;o<t;++o)s(a.read(e));return n};i.generateDictHelper=function(t,n,r,s,a){var u=new o;return r?i.VSizeContainerOptHelper.call(u,t.minWireSize+n.minWireSize):i.FSizeOptHelper.call(u),e(u,"mapType",{get:function(){return a}}),e(u,"keyHelper",{get:function(){return t}}),e(u,"valueHelper",{get:function(){return n}}),n==Ice.ObjectHelper&&(e(u,"valueType",{get:function(){return s}}),u.read=c),u},Ice.StreamHelpers=i}(),function(){var e=Ice.ReferenceMode,t=function(){"use strict";function t(i,n){h(this,t),this._reference=i,this._response=i.getMode()==e.ModeTwoway,this._connection=n}return f(t,[{key:"update",value:function(e,t){try{if(e===this)return t;if(e.getConnection()===this._connection)return t}catch(i){}return this}},{key:"sendAsyncRequest",value:function(e){return e.invokeRemote(this._connection,this._response)}},{key:"asyncRequestCanceled",value:function(e){return this._connection.asyncRequestCanceled(e)}},{key:"getReference",value:function(){return this._reference}},{key:"getConnection",value:function(){return this._connection}}]),t}();Ice.ConnectionRequestHandler=t}(),function(){Ice.Object=function(){"use strict";function e(){h(this,e)}return f(e,[{key:"ice_isA",value:function(e,t){return this._iceMostDerivedType()._iceIds.indexOf(e)>=0}},{key:"ice_ping",value:function(e){}},{key:"ice_ids",value:function(e){return this._iceMostDerivedType()._iceIds}},{key:"ice_id",value:function(e){return this._iceMostDerivedType()._iceId}},{key:"toString",value:function(){return"[object "+this.ice_id()+"]"}},{key:"_iceMostDerivedType",value:function(){return Ice.Object}},{key:"equals",value:function(e){return this===e}}],[{key:"_iceImplements",get:function(){return[]}}]),e}()}(),function(){Ice.generateUUID=function(){var e=(new Date).getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?i:3&i|8).toString(16)}));return t}}(),function(){var e=Ice.StringUtil,t=function(){"use strict";function t(){h(this,t)}return f(t,null,[{key:"addBoolean",value:function(e,t){return(e<<5)+e^(t?0:1)}},{key:"addString",value:function(t,i){return void 0!==i&&null!==i&&(t=(t<<5)+t^e.hashCode(i)),t}},{key:"addNumber",value:function(e,t){return(e<<5)+e^t}},{key:"addHashable",value:function(e,t){return void 0!==t&&null!==t&&(e=(e<<5)+e^t.hashCode()),e}},{key:"addArray",value:function(e,t,i){if(void 0!==t&&null!==t)for(var n=0;n<t.length;++n)e=i(e,t[n]);return e}}]),t}();Ice.HashUtil=t}(),function(){var e=Ice._ModuleRegistry,t=Ice.StringUtil;function i(e,t,i,n,r){for(var s=e._table[r];null!==s;s=s._nextInBucket)if(s._hash===n&&e.keysEqual(t,s._key))return void(s._value=i);e.add(t,i,n,r)}function n(e,t){return e===t}var s=function(){"use strict";function e(t,i){var r,s,a;if(h(this,e),"function"==typeof t?(s=t,a=i):t instanceof e&&(r=t,s=r.keyComparator,a=r.valueComparator),this._size=0,this._head=null,this._initialCapacity=32,this._loadFactor=.75,this._table=[],this._keyComparator="function"==typeof s?s:n,this._valueComparator="function"==typeof a?a:n,r instanceof e&&r._size>0){this._threshold=r._threshold,this._table.length=r._table.length;for(var o=0;o<r._table.length;o++)this._table[o]=null;this.merge(r)}else{this._threshold=this._initialCapacity*this._loadFactor;for(var c=0;c<this._initialCapacity;c++)this._table[c]=null}}return f(e,[{key:"set",value:function(e,t){var n=this.computeHash(e),r=this.hashIndex(n.hash,this._table.length);return i(this,n.key,t,n.hash,r)}},{key:"get",value:function(e){var t=this.computeHash(e),i=this.findEntry(t.key,t.hash);return void 0!==i?i._value:void 0}},{key:"has",value:function(e){var t=this.computeHash(e);return void 0!==this.findEntry(t.key,t.hash)}},{key:"delete",value:function(e){for(var t=this.computeHash(e),i=this.hashIndex(t.hash,this._table.length),n=null,r=this._table[i];null!==r;r=r._nextInBucket){if(r._hash===t.hash&&this.keysEqual(t.key,r._key))return this._size--,null!==n?n._nextInBucket=r._nextInBucket:this._table[i]=r._nextInBucket,null!==r._prev&&(r._prev._next=r._next),null!==r._next&&(r._next._prev=r._prev),this._head===r&&(this._head=r._next),r._value;n=r}}},{key:"clear",value:function(){for(var e=0;e<this._table.length;++e)this._table[e]=null;this._head=null,this._size=0}},{key:"forEach",value:function(e,t){t=void 0===t?e:t;for(var i=this._head;null!==i;i=i._next)e.call(t,i._value,i._key)}},{key:"entries",value:r.mark((function e(){var t;return r.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=this._head;case 1:if(null===t){e.next=7;break}return e.next=4,[t._key,t._value];case 4:t=t._next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))},{key:"keys",value:r.mark((function e(){var t;return r.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=this._head;case 1:if(null===t){e.next=7;break}return e.next=4,t._key;case 4:t=t._next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))},{key:"values",value:r.mark((function e(){var t;return r.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=this._head;case 1:if(null===t){e.next=7;break}return e.next=4,t._value;case 4:t=t._next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))},{key:"equals",value:function(t,i){var n,r=this;if(null===t||!(t instanceof e)||this._size!==t._size)return!1;n=i||function(e,t){return r._valueComparator.call(r._valueComparator,e,t)};for(var s=this._head;null!==s;s=s._next){var a=t.findEntry(s._key,s._hash);if(void 0===a||!n(s._value,a._value))return!1}return!0}},{key:"merge",value:function(e){for(var t=e._head;null!==t;t=t._next)i(this,t._key,t._value,t._hash,this.hashIndex(t._hash,this._table.length))}},{key:"add",value:function(e,t,i,n){var r=Object.create(null,{key:{enumerable:!0,get:function(){return this._key}},value:{enumerable:!0,get:function(){return this._value}},next:{enumerable:!0,get:function(){return this._next}},_key:{enumerable:!1,writable:!0,value:e},_value:{enumerable:!1,writable:!0,value:t},_prev:{enumerable:!1,writable:!0,value:null},_next:{enumerable:!1,writable:!0,value:null},_nextInBucket:{enumerable:!1,writable:!0,value:null},_hash:{enumerable:!1,writable:!0,value:i}});r._nextInBucket=this._table[n],this._table[n]=r,r._next=this._head,null!==this._head&&(this._head._prev=r),this._head=r,this._size++,this._size>=this._threshold&&this.resize(2*this._table.length)}},{key:"resize",value:function(e){for(var t=new Array(e).fill(null),i=this._head;null!==i;i=i._next){var n=this.hashIndex(i._hash,e);i._nextInBucket=t[n],t[n]=i}this._table=t,this._threshold=e*this._loadFactor}},{key:"findEntry",value:function(e,t){for(var i=this.hashIndex(t,this._table.length),n=this._table[i];null!==n;n=n._nextInBucket)if(n._hash===t&&this.keysEqual(e,n._key))return n}},{key:"hashIndex",value:function(e,t){return e&t-1}},{key:"computeHash",value:function(i){if(0===i)return{key:0,hash:0};if(null===i){if(null===e._null){var n=Ice.generateUUID();e._null={key:n,hash:t.hashCode(n)}}return e._null}if(void 0===i)throw new RangeError("cannot compute hash for undefined value");if("function"===typeof i.hashCode)return{key:i,hash:i.hashCode()};var r=c(i);if("string"===r||i instanceof String)return{key:i,hash:t.hashCode(i)};if("number"===r||i instanceof Number){if(isNaN(i)){if(null===e._nan){var s=Ice.generateUUID();e._nan={key:s,hash:t.hashCode(s)}}return e._nan}return{key:i,hash:i.toFixed(0)}}if("boolean"===r||i instanceof Boolean)return{key:i,hash:i?1:0};throw new RangeError("cannot compute hash for value of type "+r)}},{key:"keysEqual",value:function(e,t){return this._keyComparator.call(this._keyComparator,e,t)}},{key:"size",get:function(){return this._size}}]),e}();s.prototype[Symbol.iterator]=s.prototype.entries,Ice.HashMap=s,s.compareEquals=function(e,t){return e===t||void 0!==e&&null!==e&&void 0!==t&&null!==t&&e.equals(t)},s.compareIdentity=n,s._null=null,s._nan=null;var a=Ice.Slice;a.defineDictionary=function(t,i,n,r,a,o,c,u){t[i]=void 0===c?Map:function(e){return new s(e||c)};var l=null;Object.defineProperty(t,n,{get:function(){return null===l&&(l=Ice.StreamHelpers.generateDictHelper(e.type(r),e.type(a),o,e.type(u),t[i])),l}})}}(),function(){Ice.Value=function(){"use strict";function i(){h(this,i)}return f(i,[{key:"ice_preMarshal",value:function(){}},{key:"ice_postUnmarshal",value:function(){}},{key:"ice_getSlicedData",value:function(){return null}},{key:"_iceWrite",value:function(t){t.startValue(null),e(this,t,this._iceMostDerivedType()),t.endValue()}},{key:"_iceRead",value:function(e){e.startValue(),t(this,e,this._iceMostDerivedType()),e.endValue(!1)}}],[{key:"write",value:function(e,t){e.writeValue(t)}},{key:"writeOptional",value:function(e,t,i){e.writeOptionalValue(t,i)}},{key:"read",value:function(e){var t={value:null};return e.readValue((function(e){t.value=e}),this),t}},{key:"readOptional",value:function(e,t){var i={value:void 0};return e.readOptionalValue(t,(function(e){i.value=e}),this),i}}]),i}(),Ice.InterfaceByValue=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n;return h(this,i),n=t.call(this),n._id=e,n}return f(i,[{key:"ice_id",value:function(){return this._id}},{key:"_iceWrite",value:function(e){e.startValue(null),e.startSlice(this.ice_id(),-1,!0),e.endSlice(),e.endValue()}},{key:"_iceRead",value:function(e){e.startValue(),e.startSlice(),e.endSlice(),e.endValue(!1)}}]),i}(Ice.Value);var e=function e(t,i,n){void 0!==n&&n!==Ice.Value&&(i.startSlice(n.ice_staticId(),Object.prototype.hasOwnProperty.call(n,"_iceCompactId")?n._iceCompactId:-1,Object.getPrototypeOf(n)===Ice.Value),n.prototype.hasOwnProperty("_iceWriteMemberImpl")&&n.prototype._iceWriteMemberImpl.call(t,i),i.endSlice(),e(t,i,Object.getPrototypeOf(n)))},t=function e(t,i,n){void 0!==n&&n!==Ice.Value&&(i.startSlice(),n.prototype.hasOwnProperty("_iceReadMemberImpl")&&n.prototype._iceReadMemberImpl.call(t,i),i.endSlice(),e(t,i,Object.getPrototypeOf(n)))};function i(t){t.startValue(this._iceSlicedData),e(this,t,this._iceMostDerivedType()),t.endValue()}function n(e){e.startValue(),t(this,e,this._iceMostDerivedType()),this._iceSlicedData=e.endValue(!0)}function r(){return this._iceSlicedData}var s=Ice.Slice;s.defineValue=function(e,t,s){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;e.prototype.ice_id=function(){return t},e.prototype._iceMostDerivedType=function(){return e},e.ice_staticId=function(){return t},s&&(e.prototype.ice_getSlicedData=r,e.prototype._iceWrite=i,e.prototype._iceRead=n),a>0&&Ice.CompactIdRegistry.set(a,t)},s.defineValue(Ice.Value,"::Ice::Object")}(),function(){var e=Ice.ArrayUtil,t=e.eq;function i(e){if(this===e)return!0;if(null===e||void 0===e)return!1;if(this.prototype!==e.prototype)return!1;for(var i in this){var n=this[i],r=e[i];if("function"!=typeof n&&!t(n,r))return!1}return!0}function n(){var t=new this.constructor;for(var i in this){var n=this[i];if(void 0===n||null===n)t[i]=n;else{if("function"==typeof n)continue;"function"==typeof n.clone?t[i]=n.clone():t[i]=n instanceof Array?e.clone(n):n}}return t}function r(e,t){if("function"==typeof t.hashCode)return Ice.HashUtil.addHashable(e,t);if(t instanceof Array)return Ice.HashUtil.addArray(e,t,r);var i=c(t);return t instanceof String||"string"==i?Ice.HashUtil.addString(e,t):t instanceof Number||"number"==i?Ice.HashUtil.addNumber(e,t):t instanceof Boolean||"boolean"==i?Ice.HashUtil.addBoolean(e,t):void 0}function s(){var e=5381;for(var t in this){var i=this[t];void 0!==i&&null!==i&&"function"!=typeof i&&(e=r(e,i))}return e}Ice.Slice.defineStruct=function(e,t,r){return e.prototype.clone=n,e.prototype.equals=i,t&&(e.prototype.hashCode=s),e.prototype._write&&e.prototype._read&&(e.write=function(t,i){i||(e.prototype._nullMarshalValue||(e.prototype._nullMarshalValue=new this),i=e.prototype._nullMarshalValue),i._write(t)},e.read=function(e,t){return t&&t instanceof this||(t=new this),t._read(e),t},r?Ice.StreamHelpers.FSizeOptHelper.call(e):Ice.StreamHelpers.VSizeOptHelper.call(e)),e}}(),function(){var e="A".charCodeAt(0),t="a".charCodeAt(0),i="0".charCodeAt(0);function n(n){return n<26?String.fromCharCode(e+n):n<52?String.fromCharCode(t+(n-26)):n<62?String.fromCharCode(i+(n-52)):62==n?"+":"/"}function r(n){return n>="A"&&n<="Z"?n.charCodeAt(0)-e:n>="a"&&n<="z"?n.charCodeAt(0)-t+26:n>="0"&&n<="9"?n.charCodeAt(0)-i+52:"+"==n?62:63}var s=function(){"use strict";function e(){h(this,e)}return f(e,null,[{key:"encode",value:function(e){if(null===e||0===e.length)return"";for(var t,i,r,s,a,o,c,u=[],l=0;l<e.length;l+=3)t=255&e[l],i=0,r=0,l+1<e.length&&(i=255&e[l+1]),l+2<e.length&&(r=255&e[l+2]),s=t>>2&255,a=255&((3&t)<<4|i>>4),o=255&((15&i)<<2|r>>6),c=63&r,u.push(n(s)),u.push(n(a)),l+1<e.length?u.push(n(o)):u.push("="),l+2<e.length?u.push(n(c)):u.push("=");var d=u.join(""),h=[],f=0;while(d.length-f>76)h.push(d.substring(f,f+76)),h.push("\r\n"),f+=76;return h.push(d.substring(f)),h.join("")}},{key:"decode",value:function(t){for(var i=[],n=0;n<t.length;n++){var s=t.charAt(n);e.isBase64(s)&&i.push(s)}if(0===i.length)return null;var a,o,c,u,l,d,h,f,g=3*i.length/4+1,p=new Ice.Buffer;p.resize(g);for(var v=0;v<i.length;v+=4)"A",d="A",h="A",f="A",l=i[v],v+1<i.length&&(d=i[v+1]),v+2<i.length&&(h=i[v+2]),v+3<i.length&&(f=i[v+3]),a=255&r(l),o=255&r(d),c=255&r(h),u=255&r(f),p.put(a<<2|o>>4),"="!=h&&p.put((15&o)<<4|c>>2),"="!=f&&p.put((3&c)<<6|u);return p.remaining>0?p.getArrayAt(0,p.position):p.getArrayAt(0)}},{key:"isBase64",value:function(e){return e>="A"&&e<="Z"||(e>="a"&&e<="z"||(e>="0"&&e<="9"||("+"==e||("/"==e||"="==e))))}}]),e}();Ice.Base64=s}(),function(){p.defineSequence(Ice,"BoolSeqHelper","Ice.BoolHelper",!0),p.defineSequence(Ice,"ByteSeqHelper","Ice.ByteHelper",!0),p.defineSequence(Ice,"ShortSeqHelper","Ice.ShortHelper",!0),p.defineSequence(Ice,"IntSeqHelper","Ice.IntHelper",!0),p.defineSequence(Ice,"LongSeqHelper","Ice.LongHelper",!0),p.defineSequence(Ice,"FloatSeqHelper","Ice.FloatHelper",!0),p.defineSequence(Ice,"DoubleSeqHelper","Ice.DoubleHelper",!0),p.defineSequence(Ice,"StringSeqHelper","Ice.StringHelper",!1),p.defineSequence(Ice,"ObjectSeqHelper","Ice.ObjectHelper",!1,"Ice.Value"),p.defineSequence(Ice,"ObjectProxySeqHelper","Ice.ObjectPrx",!1)}(),function(){Ice.Identity=function(){"use strict";function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";h(this,e),this.name=t,this.category=i}return f(e,[{key:"_write",value:function(e){e.writeString(this.name),e.writeString(this.category)}},{key:"_read",value:function(e){this.name=e.readString(),this.category=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),p.defineStruct(Ice.Identity,!0,!0),p.defineDictionary(Ice,"ObjectDict","ObjectDictHelper","Ice.Identity","Ice.ObjectHelper",!1,Ice.HashMap.compareEquals,"Ice.Value"),p.defineSequence(Ice,"IdentitySeqHelper","Ice.Identity",!1)}(),function(){Ice.ProtocolVersion=function(){"use strict";function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;h(this,e),this.major=t,this.minor=i}return f(e,[{key:"_write",value:function(e){e.writeByte(this.major),e.writeByte(this.minor)}},{key:"_read",value:function(e){this.major=e.readByte(),this.minor=e.readByte()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),p.defineStruct(Ice.ProtocolVersion,!0,!1),Ice.EncodingVersion=function(){"use strict";function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;h(this,e),this.major=t,this.minor=i}return f(e,[{key:"_write",value:function(e){e.writeByte(this.major),e.writeByte(this.minor)}},{key:"_read",value:function(e){this.major=e.readByte(),this.minor=e.readByte()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),p.defineStruct(Ice.EncodingVersion,!0,!1)}(),function(){function e(){return-1!==navigator.userAgent.indexOf("MSIE")||navigator.userAgent.match(/Trident.*rv:11\./)}var t=Number.MAX_SAFE_INTEGER||9007199254740991,i=0,n=function(){return i==t&&(i=0),i++},r=new Map;function s(){var t=function(){"use strict";function e(){h(this,e)}return f(e,null,[{key:"setTimeout",value:function(e){function t(t,i){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){return setTimeout(e,t)}))},{key:"clearTimeout",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return clearTimeout(e)}))},{key:"setInterval",value:function(e){function t(t,i){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){return setInterval(e,t)}))},{key:"clearInterval",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return clearInterval(e)}))}]),e}();if(function(){return/Edge/.test(navigator.userAgent)}()||e())t.setImmediate=function(e){setImmediate(e)};else{var i=new MessageChannel;i.port1.onmessage=function(e){var t=e.data,i=r.get(t);void 0!==i&&(i.call(),r.delete(t))},t.setImmediate=function(e){var t=n();r.set(t,e),i.port2.postMessage(t)}}return t}var a,o=function(){"use strict";function e(){h(this,e)}return f(e,null,[{key:"setTimeout",value:function(e,t){var i=n();return r.set(i,e),a.postMessage({type:0,id:i,ms:t}),i}},{key:"clearTimeout",value:function(e){r.delete(e),a.postMessage({type:3,id:e})}},{key:"setInterval",value:function(e,t){var i=n();return r.set(i,e),a.postMessage({type:1,id:i,ms:t}),i}},{key:"clearInterval",value:function(e){r.delete(e),a.postMessage({type:4,id:e})}},{key:"setImmediate",value:function(e){var t=n();return r.set(t,e),a.postMessage({type:2,id:t}),t}},{key:"onmessage",value:function(e){var t=r.get(e.data.id);void 0!==t&&(t.call(),1!==e.data.type&&r.delete(e.data.id))}}]),e}();if(e())Ice.Timer=s();else if(function(){return"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope}())Ice.Timer=s();else if(void 0===a){var c=URL.createObjectURL(new Blob([function(){return"("+function(){var e={};self.onmessage=function(t){0==t.data.type?e[t.data.id]=setTimeout((function(){return self.postMessage(t.data)}),t.data.ms):1==t.data.type?e[t.data.id]=setInterval((function(){return self.postMessage(t.data)}),t.data.ms):2==t.data.type?self.postMessage(t.data):3==t.data.type?(clearTimeout(e[t.data.id]),delete e[t.data.id]):4==t.data.type&&(clearInterval(e[t.data.id]),delete e[t.data.id])}}.toString()+"());"}()],{type:"text/javascript"}));a=new Worker(c),a.onmessage=o.onmessage,Ice.Timer=o}}(),function(){Ice.InitializationException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.reason=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::InitializationException"}}]),i}(Ice.LocalException),Ice.PluginInitializationException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.reason=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::PluginInitializationException"}}]),i}(Ice.LocalException),Ice.CollocationOptimizationException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::CollocationOptimizationException"}}]),i}(Ice.LocalException),Ice.AlreadyRegisteredException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return h(this,i),e=t.call(this,s),e.kindOfObject=n,e.id=r,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::AlreadyRegisteredException"}}]),i}(Ice.LocalException),Ice.NotRegisteredException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return h(this,i),e=t.call(this,s),e.kindOfObject=n,e.id=r,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::NotRegisteredException"}}]),i}(Ice.LocalException),Ice.TwowayOnlyException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.operation=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::TwowayOnlyException"}}]),i}(Ice.LocalException),Ice.CloneNotImplementedException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::CloneNotImplementedException"}}]),i}(Ice.LocalException),Ice.UnknownException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.unknown=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::UnknownException"}}]),i}(Ice.LocalException),Ice.UnknownLocalException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.UnknownException}},{key:"_id",get:function(){return"::Ice::UnknownLocalException"}}]),i}(Ice.UnknownException),Ice.UnknownUserException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.UnknownException}},{key:"_id",get:function(){return"::Ice::UnknownUserException"}}]),i}(Ice.UnknownException),Ice.VersionMismatchException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::VersionMismatchException"}}]),i}(Ice.LocalException),Ice.CommunicatorDestroyedException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::CommunicatorDestroyedException"}}]),i}(Ice.LocalException),Ice.ObjectAdapterDeactivatedException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.name=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::ObjectAdapterDeactivatedException"}}]),i}(Ice.LocalException),Ice.ObjectAdapterIdInUseException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.id=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::ObjectAdapterIdInUseException"}}]),i}(Ice.LocalException),Ice.NoEndpointException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.proxy=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::NoEndpointException"}}]),i}(Ice.LocalException),Ice.EndpointParseException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.str=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::EndpointParseException"}}]),i}(Ice.LocalException),Ice.EndpointSelectionTypeParseException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.str=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::EndpointSelectionTypeParseException"}}]),i}(Ice.LocalException),Ice.VersionParseException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.str=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::VersionParseException"}}]),i}(Ice.LocalException),Ice.IdentityParseException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.str=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::IdentityParseException"}}]),i}(Ice.LocalException),Ice.ProxyParseException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.str=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::ProxyParseException"}}]),i}(Ice.LocalException),Ice.IllegalIdentityException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Ice.Identity,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.id=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::IllegalIdentityException"}}]),i}(Ice.LocalException),Ice.IllegalServantException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.reason=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::IllegalServantException"}}]),i}(Ice.LocalException),Ice.RequestFailedException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Ice.Identity,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return h(this,i),e=t.call(this,a),e.id=n,e.facet=r,e.operation=s,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::RequestFailedException"}}]),i}(Ice.LocalException),Ice.ObjectNotExistException=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return h(this,i),t.call(this,e,n,r,s)}return f(i,null,[{key:"_parent",get:function(){return Ice.RequestFailedException}},{key:"_id",get:function(){return"::Ice::ObjectNotExistException"}}]),i}(Ice.RequestFailedException),Ice.FacetNotExistException=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return h(this,i),t.call(this,e,n,r,s)}return f(i,null,[{key:"_parent",get:function(){return Ice.RequestFailedException}},{key:"_id",get:function(){return"::Ice::FacetNotExistException"}}]),i}(Ice.RequestFailedException),Ice.OperationNotExistException=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return h(this,i),t.call(this,e,n,r,s)}return f(i,null,[{key:"_parent",get:function(){return Ice.RequestFailedException}},{key:"_id",get:function(){return"::Ice::OperationNotExistException"}}]),i}(Ice.RequestFailedException),Ice.SyscallException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.error=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::SyscallException"}}]),i}(Ice.LocalException),Ice.SocketException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.SyscallException}},{key:"_id",get:function(){return"::Ice::SocketException"}}]),i}(Ice.SyscallException),Ice.CFNetworkException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return h(this,i),n=t.call(this,e,s),n.domain=r,n}return f(i,null,[{key:"_parent",get:function(){return Ice.SocketException}},{key:"_id",get:function(){return"::Ice::CFNetworkException"}}]),i}(Ice.SocketException),Ice.FileException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return h(this,i),n=t.call(this,e,s),n.path=r,n}return f(i,null,[{key:"_parent",get:function(){return Ice.SyscallException}},{key:"_id",get:function(){return"::Ice::FileException"}}]),i}(Ice.SyscallException),Ice.ConnectFailedException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.SocketException}},{key:"_id",get:function(){return"::Ice::ConnectFailedException"}}]),i}(Ice.SocketException),Ice.ConnectionRefusedException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.ConnectFailedException}},{key:"_id",get:function(){return"::Ice::ConnectionRefusedException"}}]),i}(Ice.ConnectFailedException),Ice.ConnectionLostException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.SocketException}},{key:"_id",get:function(){return"::Ice::ConnectionLostException"}}]),i}(Ice.SocketException),Ice.DNSException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return h(this,i),e=t.call(this,s),e.error=n,e.host=r,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::DNSException"}}]),i}(Ice.LocalException),Ice.OperationInterruptedException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::OperationInterruptedException"}}]),i}(Ice.LocalException),Ice.TimeoutException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::TimeoutException"}}]),i}(Ice.LocalException),Ice.ConnectTimeoutException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,null,[{key:"_parent",get:function(){return Ice.TimeoutException}},{key:"_id",get:function(){return"::Ice::ConnectTimeoutException"}}]),i}(Ice.TimeoutException),Ice.CloseTimeoutException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,null,[{key:"_parent",get:function(){return Ice.TimeoutException}},{key:"_id",get:function(){return"::Ice::CloseTimeoutException"}}]),i}(Ice.TimeoutException),Ice.ConnectionTimeoutException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,null,[{key:"_parent",get:function(){return Ice.TimeoutException}},{key:"_id",get:function(){return"::Ice::ConnectionTimeoutException"}}]),i}(Ice.TimeoutException),Ice.InvocationTimeoutException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,null,[{key:"_parent",get:function(){return Ice.TimeoutException}},{key:"_id",get:function(){return"::Ice::InvocationTimeoutException"}}]),i}(Ice.TimeoutException),Ice.InvocationCanceledException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::InvocationCanceledException"}}]),i}(Ice.LocalException),Ice.ProtocolException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.reason=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::ProtocolException"}}]),i}(Ice.LocalException),Ice.BadMagicException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return h(this,i),n=t.call(this,e,s),n.badMagic=r,n}return f(i,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::BadMagicException"}}]),i}(Ice.ProtocolException),Ice.UnsupportedProtocolException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ice.ProtocolVersion,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Ice.ProtocolVersion,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return h(this,i),n=t.call(this,e,a),n.bad=r,n.supported=s,n}return f(i,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::UnsupportedProtocolException"}}]),i}(Ice.ProtocolException),Ice.UnsupportedEncodingException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ice.EncodingVersion,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Ice.EncodingVersion,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return h(this,i),n=t.call(this,e,a),n.bad=r,n.supported=s,n}return f(i,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::UnsupportedEncodingException"}}]),i}(Ice.ProtocolException),Ice.UnknownMessageException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::UnknownMessageException"}}]),i}(Ice.ProtocolException),Ice.ConnectionNotValidatedException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::ConnectionNotValidatedException"}}]),i}(Ice.ProtocolException),Ice.UnknownRequestIdException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::UnknownRequestIdException"}}]),i}(Ice.ProtocolException),Ice.UnknownReplyStatusException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::UnknownReplyStatusException"}}]),i}(Ice.ProtocolException),Ice.CloseConnectionException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::CloseConnectionException"}}]),i}(Ice.ProtocolException),Ice.ConnectionManuallyClosedException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.graceful=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::ConnectionManuallyClosedException"}}]),i}(Ice.LocalException),Ice.IllegalMessageSizeException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::IllegalMessageSizeException"}}]),i}(Ice.ProtocolException),Ice.CompressionException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::CompressionException"}}]),i}(Ice.ProtocolException),Ice.DatagramLimitException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::DatagramLimitException"}}]),i}(Ice.ProtocolException),Ice.MarshalException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::MarshalException"}}]),i}(Ice.ProtocolException),Ice.ProxyUnmarshalException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.MarshalException}},{key:"_id",get:function(){return"::Ice::ProxyUnmarshalException"}}]),i}(Ice.MarshalException),Ice.UnmarshalOutOfBoundsException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.MarshalException}},{key:"_id",get:function(){return"::Ice::UnmarshalOutOfBoundsException"}}]),i}(Ice.MarshalException),Ice.NoValueFactoryException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return h(this,i),n=t.call(this,e,s),n.type=r,n}return f(i,null,[{key:"_parent",get:function(){return Ice.MarshalException}},{key:"_id",get:function(){return"::Ice::NoValueFactoryException"}}]),i}(Ice.MarshalException),Ice.UnexpectedObjectException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return h(this,i),n=t.call(this,e,a),n.type=r,n.expectedType=s,n}return f(i,null,[{key:"_parent",get:function(){return Ice.MarshalException}},{key:"_id",get:function(){return"::Ice::UnexpectedObjectException"}}]),i}(Ice.MarshalException),Ice.MemoryLimitException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.MarshalException}},{key:"_id",get:function(){return"::Ice::MemoryLimitException"}}]),i}(Ice.MarshalException),Ice.StringConversionException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.MarshalException}},{key:"_id",get:function(){return"::Ice::StringConversionException"}}]),i}(Ice.MarshalException),Ice.EncapsulationException=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),t.call(this,e,n)}return f(i,null,[{key:"_parent",get:function(){return Ice.MarshalException}},{key:"_id",get:function(){return"::Ice::EncapsulationException"}}]),i}(Ice.MarshalException),Ice.FeatureNotSupportedException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.unsupportedFeature=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::FeatureNotSupportedException"}}]),i}(Ice.LocalException),Ice.SecurityException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(this,i),e=t.call(this,r),e.reason=n,e}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::SecurityException"}}]),i}(Ice.LocalException),Ice.FixedProxyException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::FixedProxyException"}}]),i}(Ice.LocalException),Ice.ResponseSentException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::ResponseSentException"}}]),i}(Ice.LocalException)}(),function(){var e=Ice.CommunicatorDestroyedException,t=function(){"use strict";function t(e){h(this,t),this._logger=e,this._destroyed=!1,this._tokenId=0,this._tokens=new Map}return f(t,[{key:"destroy",value:function(){var e=this;this._tokens.forEach((function(t,i){return e.cancel(i)})),this._destroyed=!0,this._tokens.clear()}},{key:"schedule",value:function(i,n){var r=this;if(this._destroyed)throw new e;var s=this._tokenId++,a=t.setTimeout((function(){return r.handleTimeout(s)}),n);return this._tokens.set(s,{callback:i,id:a,isInterval:!1}),s}},{key:"scheduleRepeated",value:function(i,n){var r=this;if(this._destroyed)throw new e;var s=this._tokenId++,a=t.setInterval((function(){return r.handleInterval(s)}),n);return this._tokens.set(s,{callback:i,id:a,isInterval:!0}),s}},{key:"cancel",value:function(e){if(this._destroyed)return!1;var i=this._tokens.get(e);return void 0!==i&&(this._tokens.delete(e),i.isInterval?t.clearInterval(i.id):t.clearTimeout(i.id),!0)}},{key:"handleTimeout",value:function(e){if(!this._destroyed){var t=this._tokens.get(e);if(void 0!==t){this._tokens.delete(e);try{t.callback()}catch(i){this._logger.warning("uncaught exception while executing timer:\n"+i)}}}}},{key:"handleInterval",value:function(e){if(!this._destroyed){var t=this._tokens.get(e);if(void 0!==t)try{t.callback()}catch(i){this._logger.warning("uncaught exception while executing timer:\n"+i)}}}}]),t}();t.setTimeout=Ice.Timer.setTimeout,t.clearTimeout=Ice.Timer.clearTimeout,t.setInterval=Ice.Timer.setInterval,t.clearInterval=Ice.Timer.clearInterval,t.setImmediate=Ice.Timer.setImmediate,Ice.Timer=t}(),function(){var e=Ice.UnexpectedObjectException,t=Ice.MemoryLimitException;Ice.ExUtil={throwUOE:function(t,i){var n=i.ice_id();throw new e("expected element of type `"+t+"' but received `"+n+"'",n,t)},throwMemoryLimitException:function(e,i){throw new t("requested "+e+" bytes, maximum allowed is "+i+" bytes (see Ice.MessageSizeMax)")}}}(),function(){var e=function(){"use strict";function e(t){h(this,e),void 0!==t&&t.length>0?this._prefix=t+": ":this._prefix="",this._dateformat={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}}return f(e,[{key:"print",value:function(e){this.write(e,!1)}},{key:"trace",value:function(e,t){var i=[];i.push("-- "),i.push(this.timestamp()),i.push(" "),i.push(this._prefix),i.push(e),i.push(": "),i.push(t),this.write(i.join(""),!0)}},{key:"warning",value:function(e){var t=[];t.push("-! "),t.push(this.timestamp()),t.push(" "),t.push(this._prefix),t.push("warning: "),t.push(e),this.write(t.join(""),!0)}},{key:"error",value:function(e){var t=[];t.push("!! "),t.push(this.timestamp()),t.push(" "),t.push(this._prefix),t.push("error: "),t.push(e),this.write(t.join(""),!0)}},{key:"cloneWithPrefix",value:function(t){return new e(t)}},{key:"write",value:function(e,i){i&&(e=e.replace(/\n/g,"\n ")),t("log",e," at util/thirdlib/Ice.js:6018")}},{key:"timestamp",value:function(){var e=new Date;return e.toLocaleString("en-US",this._dateformat)+"."+e.getMilliseconds()}}]),e}();Ice.Logger=e}(),function(){var e=f((function e(){"use strict";h(this,e),this.typeId="",this.compactId=-1,this.bytes=[],this.instances=[],this.hasOptionalMembers=!1,this.isLastSlice=!1}));Ice.SliceInfo=e;var t=f((function e(t){"use strict";h(this,e),this.slices=t}));Ice.SlicedData=t;var i=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n;return h(this,i),n=t.call(this),n._unknownTypeId=e,n}return f(i,[{key:"ice_getSlicedData",value:function(){return this._slicedData}},{key:"ice_id",value:function(){return this._unknownTypeId}},{key:"_iceWrite",value:function(e){e.startValue(this._slicedData),e.endValue()}},{key:"_iceRead",value:function(e){e.startValue(),this._slicedData=e.endValue(!0)}}]),i}(Ice.Value);Ice.UnknownSlicedValue=i}(),function(){var e=Ice.StringUtil,t={};function i(t){var i=t.indexOf(".");if(-1===i)throw new Ice.VersionParseException("malformed version value `"+t+"'");try{var n=e.toInt(t.substring(0,i));if(n<1||n>255)throw new Ice.VersionParseException("range error in version `"+t+"'");return n}catch(r){throw new Ice.VersionParseException("invalid version value `"+t+"'")}}function n(t){var i=t.indexOf(".");if(-1===i)throw new Ice.VersionParseException("malformed version value `"+t+"'");try{var n=e.toInt(t.substring(i+1));if(n<0||n>255)throw new Ice.VersionParseException("range error in version `"+t+"'");return n}catch(r){throw new Ice.VersionParseException("invalid version value `"+t+"'")}}function r(e,t){return e+"."+t}Ice.Encoding_1_0=new Ice.EncodingVersion(1,0),Ice.Encoding_1_1=new Ice.EncodingVersion(1,1),Ice.Protocol_1_0=new Ice.ProtocolVersion(1,0),t.headerSize=14,t.magic=new Uint8Array([73,99,101,80]),t.protocolMajor=1,t.protocolMinor=0,t.protocolEncodingMajor=1,t.protocolEncodingMinor=0,t.encodingMajor=1,t.encodingMinor=1,t.requestMsg=0,t.requestBatchMsg=1,t.replyMsg=2,t.validateConnectionMsg=3,t.closeConnectionMsg=4,t.replyOK=0,t.replyUserException=1,t.replyObjectNotExist=2,t.replyFacetNotExist=3,t.replyOperationNotExist=4,t.replyUnknownLocalException=5,t.replyUnknownUserException=6,t.replyUnknownException=7,t.requestHdr=new Uint8Array([t.magic[0],t.magic[1],t.magic[2],t.magic[3],t.protocolMajor,t.protocolMinor,t.protocolEncodingMajor,t.protocolEncodingMinor,t.requestMsg,0,0,0,0,0,0,0,0,0]),t.requestBatchHdr=new Uint8Array([t.magic[0],t.magic[1],t.magic[2],t.magic[3],t.protocolMajor,t.protocolMinor,t.protocolEncodingMajor,t.protocolEncodingMinor,t.requestBatchMsg,0,0,0,0,0,0,0,0,0]),t.replyHdr=new Uint8Array([t.magic[0],t.magic[1],t.magic[2],t.magic[3],t.protocolMajor,t.protocolMinor,t.protocolEncodingMajor,t.protocolEncodingMinor,t.replyMsg,0,0,0,0,0]),t.currentProtocol=new Ice.ProtocolVersion(t.protocolMajor,t.protocolMinor),t.currentProtocolEncoding=new Ice.EncodingVersion(t.protocolEncodingMajor,t.protocolEncodingMinor),t.currentEncoding=new Ice.EncodingVersion(t.encodingMajor,t.encodingMinor),t.checkSupportedProtocol=function(e){if(e.major!==t.currentProtocol.major||e.minor>t.currentProtocol.minor)throw new Ice.UnsupportedProtocolException("",e,t.currentProtocol)},t.checkSupportedProtocolEncoding=function(e){if(e.major!==t.currentProtocolEncoding.major||e.minor>t.currentProtocolEncoding.minor)throw new Ice.UnsupportedEncodingException("",e,t.currentProtocolEncoding)},t.checkSupportedEncoding=function(e){if(e.major!==t.currentEncoding.major||e.minor>t.currentEncoding.minor)throw new Ice.UnsupportedEncodingException("",e,t.currentEncoding)},t.getCompatibleProtocol=function(e){return e.major!==t.currentProtocol.major||e.minor<t.currentProtocol.minor?e:t.currentProtocol},t.getCompatibleEncoding=function(e){return e.major!==t.currentEncoding.major||e.minor<t.currentEncoding.minor?e:t.currentEncoding},t.isSupported=function(e,t){return e.major===t.major&&e.minor<=t.minor},Ice.stringToProtocolVersion=function(e){return new Ice.ProtocolVersion(i(e),n(e))},Ice.stringToEncodingVersion=function(e){return new Ice.EncodingVersion(i(e),n(e))},Ice.protocolVersionToString=function(e){return r(e.major,e.minor)},Ice.encodingVersionToString=function(e){return r(e.major,e.minor)},t.OPTIONAL_END_MARKER=255,t.FLAG_HAS_TYPE_ID_STRING=1,t.FLAG_HAS_TYPE_ID_INDEX=2,t.FLAG_HAS_TYPE_ID_COMPACT=3,t.FLAG_HAS_OPTIONAL_MEMBERS=4,t.FLAG_HAS_INDIRECTION_TABLE=8,t.FLAG_HAS_SLICE_SIZE=16,t.FLAG_IS_LAST_SLICE=32,Ice.Protocol=t}(),function(){var e=function(){"use strict";function e(){h(this,e)}return f(e,null,[{key:"equals",value:function(e,t){if(e===t)return!0;if(e.size!=t.size)return!1;var i,n=g(e);try{for(n.s();!(i=n.n()).done;){var r=s(i.value,2),a=r[0],o=r[1];if(void 0===o){if(!t.has(a))return!1;if(t.get(a)!==o)return!1}else if(t.get(a)!==o)return!1}}catch(c){n.e(c)}finally{n.f()}return!0}}]),e}();Ice.MapUtil=e}(),function(){p.defineDictionary(Ice,"Context","ContextHelper","Ice.StringHelper","Ice.StringHelper",!1,void 0,void 0),Ice.OperationMode=p.defineEnum([["Normal",0],["Nonmutating",1],["Idempotent",2]]),Ice.Current=function(){"use strict";return f((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Ice.Identity,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Ice.OperationMode.Normal,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:new Ice.EncodingVersion;h(this,e),this.adapter=t,this.con=i,this.id=n,this.facet=r,this.operation=s,this.mode=a,this.ctx=o,this.requestId=c,this.encoding=u}))}(),p.defineStruct(Ice.Current,!1,!0)}(),function(){Ice.Property=function(){"use strict";function e(t,i,n){h(this,e),this._pattern=t,this._deprecated=i,this._deprecatedBy=n}return f(e,[{key:"pattern",get:function(){return this._pattern}},{key:"deprecated",get:function(){return this._deprecated}},{key:"deprecatedBy",get:function(){return this._deprecatedBy}}]),e}()}(),function(){var e={},t=Ice.Property;e.IceProps=[new t("/^Ice.ACM.Client/",!0,null),new t("/^Ice.ACM.Server/",!0,null),new t("/^Ice.ACM.Timeout/",!1,null),new t("/^Ice.ACM.Heartbeat/",!1,null),new t("/^Ice.ACM.Close/",!1,null),new t("/^Ice.ACM/",!1,null),new t("/^Ice.ACM.Client.Timeout/",!1,null),new t("/^Ice.ACM.Client.Heartbeat/",!1,null),new t("/^Ice.ACM.Client.Close/",!1,null),new t("/^Ice.ACM.Client/",!1,null),new t("/^Ice.ACM.Server.Timeout/",!1,null),new t("/^Ice.ACM.Server.Heartbeat/",!1,null),new t("/^Ice.ACM.Server.Close/",!1,null),new t("/^Ice.ACM.Server/",!1,null),new t("/^Ice.Admin.ACM.Timeout/",!1,null),new t("/^Ice.Admin.ACM.Heartbeat/",!1,null),new t("/^Ice.Admin.ACM.Close/",!1,null),new t("/^Ice.Admin.ACM/",!1,null),new t("/^Ice.Admin.AdapterId/",!1,null),new t("/^Ice.Admin.Endpoints/",!1,null),new t("/^Ice.Admin.Locator.EndpointSelection/",!1,null),new t("/^Ice.Admin.Locator.ConnectionCached/",!1,null),new t("/^Ice.Admin.Locator.PreferSecure/",!1,null),new t("/^Ice.Admin.Locator.LocatorCacheTimeout/",!1,null),new t("/^Ice.Admin.Locator.InvocationTimeout/",!1,null),new t("/^Ice.Admin.Locator.Locator/",!1,null),new t("/^Ice.Admin.Locator.Router/",!1,null),new t("/^Ice.Admin.Locator.CollocationOptimized/",!1,null),new t("/^Ice.Admin.Locator.Context../",!1,null),new t("/^Ice.Admin.Locator/",!1,null),new t("/^Ice.Admin.PublishedEndpoints/",!1,null),new t("/^Ice.Admin.ReplicaGroupId/",!1,null),new t("/^Ice.Admin.Router.EndpointSelection/",!1,null),new t("/^Ice.Admin.Router.ConnectionCached/",!1,null),new t("/^Ice.Admin.Router.PreferSecure/",!1,null),new t("/^Ice.Admin.Router.LocatorCacheTimeout/",!1,null),new t("/^Ice.Admin.Router.InvocationTimeout/",!1,null),new t("/^Ice.Admin.Router.Locator/",!1,null),new t("/^Ice.Admin.Router.Router/",!1,null),new t("/^Ice.Admin.Router.CollocationOptimized/",!1,null),new t("/^Ice.Admin.Router.Context../",!1,null),new t("/^Ice.Admin.Router/",!1,null),new t("/^Ice.Admin.ProxyOptions/",!1,null),new t("/^Ice.Admin.ThreadPool.Size/",!1,null),new t("/^Ice.Admin.ThreadPool.SizeMax/",!1,null),new t("/^Ice.Admin.ThreadPool.SizeWarn/",!1,null),new t("/^Ice.Admin.ThreadPool.StackSize/",!1,null),new t("/^Ice.Admin.ThreadPool.Serialize/",!1,null),new t("/^Ice.Admin.ThreadPool.ThreadIdleTime/",!1,null),new t("/^Ice.Admin.ThreadPool.ThreadPriority/",!1,null),new t("/^Ice.Admin.MessageSizeMax/",!1,null),new t("/^Ice.Admin.DelayCreation/",!1,null),new t("/^Ice.Admin.Enabled/",!1,null),new t("/^Ice.Admin.Facets/",!1,null),new t("/^Ice.Admin.InstanceName/",!1,null),new t("/^Ice.Admin.Logger.KeepLogs/",!1,null),new t("/^Ice.Admin.Logger.KeepTraces/",!1,null),new t("/^Ice.Admin.Logger.Properties/",!1,null),new t("/^Ice.Admin.ServerId/",!1,null),new t("/^Ice.BackgroundLocatorCacheUpdates/",!1,null),new t("/^Ice.BatchAutoFlush/",!0,null),new t("/^Ice.BatchAutoFlushSize/",!1,null),new t("/^Ice.ChangeUser/",!1,null),new t("/^Ice.ClassGraphDepthMax/",!1,null),new t("/^Ice.ClientAccessPolicyProtocol/",!1,null),new t("/^Ice.Compression.Level/",!1,null),new t("/^Ice.CollectObjects/",!1,null),new t("/^Ice.Config/",!1,null),new t("/^Ice.ConsoleListener/",!1,null),new t("/^Ice.Default.CollocationOptimized/",!1,null),new t("/^Ice.Default.EncodingVersion/",!1,null),new t("/^Ice.Default.EndpointSelection/",!1,null),new t("/^Ice.Default.Host/",!1,null),new t("/^Ice.Default.Locator.EndpointSelection/",!1,null),new t("/^Ice.Default.Locator.ConnectionCached/",!1,null),new t("/^Ice.Default.Locator.PreferSecure/",!1,null),new t("/^Ice.Default.Locator.LocatorCacheTimeout/",!1,null),new t("/^Ice.Default.Locator.InvocationTimeout/",!1,null),new t("/^Ice.Default.Locator.Locator/",!1,null),new t("/^Ice.Default.Locator.Router/",!1,null),new t("/^Ice.Default.Locator.CollocationOptimized/",!1,null),new t("/^Ice.Default.Locator.Context../",!1,null),new t("/^Ice.Default.Locator/",!1,null),new t("/^Ice.Default.LocatorCacheTimeout/",!1,null),new t("/^Ice.Default.InvocationTimeout/",!1,null),new t("/^Ice.Default.Package/",!1,null),new t("/^Ice.Default.PreferSecure/",!1,null),new t("/^Ice.Default.Protocol/",!1,null),new t("/^Ice.Default.Router.EndpointSelection/",!1,null),new t("/^Ice.Default.Router.ConnectionCached/",!1,null),new t("/^Ice.Default.Router.PreferSecure/",!1,null),new t("/^Ice.Default.Router.LocatorCacheTimeout/",!1,null),new t("/^Ice.Default.Router.InvocationTimeout/",!1,null),new t("/^Ice.Default.Router.Locator/",!1,null),new t("/^Ice.Default.Router.Router/",!1,null),new t("/^Ice.Default.Router.CollocationOptimized/",!1,null),new t("/^Ice.Default.Router.Context../",!1,null),new t("/^Ice.Default.Router/",!1,null),new t("/^Ice.Default.SlicedFormat/",!1,null),new t("/^Ice.Default.SourceAddress/",!1,null),new t("/^Ice.Default.Timeout/",!1,null),new t("/^Ice.EventLog.Source/",!1,null),new t("/^Ice.FactoryAssemblies/",!1,null),new t("/^Ice.HTTPProxyHost/",!1,null),new t("/^Ice.HTTPProxyPort/",!1,null),new t("/^Ice.ImplicitContext/",!1,null),new t("/^Ice.InitPlugins/",!1,null),new t("/^Ice.IPv4/",!1,null),new t("/^Ice.IPv6/",!1,null),new t("/^Ice.LogFile/",!1,null),new t("/^Ice.LogFile.SizeMax/",!1,null),new t("/^Ice.LogStdErr.Convert/",!1,null),new t("/^Ice.MessageSizeMax/",!1,null),new t("/^Ice.Nohup/",!1,null),new t("/^Ice.NullHandleAbort/",!1,null),new t("/^Ice.Override.CloseTimeout/",!1,null),new t("/^Ice.Override.Compress/",!1,null),new t("/^Ice.Override.ConnectTimeout/",!1,null),new t("/^Ice.Override.Timeout/",!1,null),new t("/^Ice.Override.Secure/",!1,null),new t("/^Ice.Package../",!1,null),new t("/^Ice.Plugin../",!1,null),new t("/^Ice.PluginLoadOrder/",!1,null),new t("/^Ice.PreferIPv6Address/",!1,null),new t("/^Ice.PreloadAssemblies/",!1,null),new t("/^Ice.PrintAdapterReady/",!1,null),new t("/^Ice.PrintProcessId/",!1,null),new t("/^Ice.PrintStackTraces/",!1,null),new t("/^Ice.ProgramName/",!1,null),new t("/^Ice.RetryIntervals/",!1,null),new t("/^Ice.ServerIdleTime/",!1,null),new t("/^Ice.SOCKSProxyHost/",!1,null),new t("/^Ice.SOCKSProxyPort/",!1,null),new t("/^Ice.StdErr/",!1,null),new t("/^Ice.StdOut/",!1,null),new t("/^Ice.SyslogFacility/",!1,null),new t("/^Ice.ThreadPool.Client.Size/",!1,null),new t("/^Ice.ThreadPool.Client.SizeMax/",!1,null),new t("/^Ice.ThreadPool.Client.SizeWarn/",!1,null),new t("/^Ice.ThreadPool.Client.StackSize/",!1,null),new t("/^Ice.ThreadPool.Client.Serialize/",!1,null),new t("/^Ice.ThreadPool.Client.ThreadIdleTime/",!1,null),new t("/^Ice.ThreadPool.Client.ThreadPriority/",!1,null),new t("/^Ice.ThreadPool.Server.Size/",!1,null),new t("/^Ice.ThreadPool.Server.SizeMax/",!1,null),new t("/^Ice.ThreadPool.Server.SizeWarn/",!1,null),new t("/^Ice.ThreadPool.Server.StackSize/",!1,null),new t("/^Ice.ThreadPool.Server.Serialize/",!1,null),new t("/^Ice.ThreadPool.Server.ThreadIdleTime/",!1,null),new t("/^Ice.ThreadPool.Server.ThreadPriority/",!1,null),new t("/^Ice.ThreadPriority/",!1,null),new t("/^Ice.ToStringMode/",!1,null),new t("/^Ice.Trace.Admin.Properties/",!1,null),new t("/^Ice.Trace.Admin.Logger/",!1,null),new t("/^Ice.Trace.Locator/",!1,null),new t("/^Ice.Trace.Network/",!1,null),new t("/^Ice.Trace.Protocol/",!1,null),new t("/^Ice.Trace.Retry/",!1,null),new t("/^Ice.Trace.Slicing/",!1,null),new t("/^Ice.Trace.ThreadPool/",!1,null),new t("/^Ice.UDP.RcvSize/",!1,null),new t("/^Ice.UDP.SndSize/",!1,null),new t("/^Ice.TCP.Backlog/",!1,null),new t("/^Ice.TCP.RcvSize/",!1,null),new t("/^Ice.TCP.SndSize/",!1,null),new t("/^Ice.UseApplicationClassLoader/",!1,null),new t("/^Ice.UseOSLog/",!1,null),new t("/^Ice.UseSyslog/",!1,null),new t("/^Ice.UseSystemdJournal/",!1,null),new t("/^Ice.Warn.AMICallback/",!1,null),new t("/^Ice.Warn.Connections/",!1,null),new t("/^Ice.Warn.Datagrams/",!1,null),new t("/^Ice.Warn.Dispatch/",!1,null),new t("/^Ice.Warn.Endpoints/",!1,null),new t("/^Ice.Warn.UnknownProperties/",!1,null),new t("/^Ice.Warn.UnusedProperties/",!1,null),new t("/^Ice.CacheMessageBuffers/",!1,null),new t("/^Ice.ThreadInterruptSafe/",!1,null),new t("/^Ice.Voip/",!0,null)],e.validProps=[e.IceProps],e.clPropNames=["Ice"],Ice.PropertyNames=e}(),function(){var e=Ice.Timer,t=function(t,i){"use strict";u(r,t);var n=v(r);function r(e){var t,i,s;return h(this,r),t=n.call(this,(function(t,n){i=t,s=n,void 0!==e&&e(t,n)})),t.resolve=i,t.reject=s,t}return f(r,[{key:"delay",value:function(t){return this.then((function(i){return new r((function(n,r){return e.setTimeout((function(){return n(i)}),t)}))}),(function(i){return new r((function(n,r){return e.setTimeout((function(){return r(i)}),t)}))}))}}],[{key:i,get:function(){return r}},{key:"delay",value:function(t,i){return new r((function(n){return e.setTimeout((function(){return n(i)}),t)}))}},{key:"try",value:function(e){return r.resolve().then(e)}}]),r}(o(Promise),Symbol.species);Ice.Promise=t}(),function(){var e=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r,s,a){var o;return h(this,i),o=t.call(this),o._communicator=e,o._instance=null!==e?e.instance:null,o._operation=n,o._connection=r,o._proxy=s,o._adapter=a,o}return f(i,[{key:"communicator",get:function(){return this._communicator}},{key:"connection",get:function(){return this._connection}},{key:"proxy",get:function(){return this._proxy}},{key:"adapter",get:function(){return this._adapter}},{key:"operation",get:function(){return this._operation}}]),i}(Ice.Promise);Ice.AsyncResultBase=e}(),function(){var e=Ice.Debug,i=Ice.Protocol,n=Ice.StringUtil,r=Ice.OperationMode,s=Ice.Identity,a=new Map;function o(e,t){var i=Ice.ToStringMode.Unicode;null!==t.instance&&(i=t.instance.toStringMode());var r=new s;r._read(t),e.push("\nidentity = "+Ice.identityToString(r,i));var a=Ice.StringSeqHelper.read(t);e.push("\nfacet = "),a.length>0&&e.push(n.escapeString(a[0],"",i));var o=t.readString();e.push("\noperation = "+o)}function c(e,t){o(e,t);var i=t.readByte();switch(e.push("\nmode = "+i+" "),r.valueOf(i)){case r.Normal:e.push("(normal)");break;case r.Nonmutating:e.push("(nonmutating)");break;case r.Idempotent:e.push("(idempotent)");break;default:e.push("(unknown)");break}var n=t.readSize();e.push("\ncontext = ");while(n-- >0){var s=t.readString(),a=t.readString();e.push(s+"/"+a),n>0&&e.push(", ")}var c=t.skipEncapsulation();c.equals(Ice.Encoding_1_0)||(e.push("\nencoding = "),e.push(Ice.encodingVersionToString(c)))}function u(t,n){var r=function(e,t){t.readByte(),t.readByte(),t.readByte(),t.readByte(),t.readByte(),t.readByte(),t.readByte(),t.readByte();var i=t.readByte();e.push("\nmessage type = "+i+" ("+l(i)+")");var n=t.readByte();switch(e.push("\ncompression status = "+n+" "),n){case 0:e.push("(not compressed; do not compress response, if any)");break;case 1:e.push("(not compressed; compress response, if any)");break;case 2:e.push("(compressed; compress response, if any)");break;default:e.push("(unknown)");break}var r=t.readInt();return e.push("\nmessage size = "+r),i}(t,n);switch(r){case i.closeConnectionMsg:case i.validateConnectionMsg:break;case i.requestMsg:(function(e,t){var i=t.readInt();e.push("\nrequest id = "+i),0===i&&e.push(" (oneway)"),c(e,t)})(t,n);break;case i.requestBatchMsg:(function(e,t){var i=t.readInt();e.push("\nnumber of requests = "+i);for(var n=0;n<i;++n)e.push("\nrequest #"+n+":"),c(e,t)})(t,n);break;case i.replyMsg:(function(t,n){var r=n.readInt();t.push("\nrequest id = "+r);var s=n.readByte();switch(t.push("\nreply status = "+s+" "),s){case i.replyOK:t.push("(ok)");break;case i.replyUserException:t.push("(user exception)");break;case i.replyObjectNotExist:case i.replyFacetNotExist:case i.replyOperationNotExist:switch(s){case i.replyObjectNotExist:t.push("(object not exist)");break;case i.replyFacetNotExist:t.push("(facet not exist)");break;case i.replyOperationNotExist:t.push("(operation not exist)");break;default:e.assert(!1);break}o(t,n);break;case i.replyUnknownException:case i.replyUnknownLocalException:case i.replyUnknownUserException:switch(s){case i.replyUnknownException:t.push("(unknown exception)");break;case i.replyUnknownLocalException:t.push("(unknown local exception)");break;case i.replyUnknownUserException:t.push("(unknown user exception)");break;default:e.assert(!1);break}var a=n.readString();t.push("\nunknown = "+a);break;default:t.push("(unknown)");break}if(s===i.replyOK||s===i.replyUserException){var c=n.skipEncapsulation();c.equals(Ice.Encoding_1_0)||(t.push("\nencoding = "),t.push(Ice.encodingVersionToString(c)))}})(t,n);break;default:break}return r}function l(e){switch(e){case i.requestMsg:return"request";case i.requestBatchMsg:return"batch request";case i.replyMsg:return"reply";case i.closeConnectionMsg:return"close connection";case i.validateConnectionMsg:return"validate connection";default:return"unknown"}}var d=function(){"use strict";function e(){h(this,e)}return f(e,null,[{key:"traceSlicing",value:function(e,t,i,n){a.has(t)||(n.trace(i,"unknown ".concat(e," type `").concat(t,"'")),a.set(t,1))}},{key:"traceSend",value:function(e,t,i){if(i.protocol>=1){var n=e.pos,r=new Ice.InputStream(e.instance,e.getEncoding(),e.buffer);r.pos=0;var s=[],a=u(s,r);t.trace(i.protocolCat,"sending "+l(a)+" "+s.join("")),e.pos=n}}},{key:"traceRecv",value:function(e,t,i){if(i.protocol>=1){var n=e.pos;e.pos=0;var r=[],s=u(r,e);t.trace(i.protocolCat,"received "+l(s)+" "+r.join("")),e.pos=n}}},{key:"traceOut",value:function(e,t,i,n){if(n.protocol>=1){var r=t.pos,s=new Ice.InputStream(t.instance,t.getEncoding(),t.buffer);s.pos=0;var a=[];a.push(e),u(a,s),i.trace(n.protocolCat,a.join("")),t.pos=r}}},{key:"traceIn",value:function(e,t,i,n){if(n.protocol>=1){var r=t.pos;t.pos=0;var s=[];s.push(e),u(s,t),i.trace(n.protocolCat,s.join("")),t.pos=r}}},{key:"dumpStream",value:function(t){var i=t.pos;t.pos=0;var n=t.readBlob(t.size());e.dumpOctets(n),t.pos=i}},{key:"dumpOctets",value:function(e){for(var i=[],n=0;n<e.length;n+=8){for(var r=n;r-n<8;r++)if(r<e.length){var s=e[r];s<0&&(s+=256);var a=void 0;a=s<10?" "+s:s<100?" "+s:String(s),i.push(a+" ")}else i.push(" ");i.push('"');for(var o=n;o<e.length&&o-n<8;o++)e[o]>=32&&e[o]<127?i.push(String.fromCharCode(e[o])):i.push(".");i.push('"\n')}t("log",i.join("")," at util/thirdlib/Ice.js:7373")}}]),e}();Ice.TraceUtil=d}(),function(){var e=function(e){"use strict";u(i,e);var t=v(i);function i(e){var n;return h(this,i),n=t.call(this),e instanceof Ice.LocalException?n._ex=e:(Ice.Debug.assert(e instanceof i),n._ex=e._ex),n}return f(i,[{key:"inner",get:function(){return this._ex}}]),i}(o(Error));Ice.RetryException=e}(),function(){var e=Ice._ModuleRegistry,t=Ice.Debug,i=Ice.ExUtil,n=Ice.FormatType,r=Ice.OptionalFormat,s=Ice.Protocol,a=Ice.TraceUtil,o=Ice.ArrayUtil,c=Ice.SlicedData,l={NoSlice:0,ValueSlice:1,ExceptionSlice:2};Number.isNaN=Number.isNaN||function(e){return"number"===typeof e&&isNaN(e)};var d=f((function e(t,i){"use strict";h(this,e),this.index=t,this.cb=i})),g=function(){"use strict";function e(t,i,n,r){h(this,e),this._stream=t,this._encaps=i,this._sliceValues=n,this._valueFactoryManager=r,this._patchMap=null,this._unmarshaledMap=new Map,this._typeIdMap=null,this._typeIdIndex=0,this._valueList=null}return f(e,[{key:"readOptional",value:function(){return!1}},{key:"readPendingValues",value:function(){}},{key:"readTypeId",value:function(e){var t;if(null===this._typeIdMap&&(this._typeIdMap=new Map),e){if(t=this._typeIdMap.get(this._stream.readSize()),void 0===t)throw new Ice.UnmarshalOutOfBoundsException}else t=this._stream.readString(),this._typeIdMap.set(++this._typeIdIndex,t);return t}},{key:"newInstance",value:function(e){var t=this._valueFactoryManager.find(e),i=null;return void 0!==t&&(i=t(e)),null!==i&&void 0!==i||(t=this._valueFactoryManager.find(""),void 0!==t&&(i=t(e))),null!==i&&void 0!==i||(i=this._stream.createInstance(e)),i}},{key:"addPatchEntry",value:function(e,i){t.assert(e>0);var n=this._unmarshaledMap.get(e);if(void 0===n||null===n){null===this._patchMap&&(this._patchMap=new Map);var r=this._patchMap.get(e);void 0===r&&(r=[],this._patchMap.set(e,r)),r.push(i)}else i(n)}},{key:"unmarshal",value:function(e,i){if(this._unmarshaledMap.set(e,i),i._iceRead(this._stream),null!==this._patchMap){var n=this._patchMap.get(e);if(void 0!==n){t.assert(n.length>0);for(var r=0;r<n.length;++r)n[r](i);this._patchMap.delete(e)}}if(null!==this._patchMap&&0!==this._patchMap.size||null!==this._valueList){if(null===this._valueList&&(this._valueList=[]),this._valueList.push(i),null===this._patchMap||0===this._patchMap.size){for(var s=0;s<this._valueList.length;s++)try{this._valueList[s].ice_postUnmarshal()}catch(a){this._stream.instance.initializationData().logger.warning("exception raised by ice_postUnmarshal:\n"+a.toString())}this._valueList=[]}}else try{i.ice_postUnmarshal()}catch(a){this._stream.instance.initializationData().logger.warning("exception raised by ice_postUnmarshal:\n"+a.toString())}}}]),e}(),p=function(e){"use strict";u(n,e);var i=v(n);function n(e,t,r,s){var a;return h(this,n),a=i.call(this,e,t,r,s),a._sliceType=l.NoSlice,a}return f(n,[{key:"readValue",value:function(e){t.assert(null!==e);var i=this._stream.readInt();if(i>0)throw new Ice.MarshalException("invalid object id");i=-i,0===i?e(null):this.addPatchEntry(i,e)}},{key:"throwException",value:function(){t.assert(this._sliceType===l.NoSlice);var e=this._stream.readBool();this._sliceType=l.ExceptionSlice,this._skipFirstSlice=!1,this.startSlice();var i=this._typeId;while(1){var n=this._stream.createUserException(this._typeId);if(null!==n)throw n._read(this._stream),e&&this.readPendingValues(),n;this.skipSlice();try{this.startSlice()}catch(r){throw r instanceof Ice.UnmarshalOutOfBoundsException&&(r.reason="unknown exception type `"+i+"'"),r}}}},{key:"startInstance",value:function(e){t.assert(this._sliceType===e),this._skipFirstSlice=!0}},{key:"endInstance",value:function(e){if(this._sliceType===l.ValueSlice){this.startSlice();var t=this._stream.readSize();if(0!==t)throw new Ice.MarshalException("invalid Object slice");this.endSlice()}return this._sliceType=l.NoSlice,null}},{key:"startSlice",value:function(){if(this._skipFirstSlice)return this._skipFirstSlice=!1,this._typeId;if(this._sliceType===l.ValueSlice){var e=this._stream.readBool();this._typeId=this.readTypeId(e)}else this._typeId=this._stream.readString();if(this._sliceSize=this._stream.readInt(),this._sliceSize<4)throw new Ice.UnmarshalOutOfBoundsException;return this._typeId}},{key:"endSlice",value:function(){}},{key:"skipSlice",value:function(){this._stream.traceSkipSlice(this._typeId,this._sliceType),t.assert(this._sliceSize>=4),this._stream.skip(this._sliceSize-4)}},{key:"readPendingValues",value:function(){var e;do{e=this._stream.readSize();for(var t=e;t>0;--t)this.readInstance()}while(e>0);if(null!==this._patchMap&&0!==this._patchMap.size)throw new Ice.MarshalException("index for class received, but no instance")}},{key:"readInstance",value:function(){var e=this._stream.readInt(),t=null;if(e<=0)throw new Ice.MarshalException("invalid object id");this._sliceType=l.ValueSlice,this._skipFirstSlice=!1,this.startSlice();var i=this._typeId;while(1){if(this._typeId==Ice.Value.ice_staticId())throw new Ice.NoValueFactoryException("",i);if(t=this.newInstance(this._typeId),t)break;if(!this._sliceValues)throw new Ice.NoValueFactoryException("no value factory found and slicing is disabled",this._typeId);this.skipSlice(),this.startSlice()}this.unmarshal(e,t)}}]),n}(g),m=function(e){"use strict";u(n,e);var i=v(n);function n(e,t,r,s,a){var o;return h(this,n),o=i.call(this,e,t,r,s),o._compactIdResolver=a,o._current=null,o._valueIdIndex=1,o}return f(n,[{key:"readValue",value:function(e){var t=this._stream.readSize();if(t<0)throw new Ice.MarshalException("invalid object id");0===t?null!==e&&e(null):null!==this._current&&0!==(this._current.sliceFlags&s.FLAG_HAS_INDIRECTION_TABLE)?null!==e&&(null===this._current.indirectPatchList&&(this._current.indirectPatchList=[]),this._current.indirectPatchList.push(new d(t-1,e))):this.readInstance(t,e)}},{key:"throwException",value:function(){t.assert(null===this._current),this.push(l.ExceptionSlice),this.startSlice();var e=this._current.typeId;while(1){var i=this._stream.createUserException(this._current.typeId);if(null!==i)throw i._read(this._stream),i;if(this.skipSlice(),0!==(this._current.sliceFlags&s.FLAG_IS_LAST_SLICE)){if(0===e.indexOf("::"))throw new Ice.UnknownUserException(e.substr(2));throw new Ice.UnknownUserException(e)}this.startSlice()}}},{key:"startInstance",value:function(e){t.assert(void 0!==e),t.assert(null!==this._current.sliceType&&this._current.sliceType===e),this._current.skipFirstSlice=!0}},{key:"endInstance",value:function(e){var t=null;return e&&(t=this.readSlicedData()),null!==this._current.slices&&(this._current.slices.length=0,this._current.indirectionTables.length=0),this._current=this._current.previous,t}},{key:"startSlice",value:function(){if(this._current.skipFirstSlice)return this._current.skipFirstSlice=!1,this._current.typeId;if(this._current.sliceFlags=this._stream.readByte(),this._current.sliceType===l.ValueSlice?(this._current.sliceFlags&s.FLAG_HAS_TYPE_ID_COMPACT)===s.FLAG_HAS_TYPE_ID_COMPACT?(this._current.typeId="",this._current.compactId=this._stream.readSize()):0!==(this._current.sliceFlags&(s.FLAG_HAS_TYPE_ID_INDEX|s.FLAG_HAS_TYPE_ID_STRING))?(this._current.typeId=this.readTypeId(0!==(this._current.sliceFlags&s.FLAG_HAS_TYPE_ID_INDEX)),this._current.compactId=-1):(this._current.typeId="",this._current.compactId=-1):(this._current.typeId=this._stream.readString(),this._current.compactId=-1),0!==(this._current.sliceFlags&s.FLAG_HAS_SLICE_SIZE)){if(this._current.sliceSize=this._stream.readInt(),this._current.sliceSize<4)throw new Ice.UnmarshalOutOfBoundsException}else this._current.sliceSize=0;return this._current.typeId}},{key:"endSlice",value:function(){var e=this;if(0!==(this._current.sliceFlags&s.FLAG_HAS_OPTIONAL_MEMBERS)&&this._stream.skipOptionals(),0!==(this._current.sliceFlags&s.FLAG_HAS_INDIRECTION_TABLE)){for(var i=[],n=this._stream.readAndCheckSeqSize(1),r=0;r<n;++r)i[r]=this.readInstance(this._stream.readSize(),null);if(0===i.length)throw new Ice.MarshalException("empty indirection table");if((null===this._current.indirectPatchList||0===this._current.indirectPatchList.length)&&0===(this._current.sliceFlags&s.FLAG_HAS_OPTIONAL_MEMBERS))throw new Ice.MarshalException("no references to indirection table");null!==this._current.indirectPatchList&&(this._current.indirectPatchList.forEach((function(n){if(t.assert(n.index>=0),n.index>=i.length)throw new Ice.MarshalException("indirection out of range");e.addPatchEntry(i[n.index],n.cb)})),this._current.indirectPatchList.length=0)}}},{key:"skipSlice",value:function(){this._stream.traceSkipSlice(this._current.typeId,this._current.sliceType);var e=this._stream.pos;if(0===(this._current.sliceFlags&s.FLAG_HAS_SLICE_SIZE))throw this._current.sliceType===l.ValueSlice?new Ice.NoValueFactoryException("no value factory found and compact format prevents slicing (the sender should use the sliced format instead)",this._current.typeId):0===this._current.typeId.indexOf("::")?new Ice.UnknownUserException(this._current.typeId.substring(2)):new Ice.UnknownUserException(this._current.typeId);t.assert(this._current.sliceSize>=4),this._stream.skip(this._current.sliceSize-4);var i=new Ice.SliceInfo;i.typeId=this._current.typeId,i.compactId=this._current.compactId,i.hasOptionalMembers=0!==(this._current.sliceFlags&s.FLAG_HAS_OPTIONAL_MEMBERS),i.isLastSlice=0!==(this._current.sliceFlags&s.FLAG_IS_LAST_SLICE);var n=this._stream._buf,r=n.position,a=r;if(i.hasOptionalMembers&&--a,n.position=e,i.bytes=n.getArray(a-e),n.position=r,null===this._current.slices&&(this._current.slices=[],this._current.indirectionTables=[]),0!==(this._current.sliceFlags&s.FLAG_HAS_INDIRECTION_TABLE)){for(var o=this._stream.readAndCheckSeqSize(1),c=[],u=0;u<o;++u)c[u]=this.readInstance(this._stream.readSize(),null);this._current.indirectionTables.push(c)}else this._current.indirectionTables.push(null);this._current.slices.push(i)}},{key:"readOptional",value:function(e,t){return(null===this._current||0!==(this._current.sliceFlags&s.FLAG_HAS_OPTIONAL_MEMBERS))&&this._stream.readOptImpl(e,t)}},{key:"readInstance",value:function(e,i){t.assert(e>0);var n=null;if(e>1)return null!==i&&this.addPatchEntry(e,i),e;this.push(l.ValueSlice),e=++this._valueIdIndex,this.startSlice();var r=this._current.typeId;while(1){if(this._current.compactId>=0){if(this._current.typeId="",null!==this._compactIdResolver)try{this._current.typeId=this._compactIdResolver.call(null,this._current.compactId)}catch(a){if(!(a instanceof Ice.LocalException))throw new Ice.MarshalException("exception in CompactIdResolver for ID "+this._current.compactId,a);throw a}0===this._current.typeId.length&&(this._current.typeId=this._stream.resolveCompactId(this._current.compactId))}if(this._current.typeId.length>0&&(n=this.newInstance(this._current.typeId)),null!==n&&void 0!==n)break;if(!this._sliceValues)throw new Ice.NoValueFactoryException("no value factory found and slicing is disabled",this._current.typeId);if(this.skipSlice(),0!==(this._current.sliceFlags&s.FLAG_IS_LAST_SLICE)){n=new Ice.UnknownSlicedValue(r);break}this.startSlice()}if(this.unmarshal(e,n),null===this._current&&null!==this._patchMap&&0!==this._patchMap.size)throw new Ice.MarshalException("index for class received, but no instance");return null!==i&&i(n),e}},{key:"readSlicedData",value:function(){if(null===this._current.slices)return null;t.assert(this._current.slices.length===this._current.indirectionTables.length);for(var e=0;e<this._current.slices.length;++e){var i=this._current.indirectionTables[e],n=this._current.slices[e];if(n.instances=[],i)for(var r=0;r<i.length;++r)this.addPatchEntry(i[r],y(n.instances,r,Ice.Value))}return new c(o.clone(this._current.slices))}},{key:"push",value:function(e){null===this._current?this._current=new n.InstanceData(null):this._current=this._current.next?this._current.next:new n.InstanceData(this._current),this._current.sliceType=e,this._current.skipFirstSlice=!1}}]),n}(g);m.InstanceData=function(){"use strict";return f((function e(t){h(this,e),null!==t&&(t.next=this),this.previous=t,this.next=null,this.sliceType=null,this.skipFirstSlice=!1,this.slices=null,this.indirectionTables=null,this.sliceFlags=0,this.sliceSize=0,this.typeId=null,this.compactId=0,this.indirectPatchList=null}))}();var y=function(e,t,n){return function(r){null===r||r instanceof n||i.throwUOE(n.ice_staticId(),r),e[t]=r}},_=function(){"use strict";function e(){h(this,e),this.start=0,this.sz=0,this.encoding=null,this.encoding_1_0=!1,this.decoder=null,this.next=null}return f(e,[{key:"reset",value:function(){this.decoder=null}},{key:"setEncoding",value:function(e){this.encoding=e,this.encoding_1_0=e.equals(Ice.Encoding_1_0)}}]),e}(),S=function(){"use strict";function n(e,t,i){h(this,n);var r={instance:null,encoding:null,bytes:null,buffer:null};this._checkArgs([e,t,i],r),this._initialize(r)}return f(n,[{key:"_checkArgs",value:function(e,t){if(e.forEach((function(e){if(null!==e&&void 0!==e)if(e.constructor===Ice.Communicator)t.instance=e.instance;else if(e.constructor===Ice.Instance)t.instance=e;else if(e.constructor===Ice.EncodingVersion)t.encoding=e;else if(e.constructor===Ice.Buffer)t.buffer=e;else if(e.constructor===ArrayBuffer)t.bytes=e;else{if(e.constructor!==Uint8Array)throw new Ice.InitializationException("unknown argument to InputStream constructor");t.bytes=e.buffer}})),null!==t.buffer&&null!==t.bytes)throw new Ice.InitializationException("invalid argument to InputStream constructor")}},{key:"_initialize",value:function(e){this._instance=e.instance,this._encoding=e.encoding,this._encapsStack=null,this._encapsCache=null,this._closure=null,this._sliceValues=!0,this._startSeq=-1,this._sizePos=-1,this._compactIdResolver=null,null!==this._instance?(null===this._encoding&&(this._encoding=this._instance.defaultsAndOverrides().defaultEncoding),this._traceSlicing=this._instance.traceLevels().slicing>0,this._valueFactoryManager=this._instance.initializationData().valueFactoryManager,this._logger=this._instance.initializationData().logger):(null===this._encoding&&(this._encoding=s.currentEncoding),this._traceSlicing=!1,this._valueFactoryManager=null,this._logger=null),null!==e.bytes?this._buf=new Ice.Buffer(e.bytes):null!==e.buffer?this._buf=e.buffer:this._buf=new Ice.Buffer}},{key:"reset",value:function(){this._buf.reset(),this.clear()}},{key:"clear",value:function(){null!==this._encapsStack&&(t.assert(null===this._encapsStack.next),this._encapsStack.next=this._encapsCache,this._encapsCache=this._encapsStack,this._encapsCache.reset(),this._encapsStack=null),this._startSeq=-1,this._sliceValues=!0}},{key:"swap",value:function(e){t.assert(this._instance===e._instance);var i=[this._buf,e._buf];e._buf=i[0],this._buf=i[1];var n=[this._encoding,e._encoding];e._encoding=n[0],this._encoding=n[1];var r=[this._traceSlicing,e._traceSlicing];e._traceSlicing=r[0],this._traceSlicing=r[1];var s=[this._closure,e.closure];e._closure=s[0],this._closure=s[1];var a=[this._sliceValues,e._sliceValues];e._sliceValues=a[0],this._sliceValues=a[1],this.resetEncapsulation(),e.resetEncapsulation();var o=[this._startSeq,e._startSeq];e._startSeq=o[0],this._startSeq=o[1];var c=[this._minSeqSize,e._minSeqSize];e._minSeqSize=c[0],this._minSeqSize=c[1];var u=[this._sizePos,e._sizePos];e._sizePos=u[0],this._sizePos=u[1];var l=[this._valueFactoryManager,e._valueFactoryManager];e._valueFactoryManager=l[0],this._valueFactoryManager=l[1];var d=[this._logger,e._logger];e._logger=d[0],this._logger=d[1];var h=[this._compactIdResolver,e._compactIdResolver];e._compactIdResolver=h[0],this._compactIdResolver=h[1]}},{key:"resetEncapsulation",value:function(){this._encapsStack=null}},{key:"resize",value:function(e){this._buf.resize(e),this._buf.position=e}},{key:"startValue",value:function(){t.assert(null!==this._encapsStack&&null!==this._encapsStack.decoder),this._encapsStack.decoder.startInstance(l.ValueSlice)}},{key:"endValue",value:function(e){return t.assert(null!==this._encapsStack&&null!==this._encapsStack.decoder),this._encapsStack.decoder.endInstance(e)}},{key:"startException",value:function(){t.assert(null!==this._encapsStack&&null!==this._encapsStack.decoder),this._encapsStack.decoder.startInstance(l.ExceptionSlice)}},{key:"endException",value:function(e){return t.assert(null!==this._encapsStack&&null!==this._encapsStack.decoder),this._encapsStack.decoder.endInstance(e)}},{key:"startEncapsulation",value:function(){var e=this._encapsCache;null!==e?(e.reset(),this._encapsCache=this._encapsCache.next):e=new _,e.next=this._encapsStack,this._encapsStack=e,this._encapsStack.start=this._buf.position;var t=this.readInt();if(t<6)throw new Ice.UnmarshalOutOfBoundsException;if(t-4>this._buf.remaining)throw new Ice.UnmarshalOutOfBoundsException;this._encapsStack.sz=t;var i=new Ice.EncodingVersion;return i._read(this),s.checkSupportedEncoding(i),this._encapsStack.setEncoding(i),i}},{key:"endEncapsulation",value:function(){if(t.assert(null!==this._encapsStack),this._encapsStack.encoding_1_0){if(this._buf.position!==this._encapsStack.start+this._encapsStack.sz){if(this._buf.position+1!==this._encapsStack.start+this._encapsStack.sz)throw new Ice.EncapsulationException;try{this._buf.get()}catch(i){throw new Ice.UnmarshalOutOfBoundsException}}}else if(this.skipOptionals(),this._buf.position!==this._encapsStack.start+this._encapsStack.sz)throw new Ice.EncapsulationException;var e=this._encapsStack;this._encapsStack=e.next,e.next=this._encapsCache,this._encapsCache=e,this._encapsCache.reset()}},{key:"skipEmptyEncapsulation",value:function(){var e=this.readInt();if(e<6)throw new Ice.EncapsulationException;if(e-4>this._buf.remaining)throw new Ice.UnmarshalOutOfBoundsException;var t=new Ice.EncodingVersion;if(t._read(this),s.checkSupportedEncoding(t),t.equals(Ice.Encoding_1_0)){if(6!=e)throw new Ice.EncapsulationException}else this._buf.position=this._buf.position+e-6;return t}},{key:"readEncapsulation",value:function(e){t.assert(void 0!==e);var i=this.readInt();if(i<6)throw new Ice.UnmarshalOutOfBoundsException;if(i-4>this._buf.remaining)throw new Ice.UnmarshalOutOfBoundsException;null!==e?(e._read(this),this._buf.position=this._buf.position-6):this._buf.position=this._buf.position-4;try{return this._buf.getArray(i)}catch(n){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"getEncoding",value:function(){return null!==this._encapsStack?this._encapsStack.encoding:this._encoding}},{key:"getEncapsulationSize",value:function(){return t.assert(null!==this._encapsStack),this._encapsStack.sz-6}},{key:"skipEncapsulation",value:function(){var e=this.readInt();if(e<6)throw new Ice.UnmarshalOutOfBoundsException;var t=new Ice.EncodingVersion;t._read(this);try{this._buf.position=this._buf.position+e-6}catch(i){throw new Ice.UnmarshalOutOfBoundsException}return t}},{key:"startSlice",value:function(){return t.assert(null!==this._encapsStack&&null!==this._encapsStack.decoder),this._encapsStack.decoder.startSlice()}},{key:"endSlice",value:function(){t.assert(null!==this._encapsStack&&null!==this._encapsStack.decoder),this._encapsStack.decoder.endSlice()}},{key:"skipSlice",value:function(){t.assert(null!==this._encapsStack&&null!==this._encapsStack.decoder),this._encapsStack.decoder.skipSlice()}},{key:"readPendingValues",value:function(){null!==this._encapsStack&&null!==this._encapsStack.decoder?this._encapsStack.decoder.readPendingValues():(null!==this._encapsStack&&this._encapsStack.encoding_1_0||null===this._encapsStack&&this._encoding.equals(Ice.Encoding_1_0))&&this.skipSize()}},{key:"readSize",value:function(){try{var e=this._buf.get();if(255===e){var t=this._buf.getInt();if(t<0)throw new Ice.UnmarshalOutOfBoundsException;return t}return e}catch(i){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readAndCheckSeqSize",value:function(e){var t=this.readSize();if(0===t)return t;if(-1===this._startSeq||this._buf.position>this._startSeq+this._minSeqSize?(this._startSeq=this._buf.position,this._minSeqSize=t*e):this._minSeqSize+=t*e,this._startSeq+this._minSeqSize>this._buf.limit)throw new Ice.UnmarshalOutOfBoundsException;return t}},{key:"readBlob",value:function(e){if(this._buf.remaining<e)throw new Ice.UnmarshalOutOfBoundsException;try{return this._buf.getArray(e)}catch(t){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readOptional",value:function(e,i){return t.assert(null!==this._encapsStack),null!==this._encapsStack.decoder?this._encapsStack.decoder.readOptional(e,i):this.readOptImpl(e,i)}},{key:"readOptionalHelper",value:function(e,t,i){return this.readOptional(e,t)?i.call(this):void 0}},{key:"readByte",value:function(){try{return this._buf.get()}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readByteSeq",value:function(){return this._buf.getArray(this.readAndCheckSeqSize(1))}},{key:"readBool",value:function(){try{return 1===this._buf.get()}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readShort",value:function(){try{return this._buf.getShort()}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readInt",value:function(){try{return this._buf.getInt()}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readLong",value:function(){try{return this._buf.getLong()}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readFloat",value:function(){try{return this._buf.getFloat()}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readDouble",value:function(){try{return this._buf.getDouble()}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readString",value:function(){var e=this.readSize();if(0===e)return"";if(this._buf.remaining<e)throw new Ice.UnmarshalOutOfBoundsException;try{return this._buf.getString(e)}catch(t){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readProxy",value:function(e){return this._instance.proxyFactory().streamToProxy(this,e)}},{key:"readOptionalProxy",value:function(e,t){return this.readOptional(e,r.FSize)?(this.skip(4),this.readProxy(t)):void 0}},{key:"readEnum",value:function(e){var t;t=this.getEncoding().equals(Ice.Encoding_1_0)?e.maxValue<127?this.readByte():e.maxValue<32767?this.readShort():this.readInt():this.readSize();var i=e.valueOf(t);if(void 0===i)throw new Ice.MarshalException("enumerator value "+t+" is out of range");return i}},{key:"readOptionalEnum",value:function(e,t){return this.readOptional(e,r.Size)?this.readEnum(t):void 0}},{key:"readValue",value:function(e,t){this.initEncaps(),this._encapsStack.decoder.readValue(null===e?null:function(n){null===n||n instanceof t||i.throwUOE(t.ice_staticId(),n),e(n)})}},{key:"readOptionalValue",value:function(e,t,i){this.readOptional(e,r.Class)?this.readValue(t,i):t(void 0)}},{key:"throwException",value:function(){this.initEncaps(),this._encapsStack.decoder.throwException()}},{key:"readOptImpl",value:function(e,t){if(this.isEncoding_1_0())return!1;while(1){if(this._buf.position>=this._encapsStack.start+this._encapsStack.sz)return!1;var i=this.readByte();if(i===s.OPTIONAL_END_MARKER)return this._buf.position-=1,!1;var n=r.valueOf(7&i),a=i>>3;if(30===a&&(a=this.readSize()),a>e){var o=a<30?1:a<255?2:6;return this._buf.position-=o,!1}if(!(a<e)){if(n!==t)throw new Ice.MarshalException("invalid optional data member `"+a+"': unexpected format");return!0}this.skipOptional(n)}}},{key:"skipOptional",value:function(e){switch(e){case r.F1:this.skip(1);break;case r.F2:this.skip(2);break;case r.F4:this.skip(4);break;case r.F8:this.skip(8);break;case r.Size:this.skipSize();break;case r.VSize:this.skip(this.readSize());break;case r.FSize:this.skip(this.readInt());break;case r.Class:this.readValue(null,Ice.Value);break;default:t.assert(!1);break}}},{key:"skipOptionals",value:function(){while(1){if(this._buf.position>=this._encapsStack.start+this._encapsStack.sz)return;var e=this.readByte(),t=e<0?e+256:e;if(t===s.OPTIONAL_END_MARKER)return;var i=r.valueOf(7&t);t>>3===30&&this.skipSize(),this.skipOptional(i)}}},{key:"skip",value:function(e){if(e>this._buf.remaining)throw new Ice.UnmarshalOutOfBoundsException;this._buf.position+=e}},{key:"skipSize",value:function(){var e=this.readByte();255===e&&this.skip(4)}},{key:"isEmpty",value:function(){return this._buf.empty()}},{key:"expand",value:function(e){this._buf.expand(e)}},{key:"createInstance",value:function(t){var i=null;try{var n=t.length>2?t.substr(2).replace(/::/g,"."):"",r=e.type(n);void 0!==r&&(i=new r)}catch(s){throw new Ice.NoValueFactoryException("no value factory",t,s)}return i}},{key:"createUserException",value:function(t){var i=null;try{var n=t.length>2?t.substr(2).replace(/::/g,"."):"",r=e.type(n);void 0!==r&&(i=new r)}catch(s){throw new Ice.MarshalException(s)}return i}},{key:"resolveCompactId",value:function(e){var t=Ice.CompactIdRegistry.get(e);return void 0===t?"":t}},{key:"isEncoding_1_0",value:function(){return null!==this._encapsStack?this._encapsStack.encoding_1_0:this._encoding.equals(Ice.Encoding_1_0)}},{key:"initEncaps",value:function(){null===this._encapsStack&&(this._encapsStack=this._encapsCache,null!==this._encapsStack?this._encapsCache=this._encapsCache.next:this._encapsStack=new _,this._encapsStack.setEncoding(this._encoding),this._encapsStack.sz=this._buf.limit),null===this._encapsStack.decoder&&(this._encapsStack.encoding_1_0?this._encapsStack.decoder=new p(this,this._encapsStack,this._sliceValues,this._valueFactoryManager):this._encapsStack.decoder=new m(this,this._encapsStack,this._sliceValues,this._valueFactoryManager,this._compactIdResolver))}},{key:"traceSkipSlice",value:function(e,t){this._traceSlicing&&null!==this._logger&&a.traceSlicing(t===l.ExceptionSlice?"exception":"object",e,"Slicing",this._logger)}},{key:"valueFactoryManager",get:function(){return this._valueFactoryManager},set:function(e){this._valueFactoryManager=void 0!==e?e:null}},{key:"logger",get:function(){return this._logger},set:function(e){this._logger=void 0!==e?e:null}},{key:"compactIdResolver",get:function(){return this._compactIdResolver},set:function(e){this._compactIdResolver=void 0!==e?e:null}},{key:"sliceValues",get:function(){return this._sliceValues},set:function(e){this._sliceValues=e}},{key:"traceSlicing",get:function(){return this._traceSlicing},set:function(e){this._traceSlicing=e}},{key:"pos",get:function(){return this._buf.position},set:function(e){this._buf.position=e}},{key:"size",get:function(){return this._buf.limit}},{key:"instance",get:function(){return this._instance}},{key:"closure",get:function(){return this._type},set:function(e){this._type=e}},{key:"buffer",get:function(){return this._buf}}]),n}(),I=function(){"use strict";function e(t,i){h(this,e),this._stream=t,this._encaps=i,this._marshaledMap=new Map,this._typeIdMap=null,this._typeIdIndex=0}return f(e,[{key:"writeOptional",value:function(){return!1}},{key:"writePendingValues",value:function(){}},{key:"registerTypeId",value:function(e){null===this._typeIdMap&&(this._typeIdMap=new Map);var t=this._typeIdMap.get(e);return void 0!==t?t:(this._typeIdMap.set(e,++this._typeIdIndex),-1)}}]),e}(),w=function(e){"use strict";u(n,e);var i=v(n);function n(e,t){var r;return h(this,n),r=i.call(this,e,t),r._sliceType=l.NoSlice,r._writeSlice=0,r._valueIdIndex=0,r._toBeMarshaledMap=new Map,r}return f(n,[{key:"writeValue",value:function(e){t.assert(void 0!==e),null!==e?this._stream.writeInt(-this.registerValue(e)):this._stream.writeInt(0)}},{key:"writeException",value:function(e){t.assert(null!==e&&void 0!==e);var i=e._usesClasses();this._stream.writeBool(i),e._write(this._stream),i&&this.writePendingValues()}},{key:"startInstance",value:function(e){this._sliceType=e}},{key:"endInstance",value:function(){this._sliceType===l.ValueSlice&&(this.startSlice(Ice.Value.ice_staticId(),-1,!0),this._stream.writeSize(0),this.endSlice()),this._sliceType=l.NoSlice}},{key:"startSlice",value:function(e){if(this._sliceType===l.ValueSlice){var t=this.registerTypeId(e);t<0?(this._stream.writeBool(!1),this._stream.writeString(e)):(this._stream.writeBool(!0),this._stream.writeSize(t))}else this._stream.writeString(e);this._stream.writeInt(0),this._writeSlice=this._stream.pos}},{key:"endSlice",value:function(){var e=this._stream.pos-this._writeSlice+4;this._stream.rewriteInt(e,this._writeSlice-4)}},{key:"writePendingValues",value:function(){var e=this,t=function(t,i){e._stream.writeInt(t);try{i.ice_preMarshal()}catch(n){e._stream.instance.initializationData().logger.warning("exception raised by ice_preMarshal:\n"+n.toString())}i._iceWrite(e._stream)};while(this._toBeMarshaledMap.size>0){this._toBeMarshaledMap.forEach((function(t,i){return e._marshaledMap.set(i,t)}));var i=this._toBeMarshaledMap;this._toBeMarshaledMap=new Map,this._stream.writeSize(i.size),i.forEach(t)}this._stream.writeSize(0)}},{key:"registerValue",value:function(e){t.assert(null!==e);var i=this._toBeMarshaledMap.get(e);return void 0!==i?i:(i=this._marshaledMap.get(e),void 0!==i?i:(this._toBeMarshaledMap.set(e,++this._valueIdIndex),this._valueIdIndex))}}]),n}(I),k=function(e){"use strict";u(r,e);var i=v(r);function r(e,t){var n;return h(this,r),n=i.call(this,e,t),n._current=null,n._valueIdIndex=1,n}return f(r,[{key:"writeValue",value:function(e){if(t.assert(void 0!==e),null===e)this._stream.writeSize(0);else if(null!==this._current&&this._encaps.format===n.SlicedFormat){null===this._current.indirectionTable&&(this._current.indirectionTable=[],this._current.indirectionMap=new Map);var i=this._current.indirectionMap.get(e);if(void 0===i){this._current.indirectionTable.push(e);var r=this._current.indirectionTable.length;this._current.indirectionMap.set(e,r),this._stream.writeSize(r)}else this._stream.writeSize(i)}else this.writeInstance(e)}},{key:"writePendingValues",value:function(){}},{key:"writeException",value:function(e){t.assert(null!==e&&void 0!==e),e._write(this._stream)}},{key:"startInstance",value:function(e,t){null===this._current?this._current=new r.InstanceData(null):this._current=null===this._current.next?new r.InstanceData(this._current):this._current.next,this._current.sliceType=e,this._current.firstSlice=!0,null!==t&&void 0!==t&&this.writeSlicedData(t)}},{key:"endInstance",value:function(){this._current=this._current.previous}},{key:"startSlice",value:function(e,i,r){if(t.assert((null===this._current.indirectionTable||0===this._current.indirectionTable.length)&&(null===this._current.indirectionMap||0===this._current.indirectionMap.size)),this._current.sliceFlagsPos=this._stream.pos,this._current.sliceFlags=0,this._encaps.format===n.SlicedFormat&&(this._current.sliceFlags|=s.FLAG_HAS_SLICE_SIZE),r&&(this._current.sliceFlags|=s.FLAG_IS_LAST_SLICE),this._stream.writeByte(0),this._current.sliceType===l.ValueSlice){if(this._encaps.format===n.SlicedFormat||this._current.firstSlice)if(i>=0)this._current.sliceFlags|=s.FLAG_HAS_TYPE_ID_COMPACT,this._stream.writeSize(i);else{var a=this.registerTypeId(e);a<0?(this._current.sliceFlags|=s.FLAG_HAS_TYPE_ID_STRING,this._stream.writeString(e)):(this._current.sliceFlags|=s.FLAG_HAS_TYPE_ID_INDEX,this._stream.writeSize(a))}}else this._stream.writeString(e);0!==(this._current.sliceFlags&s.FLAG_HAS_SLICE_SIZE)&&this._stream.writeInt(0),this._current.writeSlice=this._stream.pos,this._current.firstSlice=!1}},{key:"endSlice",value:function(){var e=this;if(0!==(this._current.sliceFlags&s.FLAG_HAS_OPTIONAL_MEMBERS)&&this._stream.writeByte(s.OPTIONAL_END_MARKER),0!==(this._current.sliceFlags&s.FLAG_HAS_SLICE_SIZE)){var i=this._stream.pos-this._current.writeSlice+4;this._stream.rewriteInt(i,this._current.writeSlice-4)}null!==this._current.indirectionTable&&0!==this._current.indirectionTable.length&&(t.assert(this._encaps.format===n.SlicedFormat),this._current.sliceFlags|=s.FLAG_HAS_INDIRECTION_TABLE,this._stream.writeSize(this._current.indirectionTable.length),this._current.indirectionTable.forEach((function(t){return e.writeInstance(t)})),this._current.indirectionTable.length=0,this._current.indirectionMap.clear()),this._stream.rewriteByte(this._current.sliceFlags,this._current.sliceFlagsPos)}},{key:"writeOptional",value:function(e,t){return null===this._current?this._stream.writeOptImpl(e,t):!!this._stream.writeOptImpl(e,t)&&(this._current.sliceFlags|=s.FLAG_HAS_OPTIONAL_MEMBERS,!0)}},{key:"writeSlicedData",value:function(e){var i=this;t.assert(null!==e&&void 0!==e),this._encaps.format===n.SlicedFormat&&e.slices.forEach((function(e){i.startSlice(e.typeId,e.compactId,e.isLastSlice),i._stream.writeBlob(e.bytes),e.hasOptionalMembers&&(i._current.sliceFlags|=s.FLAG_HAS_OPTIONAL_MEMBERS),null!==e.instances&&e.instances.length>0&&(null===i._current.indirectionTable&&(i._current.indirectionTable=[],i._current.indirectionMap=new Map),e.instances.forEach((function(e){return i._current.indirectionTable.push(e)}))),i.endSlice()}))}},{key:"writeInstance",value:function(e){t.assert(null!==e&&void 0!==e);var i=this._marshaledMap.get(e);if(void 0===i){this._marshaledMap.set(e,++this._valueIdIndex);try{e.ice_preMarshal()}catch(n){this._stream.instance.initializationData().logger.warning("exception raised by ice_preMarshal:\n"+n.toString())}this._stream.writeSize(1),e._iceWrite(this._stream)}else this._stream.writeSize(i)}}]),r}(I);k.InstanceData=function(){"use strict";return f((function e(i){h(this,e),t.assert(void 0!==i),null!==i&&(i.next=this),this.previous=i,this.next=null,this.sliceType=null,this.firstSlice=!1,this.sliceFlags=0,this.writeSlice=0,this.sliceFlagsPos=0,this.indirectionTable=null,this.indirectionMap=null}))}();var C=function(){"use strict";function e(){h(this,e),this.start=0,this.format=n.DefaultFormat,this.encoding=null,this.encoding_1_0=!1,this.encoder=null,this.next=null}return f(e,[{key:"reset",value:function(){this.encoder=null}},{key:"setEncoding",value:function(e){this.encoding=e,this.encoding_1_0=e.equals(Ice.Encoding_1_0)}}]),e}(),b=function(){"use strict";function e(t,i){if(h(this,e),this._instance=null,this._encoding=null,void 0!==t&&null!==t)if(t.constructor==Ice.Communicator)this._instance=t.instance;else if(t.constructor==Ice.Instance)this._instance=t;else{if(t.constructor!=Ice.EncodingVersion)throw new Ice.InitializationException("unknown argument to OutputStream constructor");this._encoding=t}if(void 0!==i&&null!==i){if(i.constructor!=Ice.EncodingVersion)throw new Ice.InitializationException("unknown argument to OutputStream constructor");this._encoding=i}this._buf=new Ice.Buffer,this._closure=null,this._encapsStack=null,this._encapsCache=null,null!==this._instance?(null===this._encoding&&(this._encoding=this._instance.defaultsAndOverrides().defaultEncoding),this._format=this._instance.defaultsAndOverrides().defaultFormat):(null===this._encoding&&(this._encoding=s.currentEncoding),this._format=n.CompactFormat)}return f(e,[{key:"reset",value:function(){this._buf.reset(),this.clear()}},{key:"clear",value:function(){null!==this._encapsStack&&(t.assert(this._encapsStack.next),this._encapsStack.next=this._encapsCache,this._encapsCache=this._encapsStack,this._encapsCache.reset(),this._encapsStack=null)}},{key:"finished",value:function(){return this.prepareWrite().getArray(this.size)}},{key:"swap",value:function(e){t.assert(this._instance===e._instance);var i=[this._buf,e._buf];e._buf=i[0],this._buf=i[1];var n=[this._encoding,e._encoding];e._encoding=n[0],this._encoding=n[1];var r=[this._closure,e._closure];e._closure=r[0],this._closure=r[1],this.resetEncapsulation(),e.resetEncapsulation()}},{key:"resetEncapsulation",value:function(){this._encapsStack=null}},{key:"resize",value:function(e){this._buf.resize(e),this._buf.position=e}},{key:"prepareWrite",value:function(){return this._buf.position=0,this._buf}},{key:"startValue",value:function(e){t.assert(null!==this._encapsStack&&null!==this._encapsStack.encoder),this._encapsStack.encoder.startInstance(l.ValueSlice,e)}},{key:"endValue",value:function(){t.assert(null!==this._encapsStack&&null!==this._encapsStack.encoder),this._encapsStack.encoder.endInstance()}},{key:"startException",value:function(e){t.assert(null!==this._encapsStack&&null!==this._encapsStack.encoder),this._encapsStack.encoder.startInstance(l.ExceptionSlice,e)}},{key:"endException",value:function(){t.assert(null!==this._encapsStack&&null!==this._encapsStack.encoder),this._encapsStack.encoder.endInstance()}},{key:"startEncapsulation",value:function(e,t){void 0===e&&(null!==this._encapsStack?(e=this._encapsStack.encoding,t=this._encapsStack.format):(e=this._encoding,t=n.DefaultFormat)),s.checkSupportedEncoding(e);var i=this._encapsCache;null!==i?(i.reset(),this._encapsCache=this._encapsCache.next):i=new C,i.next=this._encapsStack,this._encapsStack=i,this._encapsStack.format=t,this._encapsStack.setEncoding(e),this._encapsStack.start=this._buf.limit,this.writeInt(0),this._encapsStack.encoding._write(this)}},{key:"endEncapsulation",value:function(){t.assert(this._encapsStack);var e=this._encapsStack.start,i=this._buf.limit-e;this._buf.putIntAt(e,i);var n=this._encapsStack;this._encapsStack=n.next,n.next=this._encapsCache,this._encapsCache=n,this._encapsCache.reset()}},{key:"writeEmptyEncapsulation",value:function(e){s.checkSupportedEncoding(e),this.writeInt(6),e._write(this)}},{key:"writeEncapsulation",value:function(e){if(e.length<6)throw new Ice.EncapsulationException;this.expand(e.length),this._buf.putArray(e)}},{key:"getEncoding",value:function(){return null!==this._encapsStack?this._encapsStack.encoding:this._encoding}},{key:"startSlice",value:function(e,i,n){t.assert(null!==this._encapsStack&&null!==this._encapsStack.encoder),this._encapsStack.encoder.startSlice(e,i,n)}},{key:"endSlice",value:function(){t.assert(null!==this._encapsStack&&null!==this._encapsStack.encoder),this._encapsStack.encoder.endSlice()}},{key:"writePendingValues",value:function(){null!==this._encapsStack&&null!==this._encapsStack.encoder?this._encapsStack.encoder.writePendingValues():(null!==this._encapsStack&&this._encapsStack.encoding_1_0||null===this._encapsStack&&this._encoding.equals(Ice.Encoding_1_0))&&this.writeSize(0)}},{key:"writeSize",value:function(e){e>254?(this.expand(5),this._buf.put(255),this._buf.putInt(e)):(this.expand(1),this._buf.put(e))}},{key:"startSize",value:function(){var e=this._buf.position;return this.writeInt(0),e}},{key:"endSize",value:function(e){t.assert(e>=0),this.rewriteInt(this._buf.position-e-4,e)}},{key:"writeBlob",value:function(e){null!==e&&(this.expand(e.length),this._buf.putArray(e))}},{key:"writeOptional",value:function(e,i){return t.assert(null!==this._encapsStack),null!==this._encapsStack.encoder?this._encapsStack.encoder.writeOptional(e,i):this.writeOptImpl(e,i)}},{key:"writeOptionalHelper",value:function(e,t,i,n){void 0!==n&&this.writeOptional(e,t)&&i.call(this,n)}},{key:"writeByte",value:function(e){this.expand(1),this._buf.put(e)}},{key:"rewriteByte",value:function(e,t){this._buf.putAt(t,e)}},{key:"writeByteSeq",value:function(e){null===e||0===e.length?this.writeSize(0):(this.writeSize(e.length),this.expand(e.length),this._buf.putArray(e))}},{key:"writeBool",value:function(e){this.expand(1),this._buf.put(e?1:0)}},{key:"rewriteBool",value:function(e,t){this._buf.putAt(t,e?1:0)}},{key:"writeShort",value:function(e){this.expand(2),this._buf.putShort(e)}},{key:"writeInt",value:function(e){this.expand(4),this._buf.putInt(e)}},{key:"rewriteInt",value:function(e,t){this._buf.putIntAt(t,e)}},{key:"writeLong",value:function(e){this.expand(8),this._buf.putLong(e)}},{key:"writeFloat",value:function(e){this.expand(4),this._buf.putFloat(e)}},{key:"writeDouble",value:function(e){this.expand(8),this._buf.putDouble(e)}},{key:"writeString",value:function(e){null===e||0===e.length?this.writeSize(0):this._buf.writeString(this,e)}},{key:"writeProxy",value:function(e){if(null!==e)e._write(this);else{var t=new Ice.Identity;t._write(this)}}},{key:"writeOptionalProxy",value:function(e,t){if(void 0!==t&&this.writeOptional(e,r.FSize)){var i=this.startSize();this.writeProxy(t),this.endSize(i)}}},{key:"writeEnum",value:function(e){this.isEncoding_1_0()?e.maxValue<127?this.writeByte(e.value):e.maxValue<32767?this.writeShort(e.value):this.writeInt(e.value):this.writeSize(e.value)}},{key:"writeValue",value:function(e){this.initEncaps(),this._encapsStack.encoder.writeValue(e)}},{key:"writeOptionalValue",value:function(e,t){void 0!==t&&this.writeOptional(e,r.Class)&&this.writeValue(t)}},{key:"writeException",value:function(e){this.initEncaps(),this._encapsStack.encoder.writeException(e)}},{key:"writeUserException",value:function(e){this.WriteException(e)}},{key:"writeOptImpl",value:function(e,t){if(this.isEncoding_1_0())return!1;var i=t.value;return e<30?(i|=e<<3,this.writeByte(i)):(i|=240,this.writeByte(i),this.writeSize(e)),!0}},{key:"isEmpty",value:function(){return this._buf.empty()}},{key:"expand",value:function(e){this._buf.expand(e)}},{key:"isEncoding_1_0",value:function(){return this._encapsStack?this._encapsStack.encoding_1_0:this._encoding.equals(Ice.Encoding_1_0)}},{key:"initEncaps",value:function(){this._encapsStack||(this._encapsStack=this._encapsCache,this._encapsStack?this._encapsCache=this._encapsCache.next:this._encapsStack=new C,this._encapsStack.setEncoding(this._encoding)),this._encapsStack.format===n.DefaultFormat&&(this._encapsStack.format=this._instance.defaultsAndOverrides().defaultFormat),this._encapsStack.encoder||(this._encapsStack.encoding_1_0?this._encapsStack.encoder=new w(this,this._encapsStack):this._encapsStack.encoder=new k(this,this._encapsStack))}},{key:"format",get:function(){return this._format},set:function(e){this._format=e}},{key:"pos",get:function(){return this._buf.position},set:function(e){this._buf.position=e}},{key:"size",get:function(){return this._buf.limit}},{key:"instance",get:function(){return this._instance}},{key:"closure",get:function(){return this._closure},set:function(e){this._closure=e}},{key:"buffer",get:function(){return this._buf}}]),e}(),E=function(e,t,i,n,r,s){var a=function(){"use strict";function r(){h(this,r)}return f(r,null,[{key:"write",value:function(t,i){return e.call(t,i)}},{key:"read",value:function(e){return t.call(e)}},{key:"writeOptional",value:function(t,i,r){t.writeOptionalHelper(i,n,e,r)}},{key:"readOptional",value:function(e,i){return e.readOptionalHelper(i,n,t)}},{key:"minWireSize",get:function(){return i}}]),r}();return void 0!==r&&void 0!==s&&(a.validate=function(e){return e>=r&&e<=s}),a},T=S.prototype,x=b.prototype;Ice.ByteHelper=E(x.writeByte,T.readByte,1,Ice.OptionalFormat.F1,0,255),Ice.ShortHelper=E(x.writeShort,T.readShort,2,Ice.OptionalFormat.F2,-32768,32767),Ice.IntHelper=E(x.writeInt,T.readInt,4,Ice.OptionalFormat.F4,-2147483648,2147483647),Ice.FloatHelper=E(x.writeFloat,T.readFloat,4,Ice.OptionalFormat.F4,-34028234664e28,34028234664e28),Ice.FloatHelper.validate=function(e){return Number.isNaN(e)||e==Number.POSITIVE_INFINITY||e==Number.NEGATIVE_INFINITY||e>=-34028234664e28&&e<=34028234664e28},Ice.DoubleHelper=E(x.writeDouble,T.readDouble,8,Ice.OptionalFormat.F8,-Number.MAX_VALUE,Number.MAX_VALUE),Ice.DoubleHelper.validate=function(e){return Number.isNaN(e)||e==Number.POSITIVE_INFINITY||e==Number.NEGATIVE_INFINITY||e>=-Number.MAX_VALUE&&e<=Number.MAX_VALUE},Ice.BoolHelper=E(x.writeBool,T.readBool,1,Ice.OptionalFormat.F1),Ice.LongHelper=E(x.writeLong,T.readLong,8,Ice.OptionalFormat.F8),Ice.LongHelper.validate=function(e){return e.low>=0&&e.low<=4294967295&&e.high>=0&&e.high<=4294967295},Ice.StringHelper=E(x.writeString,T.readString,1,Ice.OptionalFormat.VSize),Ice.ObjectHelper=function(){"use strict";function e(){h(this,e)}return f(e,null,[{key:"write",value:function(e,t){e.writeValue(t)}},{key:"read",value:function(e){var t;return e.readValue((function(e){t=e}),Ice.Value),t}},{key:"writeOptional",value:function(e,t,i){e.writeOptionalValue(t,Ice.OptionalFormat.Class,x.writeValue,i)}},{key:"readOptional",value:function(e,t){var i;return e.readOptionalValue(t,(function(e){i=e}),Ice.Value),i}},{key:"minWireSize",get:function(){return 1}}]),e}(),Ice.InputStream=S,Ice.OutputStream=b}(),function(){Ice.SocketOperation={None:0,Read:1,Write:2,Connect:2}}(),function(){var e=Ice.Logger,t=null;Ice.getProcessLogger=function(){return null===t&&(t=new e("","")),t},Ice.setProcessLogger=function(e){t=e}}(),function(){var e=Ice.OutputStream,t=Ice.Debug,i=Ice.Protocol,n=function(){"use strict";function n(t,r){if(h(this,n),this._batchStreamInUse=!1,this._batchRequestNum=0,this._batchStream=new e(t,i.currentProtocolEncoding),this._batchStream.writeBlob(i.requestBatchHdr),this._batchMarker=this._batchStream.size,this._exception=null,this._maxSize=t.batchAutoFlushSize(),this._maxSize>0&&r){var s=t.initializationData().properties.getPropertyAsIntWithDefault("Ice.UDP.SndSize",65507);s<this._maxSize&&(this._maxSize=s)}}return f(n,[{key:"prepareBatchRequest",value:function(e){if(this._exception)throw this._exception;this._batchStream.swap(e)}},{key:"finishBatchRequest",value:function(e,i,n){this._batchStream.swap(e);try{this._maxSize>0&&this._batchStream.size>=this._maxSize&&i.ice_flushBatchRequests(),t.assert(this._batchMarker<this._batchStream.size),this._batchMarker=this._batchStream.size,++this._batchRequestNum}finally{this._batchStream.resize(this._batchMarker)}}},{key:"abortBatchRequest",value:function(e){this._batchStream.swap(e),this._batchStream.resize(this._batchMarker)}},{key:"swap",value:function(e){if(0===this._batchRequestNum)return 0;var t=null;if(this._batchMarker<this._batchStream.size){var n=this._batchStream.size-this._batchMarker;this._batchStream.pos=this._batchMarker,t=this._batchStream.buffer.getArray(n),this._batchStream.resize(this._batchMarker)}var r=this._batchRequestNum;return this._batchStream.swap(e),this._batchRequestNum=0,this._batchStream.writeBlob(i.requestBatchHdr),this._batchMarker=this._batchStream.size,null!==t&&this._batchStream.writeBlob(t),r}},{key:"destroy",value:function(e){this._exception=e}},{key:"isEmpty",value:function(){return this._batchStream.size===i.requestBatchHdr.length}}]),n}();Ice.BatchRequestQueue=n}(),function(){var e=Ice.AsyncResultBase,t=Ice.Debug,i=Ice.Protocol,n=Ice.UserException,r=Ice.OutputStream,s=function(e){"use strict";u(a,e);var s=v(a);function a(e,t,n,o,c,u){var l;return h(this,a),l=s.call(this,e,t,n,o,c),l._completed=u,l._is=null,l._os=null!==e?new r(l._instance,i.currentProtocolEncoding):null,l._state=0,l._exception=null,l._sentSynchronously=!1,l}return f(a,[{key:"cancel",value:function(){this.cancelWithException(new Ice.InvocationCanceledException)}},{key:"isCompleted",value:function(){return(this._state&a.Done)>0}},{key:"isSent",value:function(){return(this._state&a.Sent)>0}},{key:"throwLocalException",value:function(){if(null!==this._exception)throw this._exception}},{key:"sentSynchronously",value:function(){return this._sentSynchronously}},{key:"markSent",value:function(e){t.assert(0===(this._state&a.Done)),this._state|=a.Sent,e&&(this._state|=a.Done|a.OK,this._cancellationHandler=null,this.resolve())}},{key:"markFinished",value:function(e,i){t.assert(0===(this._state&a.Done)),this._state|=a.Done,e&&(this._state|=a.OK),this._cancellationHandler=null,i?i(this):this.resolve()}},{key:"markFinishedEx",value:function(e){t.assert(0===(this._state&a.Done)),this._exception=e,this._state|=a.Done,this._cancellationHandler=null,this.reject(e)}},{key:"cancelWithException",value:function(e){this._cancellationHandler?this._cancellationHandler.asyncRequestCanceled(this,e):this._cancellationException=e}},{key:"cancelable",value:function(e){if(this._cancellationException)try{throw this._cancellationException}finally{this._cancellationException=null}this._cancellationHandler=e}},{key:"getOs",value:function(){return this._os}},{key:"startReadParams",value:function(){return this._is.startEncapsulation(),this._is}},{key:"endReadParams",value:function(){this._is.endEncapsulation()}},{key:"readEmptyParams",value:function(){this._is.skipEmptyEncapsulation()}},{key:"throwUserException",value:function(){if(t.assert(0!==(this._state&a.Done)),0===(this._state&a.OK))try{this._is.startEncapsulation(),this._is.throwException()}catch(e){throw e instanceof n&&this._is.endEncapsulation(),e}}}]),a}(e);s.OK=1,s.Done=2,s.Sent=4,Ice.AsyncResult=s}(),function(){var e=Ice.StringUtil,t=Ice.Identity,i=Ice.IdentityParseException;Ice.stringToIdentity=function(n){var r=new t,s=-1,a=0;while(-1!==(a=n.indexOf("/",a))){var o=0;while(a-o>0&&"\\"==n.charAt(a-o-1))o++;if(o%2===0){if(-1!=s)throw new i("unescaped backslash in identity `".concat(n,"'"));s=a}a++}if(-1==s){r.category="";try{r.name=e.unescapeString(n,0,n.length,"/")}catch(c){throw new i("invalid identity name `".concat(n,"': ").concat(c.toString()))}}else{try{r.category=e.unescapeString(n,0,s,"/")}catch(c){throw new i("invalid category in identity `".concat(n,"': ").concat(c.toString()))}if(s+1<n.length)try{r.name=e.unescapeString(n,s+1,n.length,"/")}catch(c){throw new i("invalid name in identity `".concat(n,"': ").concat(c.toString()))}else r.name=""}return r},Ice.identityToString=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ice.ToStringMode.Unicode;return null===t.category||0===t.category.length?e.escapeString(t.name,"/",i):e.escapeString(t.category,"/",i)+"/"+e.escapeString(t.name,"/",i)},Ice.proxyIdentityCompare=function(e,t){if(e===t)return 0;if(null===e&&null!==t)return-1;if(null!==e&&null===t)return 1;var i=e.ice_getIdentity(),n=t.ice_getIdentity(),r=i.name.localeCompare(n.name);return 0!==r?r:i.category.localeCompare(n.category)},Ice.proxyIdentityAndFacetCompare=function(e,t){if(e===t)return 0;if(null===e&&null!==t)return-1;if(null!==e&&null===t)return 1;var i=e.ice_getIdentity(),n=t.ice_getIdentity(),r=i.name.localeCompare(n.name);if(0!==r)return r;if(r=i.category.localeCompare(n.category),0!==r)return r;var s=e.ice_getFacet(),a=t.ice_getFacet();return null===s&&null===a?0:null===s?-1:null===a?1:s.localeCompare(a)}}(),function(){var e=Ice.AsyncStatus,t=Ice.AsyncResult,i=Ice.InputStream,r=Ice.OutputStream,s=Ice.Debug,a=Ice.RetryException,o=Ice.Protocol,c=Ice.Identity,l=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,s,a,c){var u;return h(this,i),u=t.call(this,e,n,s,a,c),u._os=new r(u._instance,o.currentProtocolEncoding),u}return f(i,[{key:"getOs",value:function(){return this._os}},{key:"sent",value:function(){this.markSent(!0)}},{key:"completedEx",value:function(e){this.markFinishedEx(e)}}]),i}(t),g=function(t){"use strict";u(r,t);var i=v(r);function r(e,t){var n;return h(this,r),n=i.call(this,e.ice_getCommunicator(),t,null,e,null),n._mode=null,n._cnt=0,n._sent=!1,n._handler=null,n}return f(r,[{key:"completedEx",value:function(e){try{this._instance.retryQueue().add(this,this.handleException(e))}catch(e){this.markFinishedEx(e)}}},{key:"retryException",value:function(e){try{this._proxy._updateRequestHandler(this._handler,null),this._instance.retryQueue().add(this,0)}catch(e){this.completedEx(e)}}},{key:"retry",value:function(){this.invokeImpl(!1)}},{key:"abort",value:function(e){this.markFinishedEx(e)}},{key:"invokeImpl",value:function(t){var i=this;try{if(t){var n=this._proxy._getReference().getInvocationTimeout();n>0&&(this._timeoutToken=this._instance.timer().schedule((function(){i.cancelWithException(new Ice.InvocationTimeoutException)}),n))}while(1)try{return this._sent=!1,this._handler=this._proxy._getRequestHandler(),void((this._handler.sendAsyncRequest(this)&e.Sent)>0&&t&&(this._sentSynchronously=!0))}catch(s){if(s instanceof a)this._proxy._updateRequestHandler(this._handler,null);else{var r=this.handleException(s);if(r>0)return void this._instance.retryQueue().add(this,r)}}}catch(s){this.markFinishedEx(s)}}},{key:"markSent",value:function(e){this._sent=!0,e&&this._timeoutToken&&this._instance.timer().cancel(this._timeoutToken),n(d(r.prototype),"markSent",this).call(this,e)}},{key:"markFinishedEx",value:function(e){this._timeoutToken&&this._instance.timer().cancel(this._timeoutToken),n(d(r.prototype),"markFinishedEx",this).call(this,e)}},{key:"handleException",value:function(e){var t={value:0};return this._cnt=this._proxy._handleException(e,this._handler,this._mode,this._sent,t,this._cnt),t.value}}]),r}(l),p=function(e){"use strict";u(a,e);var r=v(a);function a(e,t,i){var n;return h(this,a),n=r.call(this,e,t),n._encoding=o.getCompatibleEncoding(n._proxy._getReference().getEncoding()),n._completed=i,n}return f(a,[{key:"prepare",value:function(e,t,i){o.checkSupportedProtocol(o.getCompatibleProtocol(this._proxy._getReference().getProtocol())),this._mode=t,null===i&&(i=a._emptyContext),this._proxy.ice_isBatchOneway()||this._proxy.ice_isBatchDatagram()?this._proxy._getBatchRequestQueue().prepareBatchRequest(this._os):this._os.writeBlob(o.requestHdr);var n=this._proxy._getReference();n.getIdentity()._write(this._os);var r=n.getFacet();if(null===r||0===r.length?Ice.StringSeqHelper.write(this._os,null):Ice.StringSeqHelper.write(this._os,[r]),this._os.writeString(this._operation),this._os.writeByte(t.value),void 0!==i){if(null!==i&&!(i instanceof Map))throw new RangeError("illegal context value, expecting null or Map");Ice.ContextHelper.write(this._os,i)}else{var s=n.getInstance().getImplicitContext(),c=n.getContext();null===s?Ice.ContextHelper.write(this._os,c):s.write(c,this._os)}}},{key:"sent",value:function(){this.markSent(!this._proxy.ice_isTwoway())}},{key:"invokeRemote",value:function(e,t){return e.sendAsyncRequest(this,t,0)}},{key:"abort",value:function(e){(this._proxy.ice_isBatchOneway()||this._proxy.ice_isBatchDatagram())&&this._proxy._getBatchRequestQueue().abortBatchRequest(this._os),n(d(a.prototype),"abort",this).call(this,e)}},{key:"invoke",value:function(){if(this._proxy.ice_isBatchOneway()||this._proxy.ice_isBatchDatagram())return this._sentSynchronously=!0,this._proxy._getBatchRequestQueue().finishBatchRequest(this._os,this._proxy,this._operation),void this.markFinished(!0);this.invokeImpl(!0)}},{key:"completed",value:function(e){var t;s.assert(this._proxy.ice_isTwoway());try{switch(null===this._is&&(this._is=new i(this._instance,o.currentProtocolEncoding)),this._is.swap(e),t=this._is.readByte(),t){case o.replyOK:case o.replyUserException:break;case o.replyObjectNotExist:case o.replyFacetNotExist:case o.replyOperationNotExist:var n=new c;n._read(this._is);var r,a=Ice.StringSeqHelper.read(this._is);if(a.length>0){if(a.length>1)throw new Ice.MarshalException;r=a[0]}else r="";var u=this._is.readString(),l=null;switch(t){case o.replyObjectNotExist:l=new Ice.ObjectNotExistException;break;case o.replyFacetNotExist:l=new Ice.FacetNotExistException;break;case o.replyOperationNotExist:l=new Ice.OperationNotExistException;break;default:s.assert(!1);break}throw l.id=n,l.facet=r,l.operation=u,l;case o.replyUnknownException:case o.replyUnknownLocalException:case o.replyUnknownUserException:var d=this._is.readString(),h=null;switch(t){case o.replyUnknownException:h=new Ice.UnknownException;break;case o.replyUnknownLocalException:h=new Ice.UnknownLocalException;break;case o.replyUnknownUserException:h=new Ice.UnknownUserException;break;default:s.assert(!1);break}throw h.unknown=d,h;default:throw new Ice.UnknownReplyStatusException}this.markFinished(t==o.replyOK,this._completed)}catch(f){this.completedEx(f)}}},{key:"startWriteParams",value:function(e){return this._os.startEncapsulation(this._encoding,e),this._os}},{key:"endWriteParams",value:function(){this._os.endEncapsulation()}},{key:"writeEmptyParams",value:function(){this._os.writeEmptyEncapsulation(this._encoding)}},{key:"startReadParams",value:function(){return this._is.startEncapsulation(),this._is}},{key:"endReadParams",value:function(){this._is.endEncapsulation()}},{key:"readEmptyParams",value:function(){this._is.skipEmptyEncapsulation()}},{key:"throwUserException",value:function(){if(s.assert(0!==(this._state&t.Done)),0===(this._state&t.OK))try{this._is.startEncapsulation(),this._is.throwException()}catch(e){throw e instanceof Ice.UserException&&this._is.endEncapsulation(),e}}}]),a}(g);p._emptyContext=new Map;var m=function(t){"use strict";u(n,t);var i=v(n);function n(e,t){var r;return h(this,n),r=i.call(this,e,t),r._batchRequestNum=e._getBatchRequestQueue().swap(r._os),r}return f(n,[{key:"invokeRemote",value:function(t,i){return 0===this._batchRequestNum?(this.sent(),e.Sent):t.sendAsyncRequest(this,i,this._batchRequestNum)}},{key:"invoke",value:function(){o.checkSupportedProtocol(o.getCompatibleProtocol(this._proxy._getReference().getProtocol())),this.invokeImpl(!0)}}]),n}(g),y=function(t){"use strict";u(n,t);var i=v(n);function n(){return h(this,n),i.apply(this,arguments)}return f(n,[{key:"invokeRemote",value:function(t,i){return this.markFinished(!0,(function(e){return e.resolve(t)})),e.Sent}},{key:"invoke",value:function(){this.invokeImpl(!0)}}]),n}(g),_=function(t){"use strict";u(n,t);var i=v(n);function n(e,t,r){return h(this,n),i.call(this,t,r,e,null,null)}return f(n,[{key:"invoke",value:function(){try{var t,i=this._connection.getBatchRequestQueue().swap(this._os);0===i?(this.sent(),t=e.Sent):t=this._connection.sendAsyncRequest(this,!1,i),(t&e.Sent)>0&&(this._sentSynchronously=!0)}catch(n){this.completedEx(n)}}}]),n}(l),S=function(t){"use strict";u(n,t);var i=v(n);function n(e,t){return h(this,n),i.call(this,t,"heartbeat",e,null,null)}return f(n,[{key:"invoke",value:function(){try{this._os.writeBlob(o.magic),o.currentProtocol._write(this._os),o.currentProtocolEncoding._write(this._os),this._os.writeByte(o.validateConnectionMsg),this._os.writeByte(0),this._os.writeInt(o.headerSize);var t=this._connection.sendAsyncRequest(this,!1,0);(t&e.Sent)>0&&(this._sentSynchronously=!0)}catch(i){this.completedEx(i)}}}]),n}(l);Ice.OutgoingAsync=p,Ice.ProxyFlushBatch=m,Ice.ProxyGetConnection=y,Ice.ConnectionFlushBatch=_,Ice.HeartbeatAsync=S}(),function(){var e=Ice.ArrayUtil,t=Ice.AsyncResultBase,i=Ice.Debug,n=Ice.OutgoingAsync,r=Ice.ProxyFlushBatch,s=Ice.ProxyGetConnection,a=Ice.ReferenceMode,o=Ice.OperationMode,c=function(){"use strict";function c(){h(this,c),this._reference=null,this._requestHandler=null}return f(c,[{key:"hashCode",value:function(e){return this._reference.hashCode()}},{key:"ice_getCommunicator",value:function(){return this._reference.getCommunicator()}},{key:"toString",value:function(){return this._reference.toString()}},{key:"ice_getIdentity",value:function(){return this._reference.getIdentity().clone()}},{key:"ice_identity",value:function(e){if(void 0===e||null===e||0===e.name.length)throw new Ice.IllegalIdentityException;if(e.equals(this._reference.getIdentity()))return this;var t=new c;return t._setup(this._reference.changeIdentity(e)),t}},{key:"ice_getContext",value:function(){return new Map(this._reference.getContext())}},{key:"ice_context",value:function(e){return this._newInstance(this._reference.changeContext(e))}},{key:"ice_getFacet",value:function(){return this._reference.getFacet()}},{key:"ice_facet",value:function(e){if(void 0!==e&&null!==e||(e=""),e===this._reference.getFacet())return this;var t=new c;return t._setup(this._reference.changeFacet(e)),t}},{key:"ice_getAdapterId",value:function(){return this._reference.getAdapterId()}},{key:"ice_adapterId",value:function(e){return void 0!==e&&null!==e||(e=""),e===this._reference.getAdapterId()?this:this._newInstance(this._reference.changeAdapterId(e))}},{key:"ice_getEndpoints",value:function(){return e.clone(this._reference.getEndpoints())}},{key:"ice_endpoints",value:function(t){return void 0!==t&&null!==t||(t=[]),e.equals(t,this._reference.getEndpoints())?this:this._newInstance(this._reference.changeEndpoints(t))}},{key:"ice_getLocatorCacheTimeout",value:function(){return this._reference.getLocatorCacheTimeout()}},{key:"ice_locatorCacheTimeout",value:function(e){if(e<-1)throw new RangeError("invalid value passed to ice_locatorCacheTimeout: "+e);return e===this._reference.getLocatorCacheTimeout()?this:this._newInstance(this._reference.changeLocatorCacheTimeout(e))}},{key:"ice_getInvocationTimeout",value:function(){return this._reference.getInvocationTimeout()}},{key:"ice_invocationTimeout",value:function(e){if(e<1&&-1!==e)throw new RangeError("invalid value passed to ice_invocationTimeout: "+e);return e===this._reference.getInvocationTimeout()?this:this._newInstance(this._reference.changeInvocationTimeout(e))}},{key:"ice_isConnectionCached",value:function(){return this._reference.getCacheConnection()}},{key:"ice_connectionCached",value:function(e){return e===this._reference.getCacheConnection()?this:this._newInstance(this._reference.changeCacheConnection(e))}},{key:"ice_getEndpointSelection",value:function(){return this._reference.getEndpointSelection()}},{key:"ice_endpointSelection",value:function(e){return e===this._reference.getEndpointSelection()?this:this._newInstance(this._reference.changeEndpointSelection(e))}},{key:"ice_isSecure",value:function(){return this._reference.getSecure()}},{key:"ice_secure",value:function(e){return e===this._reference.getSecure()?this:this._newInstance(this._reference.changeSecure(e))}},{key:"ice_getEncodingVersion",value:function(){return this._reference.getEncoding().clone()}},{key:"ice_encodingVersion",value:function(e){return e.equals(this._reference.getEncoding())?this:this._newInstance(this._reference.changeEncoding(e))}},{key:"ice_isPreferSecure",value:function(){return this._reference.getPreferSecure()}},{key:"ice_preferSecure",value:function(e){return e===this._reference.getPreferSecure()?this:this._newInstance(this._reference.changePreferSecure(e))}},{key:"ice_getRouter",value:function(){var e=this._reference.getRouterInfo();return null!==e?e.getRouter():null}},{key:"ice_router",value:function(e){var t=this._reference.changeRouter(e);return t.equals(this._reference)?this:this._newInstance(t)}},{key:"ice_getLocator",value:function(){var e=this._reference.getLocatorInfo();return null!==e?e.getLocator():null}},{key:"ice_locator",value:function(e){var t=this._reference.changeLocator(e);return t.equals(this._reference)?this:this._newInstance(t)}},{key:"ice_isTwoway",value:function(){return this._reference.getMode()===a.ModeTwoway}},{key:"ice_twoway",value:function(){return this._reference.getMode()===a.ModeTwoway?this:this._newInstance(this._reference.changeMode(a.ModeTwoway))}},{key:"ice_isOneway",value:function(){return this._reference.getMode()===a.ModeOneway}},{key:"ice_oneway",value:function(){return this._reference.getMode()===a.ModeOneway?this:this._newInstance(this._reference.changeMode(a.ModeOneway))}},{key:"ice_isBatchOneway",value:function(){return this._reference.getMode()===a.ModeBatchOneway}},{key:"ice_batchOneway",value:function(){return this._reference.getMode()===a.ModeBatchOneway?this:this._newInstance(this._reference.changeMode(a.ModeBatchOneway))}},{key:"ice_isDatagram",value:function(){return this._reference.getMode()===a.ModeDatagram}},{key:"ice_datagram",value:function(){return this._reference.getMode()===a.ModeDatagram?this:this._newInstance(this._reference.changeMode(a.ModeDatagram))}},{key:"ice_isBatchDatagram",value:function(){return this._reference.getMode()===a.ModeBatchDatagram}},{key:"ice_batchDatagram",value:function(){return this._reference.getMode()===a.ModeBatchDatagram?this:this._newInstance(this._reference.changeMode(a.ModeBatchDatagram))}},{key:"ice_timeout",value:function(e){if(e<1&&-1!==e)throw new RangeError("invalid value passed to ice_timeout: "+e);var t=this._reference.changeTimeout(e);return t.equals(this._reference)?this:this._newInstance(t)}},{key:"ice_getTimeout",value:function(){return this._reference.getTimeout()}},{key:"ice_fixed",value:function(e){if(null===e)throw new RangeError("invalid null connection passed to ice_fixed");if(!(e instanceof Ice.ConnectionI))throw new RangeError("invalid connection passed to ice_fixed");var t=this._reference.changeConnection(e);return t.equals(this._reference)?this:this._newInstance(t)}},{key:"ice_isFixed",value:function(){return this._reference instanceof Ice.FixedReference}},{key:"ice_getConnectionId",value:function(){return this._reference.getConnectionId()}},{key:"ice_connectionId",value:function(e){var t=this._reference.changeConnectionId(e);return t.equals(this._reference)?this:this._newInstance(t)}},{key:"ice_getConnection",value:function(){var e=new s(this,"ice_getConnection");try{e.invoke()}catch(t){e.abort(t)}return e}},{key:"ice_getCachedConnection",value:function(){return this._requestHandler?this._requestHandler.getConnection():null}},{key:"ice_flushBatchRequests",value:function(){var e=new r(this,"ice_flushBatchRequests");try{e.invoke()}catch(t){e.abort(t)}return e}},{key:"equals",value:function(e){return this===e||e instanceof c&&this._reference.equals(e._reference)}},{key:"_write",value:function(e){this._reference.getIdentity()._write(e),this._reference.streamWrite(e)}},{key:"_getReference",value:function(){return this._reference}},{key:"_copyFrom",value:function(e){i.assert(null===this._reference),i.assert(null===this._requestHandler),this._reference=e._reference,this._requestHandler=e._requestHandler}},{key:"_handleException",value:function(e,t,i,n,r,s){if(this._updateRequestHandler(t,null),!(e instanceof Ice.LocalException&&(!n||i==o.Nonmutating||i==o.Idempotent||e instanceof Ice.CloseConnectionException||e instanceof Ice.ObjectNotExistException)))throw e;try{return this._reference.getInstance().proxyFactory().checkRetryAfterException(e,this._reference,r,s)}catch(a){throw a instanceof Ice.CommunicatorDestroyedException?e:a}}},{key:"_checkAsyncTwowayOnly",value:function(e){if(!this.ice_isTwoway())throw new Ice.TwowayOnlyException(e)}},{key:"_getRequestHandler",value:function(){return this._reference.getCacheConnection()&&this._requestHandler?this._requestHandler:this._reference.getRequestHandler(this)}},{key:"_getBatchRequestQueue",value:function(){return this._batchRequestQueue||(this._batchRequestQueue=this._reference.getBatchRequestQueue()),this._batchRequestQueue}},{key:"_setRequestHandler",value:function(e){return this._reference.getCacheConnection()?(this._requestHandler||(this._requestHandler=e),this._requestHandler):e}},{key:"_updateRequestHandler",value:function(e,t){this._reference.getCacheConnection()&&null!==e&&this._requestHandler&&this._requestHandler!==t&&(this._requestHandler=this._requestHandler.update(e,t))}},{key:"_setup",value:function(e){i.assert(null===this._reference),this._reference=e}},{key:"_newInstance",value:function(e){var t=new this.constructor;return t._setup(e),t}},{key:"ice_instanceof",value:function(e){return!!e&&(this instanceof e||this.constructor._instanceof(e))}}],[{key:"_invoke",value:function(e,t,i,r,s,a,o,c,u){var l=this;(null!==o||c.length>0)&&e._checkAsyncTwowayOnly(t);var d=new n(e,t,(function(e){l._completed(e,o,c)}));try{if(d.prepare(t,i,s),null===a)d.writeEmptyParams();else{var h=d.startWriteParams(r);a(h,u),d.endWriteParams()}d.invoke()}catch(f){d.abort(f)}return d}},{key:"_completed",value:function(e,t,i){if(this._check(e,i))try{null===t?(e.readEmptyParams(),e.resolve()):e.resolve(t(e))}catch(n){this.dispatchLocalException(e,n)}}},{key:"_check",value:function(e,t){try{e.throwUserException()}catch(n){if(n instanceof Ice.UserException){if(null!==t)for(var i=0;i<t.length;++i)if(n instanceof t[i])return e.reject(n),!1;return e.reject(new Ice.UnknownUserException(n.ice_id())),!1}return e.reject(n),!1}return!0}},{key:"dispatchLocalException",value:function(e,t){e.reject(t)}},{key:"checkedCast",value:function(e,i,n){var r=this,s=null;return void 0===e||null===e?(s=new t(null,"checkedCast",null,null,null),s.resolve(null)):(void 0!==i&&(e=e.ice_facet(i)),s=new t(e.ice_getCommunicator(),"checkedCast",null,e,null),e.ice_isA(this.ice_staticId(),n).then((function(t){if(t){var i=new r;i._copyFrom(e),s.resolve(i)}else s.resolve(null)})).catch((function(e){e instanceof Ice.FacetNotExistException?s.resolve(null):s.reject(e)}))),s}},{key:"uncheckedCast",value:function(e,t){var i=null;return void 0!==e&&null!==e&&(i=new this,void 0!==t&&(e=e.ice_facet(t)),i._copyFrom(e)),i}},{key:"minWireSize",get:function(){return 2}},{key:"write",value:function(e,t){e.writeProxy(t)}},{key:"read",value:function(e){return e.readProxy(this)}},{key:"writeOptional",value:function(e,t,i){e.writeOptionalProxy(t,i)}},{key:"readOptional",value:function(e,t){return e.readOptionalProxy(t,this)}},{key:"_instanceof",value:function(e){if(e===this)return!0;for(var t in this._implements)if(this._implements[t]._instanceof(e))return!0;return!1}},{key:"ice_staticId",value:function(){return this._id}},{key:"_implements",get:function(){return[]}}]),c}();Ice.ObjectPrx=c}(),function(){var e=Ice.StringUtil,t=Ice.PropertyNames,i=Ice.Debug,n=Ice.getProcessLogger,r=Ice.InitializationException,a=function(){"use strict";function a(e,t){if(h(this,a),this._properties=new Map,void 0!==t&&null!==t){var i,n=g(t._properties);try{for(n.s();!(i=n.n()).done;){var r=s(i.value,2),o=r[0],c=r[1];this._properties.set(o,{value:c.value,used:!1})}}catch(d){n.e(d)}finally{n.f()}}if(void 0!==e&&null!==e){var u=this.parseIceCommandLineOptions(e);e.length=0;for(var l=0;l<u.length;++l)e.push(u[l])}}return f(a,[{key:"getProperty",value:function(e){return this.getPropertyWithDefault(e,"")}},{key:"getPropertyWithDefault",value:function(e,t){var i=this._properties.get(e);return void 0!==i?(i.used=!0,i.value):t}},{key:"getPropertyAsInt",value:function(e){return this.getPropertyAsIntWithDefault(e,0)}},{key:"getPropertyAsIntWithDefault",value:function(e,t){var i=this._properties.get(e);return void 0!==i?(i.used=!0,parseInt(i.value)):t}},{key:"getPropertyAsList",value:function(e){return this.getPropertyAsListWithDefault(e,0)}},{key:"getPropertyAsListWithDefault",value:function(t,i){void 0!==i&&null!==i||(i=[]);var r=this._properties.get(t);if(void 0!==r){r.used=!0;var s=e.splitString(r.value,", \t\r\n");return null===s?(n().warning("mismatched quotes in property "+t+"'s value, returning default value"),i):(0===s.length&&(s=i),s)}return i}},{key:"getPropertiesForPrefix",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=new Map;return this._properties.forEach((function(i,n){0===n.indexOf(e)&&(i.used=!0,t.set(n,i.value))})),t}},{key:"setProperty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";null!==e&&(e=e.trim());var a=n();if(null===e||0===e.length)throw new r("Attempt to set property with empty key");var o=e.indexOf(".");if(-1!==o)for(var c=e.substr(0,o),u=0;u<t.validProps.length;++u){var l=t.validProps[u][0].pattern;if(o=l.indexOf("."),i.assert(-1!=o),l.substring(0,o-1)==c){for(var d=!1,h=!1,f=void 0,g=0;g<t.validProps[u][g].length&&!d;++g){l=t.validProps[u][g].pattern();var p=new RegExp(l);if(d=p.test(e),d&&t.validProps[u][g].deprecated&&(a.warning("deprecated property: "+e),null!==t.validProps[u][g].deprecatedBy&&(e=t.validProps[u][g].deprecatedBy)),d)break;if(p=new RegExp(l.toUpperCase()),d=p.test(e.toUpperCase()),d){h=!0,f=l.substr(2),f=f.substr(0,f.length-1),f=f.replace(/\\/g,"");break}}d?h&&a.warning("unknown property: `"+e+"'; did you mean `"+f+"'"):a.warning("unknown property: "+e)}}if(null!==s&&s.length>0){var v=this._properties.get(e);void 0!==v?v.value=s:this._properties.set(e,{value:s,used:!1})}else this._properties.delete(e)}},{key:"getCommandLineOptions",value:function(){var e=[];return this._properties.forEach((function(t,i){e.push("--"+i+"="+t.value)})),e}},{key:"parseCommandLineOptions",value:function(e,t){var i=this;e.length>0&&"."!=e.charAt(e.length-1)&&(e+="."),e="--"+e;var n=[];return t.forEach((function(t){0===t.indexOf(e)?(-1===t.indexOf("=")&&(t+="=1"),i.parseLine(t.substring(2))):n.push(t)})),n}},{key:"parseIceCommandLineOptions",value:function(e){for(var i=e.slice(),n=0;n<t.clPropNames.length;++n)i=this.parseCommandLineOptions(t.clPropNames[n],i);return i}},{key:"parse",value:function(e){var t=this;e.match(/[^\r\n]+/g).forEach((function(e){return t.parseLine(e)}))}},{key:"parseLine",value:function(e){for(var t="",r="",s=0,a="",o="",c=!1,u=0;u<e.length;++u){var l=e.charAt(u);switch(s){case 0:switch(l){case"\\":if(u<e.length-1)switch(l=e.charAt(++u),l){case"\\":case"#":case"=":t+=a,a="",t+=l;break;case" ":0!==t.length&&(a+=l);break;default:t+=a,a="",t+="\\",t+=l;break}else t+=a,t+=l;break;case" ":case"\t":case"\r":case"\n":0!==t.length&&(a+=l);break;case"=":a="",s=1;break;case"#":c=!0;break;default:t+=a,a="",t+=l;break}break;case 1:switch(l){case"\\":if(u<e.length-1)switch(l=e.charAt(++u),l){case"\\":case"#":case"=":r+=0===r.length?o:a,a="",o="",r+=l;break;case" ":a+=l,o+=l;break;default:r+=0===r.length?o:a,a="",o="",r+="\\",r+=l;break}else r+=0===r.length?o:a,r+=l;break;case" ":case"\t":case"\r":case"\n":0!==r.length&&(a+=l);break;case"#":c=!0;break;default:r+=0===r.length?o:a,a="",o="",r+=l;break}break;default:i.assert(!1);break}if(c)break}r+=o,0===s&&0!==t.length||1==s&&0===t.length?n().warning('invalid config file entry: "'+e+'"'):0!==t.length&&this.setProperty(t,r)}},{key:"clone",value:function(){return new a(null,this)}},{key:"getUnusedProperties",value:function(){var e=[];return this._properties.forEach((function(t,i){t.used||e.push(i)})),e}}],[{key:"createProperties",value:function(e,t){return new a(e,t)}}]),a}();Ice.Properties=a}(),function(){Ice.EndpointSelectionType=p.defineEnum([["Random",0],["Ordered",1]])}(),function(){var e=function(){"use strict";function e(t,i,n,r){h(this,e),this._instance=t,this._traceLevel=t.traceLevels().network,this._traceCategory=t.traceLevels().networkCat,this._logger=t.initializationData().logger,this._properties=t.initializationData().properties,this._type=i,this._protocol=n,this._secure=r}return f(e,[{key:"traceLevel",value:function(){return this._traceLevel}},{key:"traceCategory",value:function(){return this._traceCategory}},{key:"logger",value:function(){return this._logger}},{key:"protocol",value:function(){return this._protocol}},{key:"type",value:function(){return this._type}},{key:"secure",value:function(){return this._secure}},{key:"properties",value:function(){return this._properties}},{key:"defaultHost",value:function(){return this._instance.defaultsAndOverrides().defaultHost}},{key:"defaultSourceAddress",value:function(){return this._instance.defaultsAndOverrides().defaultSourceAddress}},{key:"defaultEncoding",value:function(){return this._instance.defaultsAndOverrides().defaultEncoding}},{key:"defaultTimeout",value:function(){return this._instance.defaultsAndOverrides().defaultTimeout}},{key:"messageSizeMax",value:function(){return this._instance.messageSizeMax()}}]),e}();Ice.ProtocolInstance=e}(),function(){p.defineSequence(Ice,"EndpointSeqHelper","Ice.ObjectHelper",!1,"Ice.Endpoint")}(),function(){Object.defineProperty(Ice,"TCPEndpointType",{value:1}),Object.defineProperty(Ice,"SSLEndpointType",{value:2}),Object.defineProperty(Ice,"UDPEndpointType",{value:3}),Object.defineProperty(Ice,"WSEndpointType",{value:4}),Object.defineProperty(Ice,"WSSEndpointType",{value:5}),Object.defineProperty(Ice,"BTEndpointType",{value:6}),Object.defineProperty(Ice,"BTSEndpointType",{value:7}),Object.defineProperty(Ice,"iAPEndpointType",{value:8}),Object.defineProperty(Ice,"iAPSEndpointType",{value:9}),Ice.EndpointInfo=function(){"use strict";return f((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];h(this,e),this.underlying=t,this.timeout=i,this.compress=n}))}(),Ice.IPEndpointInfo=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r){var s,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";return h(this,i),s=t.call(this,e,n,r),s.host=a,s.port=o,s.sourceAddress=c,s}return f(i)}(Ice.EndpointInfo),Ice.TCPEndpointInfo=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r,s,a,o){return h(this,i),t.call(this,e,n,r,s,a,o)}return f(i)}(Ice.IPEndpointInfo),Ice.UDPEndpointInfo=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r,s,a,o){var c,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0;return h(this,i),c=t.call(this,e,n,r,s,a,o),c.mcastInterface=u,c.mcastTtl=l,c}return f(i)}(Ice.IPEndpointInfo),Ice.WSEndpointInfo=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r){var s,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return h(this,i),s=t.call(this,e,n,r),s.resource=a,s}return f(i)}(Ice.EndpointInfo),Ice.OpaqueEndpointInfo=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r){var s,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Ice.EncodingVersion,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;return h(this,i),s=t.call(this,e,n,r),s.rawEncoding=a,s.rawBytes=o,s}return f(i)}(Ice.EndpointInfo)}(),function(){var e=Ice.AsyncStatus,t=Ice.ConnectionRequestHandler,i=Ice.Debug,n=Ice.RetryException,r=Ice.ReferenceMode,s=Ice.LocalException,a=function(){"use strict";function a(e,t){h(this,a),this._reference=e,this._response=e.getMode()===r.ModeTwoway,this._proxy=t,this._proxies=[],this._initialized=!1,this._connection=null,this._exception=null,this._requests=[]}return f(a,[{key:"connect",value:function(e){return this.initialized()||this._proxies.push(e),this._requestHandler?this._requestHandler:this}},{key:"update",value:function(e,t){return e===this?t:this}},{key:"sendAsyncRequest",value:function(t){return this._initialized||t.cancelable(this),this.initialized()?t.invokeRemote(this._connection,this._response):(this._requests.push(t),e.Queued)}},{key:"asyncRequestCanceled",value:function(e,t){if(null===this._exception){if(!this.initialized()){for(var n=0;n<this._requests.length;n++)if(this._requests[n]===e)return e.completedEx(t),void this._requests.splice(n,1);i.assert(!1)}this._connection.asyncRequestCanceled(e,t)}}},{key:"getReference",value:function(){return this._reference}},{key:"getConnection",value:function(){if(null!==this._exception)throw this._exception;return this._connection}},{key:"setConnection",value:function(e){var t=this;i.assert(null===this._exception&&null===this._connection),this._connection=e;var n=this._reference.getRouterInfo();null===n?this.flushRequests():n.addProxy(this._proxy).then((function(){return t.flushRequests()}),(function(e){return t.setException(e)}))}},{key:"setException",value:function(e){var t=this;i.assert(!this._initialized&&null===this._exception),this._exception=e,this._proxies.length=0,this._proxy=null;try{this._reference.getInstance().requestHandlerFactory().removeRequestHandler(this._reference,this)}catch(n){}this._requests.forEach((function(e){null!==e&&e.completedEx(t._exception)})),this._requests.length=0}},{key:"initialized",value:function(){if(this._initialized)return i.assert(null!==this._connection),!0;if(null!==this._exception){if(null!==this._connection)return!0;throw this._exception}return this._initialized}},{key:"flushRequests",value:function(){var e=this;i.assert(null!==this._connection&&!this._initialized);var r=null;this._requests.forEach((function(t){try{t.invokeRemote(e._connection,e._response)}catch(a){a instanceof n?(r=a.inner,e._reference.getInstance().requestHandlerFactory().removeRequestHandler(e._reference,e),t.retryException(a.inner)):(i.assert(a instanceof s),r=a,t.out.completedEx(a))}})),this._requests.length=0,this._reference.getCacheConnection()&&null===r&&(this._requestHandler=new t(this._reference,this._connection),this._proxies.forEach((function(t){return t._updateRequestHandler(e,e._requestHandler)}))),i.assert(!this._initialized),this._exception=r,this._initialized=null===this._exception,this._reference.getInstance().requestHandlerFactory().removeRequestHandler(this._reference,this),this._proxies.length=0,this._proxy=null}}]),a}();Ice.ConnectRequestHandler=a}(),function(){var e=function(){"use strict";function e(){h(this,e)}return f(e,[{key:"toString",value:function(){return this.protocol()+this.options()}},{key:"initWithOptions",value:function(e){for(var t=[],i="`"+this.protocol(),n=0;n<e.length;++n)-1!==e[n].search(/[ \t\n\r]+/)?i+=' "'+e[n]+'"':i+=" "+e[n];i+="'";for(var r=0;r<e.length;){var s=e[r++];if(s.length<2||"-"!=s.charAt(0))t.push(s);else{var a=null;r<e.length&&"-"!=e[r].charAt(0)&&(a=e[r++]),this.checkOption(s,a,i)||(t.push(s),null!==a&&t.push(a))}}e.length=0;for(var o=0;o<t.length;o++)e.push(t[o])}},{key:"equals",value:function(t){return t instanceof e&&0===this.compareTo(t)}},{key:"checkOption",value:function(){return!1}}]),e}();Ice.EndpointI=e}(),function(){var e=function(){"use strict";function e(t,i,n,r){h(this,e),this._instance=t,this._queue=i,this._outAsync=n}return f(e,[{key:"run",value:function(){this._outAsync.retry(),this._queue.remove(this)}},{key:"destroy",value:function(){try{this._outAsync.abort(new Ice.CommunicatorDestroyedException)}catch(e){}}},{key:"asyncRequestCanceled",value:function(e,t){this._queue.cancel(this)&&(this._instance.traceLevels().retry>=1&&this._instance.initializationData().logger.trace(this._instance.traceLevels().retryCat,"operation retry canceled\n"+t.toString()),this._outAsync.completedEx(t))}}]),e}(),t=function(){"use strict";function t(e){h(this,t),this._instance=e,this._requests=[]}return f(t,[{key:"add",value:function(t,i){if(null===this._instance)throw new Ice.CommunicatorDestroyedException;var n=new e(this._instance,this,t);t.cancelable(n),n.token=this._instance.timer().schedule((function(){return n.run()}),i),this._requests.push(n)}},{key:"destroy",value:function(){var e=this;this._requests.forEach((function(t){e._instance.timer().cancel(t.token),t.destroy()})),this._requests=[],this._instance=null}},{key:"remove",value:function(e){var t=this._requests.indexOf(e);t>=0&&this._requests.splice(t,1)}},{key:"cancel",value:function(e){var t=this._requests.indexOf(e);return t>=0&&(this._requests.splice(t,1),this._instance.timer().cancel(e.token))}}]),t}();Ice.RetryQueue=t}(),function(){var e=Ice.Debug,t=Ice.HashMap,i=function(){"use strict";function i(n){h(this,i),this._router=n,e.assert(null!==this._router),this._clientEndpoints=null,this._adapter=null,this._identities=new t(t.compareEquals),this._evictedIdentities=[],this._hasRoutingTable=!1}return f(i,[{key:"destroy",value:function(){this._clientEndpoints=[],this._adapter=null,this._identities.clear()}},{key:"equals",value:function(e){return this===e||e instanceof i&&this._router.equals(e._router)}},{key:"hashCode",value:function(){return this._router.hashCode()}},{key:"getRouter",value:function(){return this._router}},{key:"getClientEndpoints",value:function(){var e=this,t=new Ice.Promise;return null!==this._clientEndpoints?t.resolve(this._clientEndpoints):this._router.getClientProxy().then((function(i){return e.setClientEndpoints(i[0],void 0===i[1]||i[1],t)})).catch(t.reject),t}},{key:"getServerEndpoints",value:function(){return this._router.getServerProxy().then((function(e){if(null===e)throw new Ice.NoEndpointException;return e=e.ice_router(null),e._getReference().getEndpoints()}))}},{key:"addProxy",value:function(t){var i=this;return e.assert(null!==t),this._hasRoutingTable?this._identities.has(t.ice_getIdentity())?Ice.Promise.resolve():this._router.addProxies([t]).then((function(e){i.addAndEvictProxies(t,e)})):Ice.Promise.resolve()}},{key:"setAdapter",value:function(e){this._adapter=e}},{key:"getAdapter",value:function(){return this._adapter}},{key:"clearCache",value:function(e){this._identities.delete(e.getIdentity())}},{key:"setClientEndpoints",value:function(e,t,i){var n=this;null===this._clientEndpoints?(this._hasRoutingTable=t,null===e?(this._clientEndpoints=this._router._getReference().getEndpoints(),i.resolve(this._clientEndpoints)):(e=e.ice_router(null),this._router.ice_getConnection().then((function(t){n._clientEndpoints=e.ice_timeout(t.timeout())._getReference().getEndpoints(),i.resolve(n._clientEndpoints)})).catch(i.reject))):i.resolve(this._clientEndpoints)}},{key:"addAndEvictProxies",value:function(e,t){var i=this,n=this._evictedIdentities.findIndex((function(t){return t.equals(e.ice_getIdentity())}));n>=0?this._evictedIdentities.splice(n,1):this._identities.set(e.ice_getIdentity(),1),t.forEach((function(e){i._identities.delete(e.ice_getIdentity())}))}}]),i}();Ice.RouterInfo=i}(),function(){Ice.CompressBatch=p.defineEnum([["Yes",0],["No",1],["BasedOnProxy",2]]),Ice.ConnectionInfo=function(){"use strict";return f((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";h(this,e),this.underlying=t,this.incoming=i,this.adapterName=n,this.connectionId=r}))}(),Ice.ACMClose=p.defineEnum([["CloseOff",0],["CloseOnIdle",1],["CloseOnInvocation",2],["CloseOnInvocationAndIdle",3],["CloseOnIdleForceful",4]]),Ice.ACMHeartbeat=p.defineEnum([["HeartbeatOff",0],["HeartbeatOnDispatch",1],["HeartbeatOnIdle",2],["HeartbeatAlways",3]]),Ice.ACM=function(){"use strict";return f((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ice.ACMClose.CloseOff,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ice.ACMHeartbeat.HeartbeatOff;h(this,e),this.timeout=t,this.close=i,this.heartbeat=n}))}(),p.defineStruct(Ice.ACM,!0,!0),Ice.ConnectionClose=p.defineEnum([["Forcefully",0],["Gracefully",1],["GracefullyWithWait",2]]),Ice.IPConnectionInfo=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r,s){var a,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:-1,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:-1;return h(this,i),a=t.call(this,e,n,r,s),a.localAddress=o,a.localPort=c,a.remoteAddress=u,a.remotePort=l,a}return f(i)}(Ice.ConnectionInfo),Ice.TCPConnectionInfo=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r,s,a,o,c,u){var l,d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,f=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0;return h(this,i),l=t.call(this,e,n,r,s,a,o,c,u),l.rcvSize=d,l.sndSize=f,l}return f(i)}(Ice.IPConnectionInfo),Ice.UDPConnectionInfo=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r,s,a,o,c,u){var l,d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",f=arguments.length>9&&void 0!==arguments[9]?arguments[9]:-1,g=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,p=arguments.length>11&&void 0!==arguments[11]?arguments[11]:0;return h(this,i),l=t.call(this,e,n,r,s,a,o,c,u),l.mcastAddress=d,l.mcastPort=f,l.rcvSize=g,l.sndSize=p,l}return f(i)}(Ice.IPConnectionInfo),p.defineDictionary(Ice,"HeaderDict","HeaderDictHelper","Ice.StringHelper","Ice.StringHelper",!1,void 0,void 0),Ice.WSConnectionInfo=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r,s){var a,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;return h(this,i),a=t.call(this,e,n,r,s),a.headers=o,a}return f(i)}(Ice.ConnectionInfo)}(),function(){var e=Ice._ModuleRegistry,t=[Ice.ByteHelper,Ice.BoolHelper,Ice.ShortHelper,Ice.IntHelper,Ice.LongHelper,Ice.FloatHelper,Ice.DoubleHelper,Ice.StringHelper,Ice.Value,Ice.ObjectPrx,Ice.Value];function i(i){var n=i[0],r=c(n);return"number"===r?n=t[i[0]]:"string"===r&&(n=e.type(n)),{type:n,isObject:!0===i[1],tag:i[2]}}function n(e,t){var n,r={};r.name=e,r.servantMethod=t[0]?t[0]:e,r.mode=t[1]?Ice.OperationMode.valueOf(t[1]):Ice.OperationMode.Normal,r.sendMode=t[2]?Ice.OperationMode.valueOf(t[2]):Ice.OperationMode.Normal,r.format=t[3]?Ice.FormatType.valueOf(t[3]):Ice.FormatType.DefaultFormat,t[4]&&(n=i(t[4]),n.pos=0),r.returns=n;var s=[],a=[];if(t[5])for(var o=0;o<t[5].length;++o){var c=i(t[5][o]);c.pos=o,s.push(c),c.tag&&a.push(c)}a.sort((function(e,t){return e.tag-t.tag})),r.inParams=s,r.inParamsOpt=a;var u=[],l=[];if(t[6])for(var d=n?1:0,h=0;h<t[6].length;++h){var f=i(t[6][h]);f.pos=h+d,u.push(f),f.tag&&l.push(f)}n&&n.tag&&l.push(n),l.sort((function(e,t){return e.tag-t.tag})),r.outParams=u,r.outParamsOpt=l;var g=[];if(t[7])for(var p=0;p<t[7].length;++p)g.push(t[7][p]);return r.exceptions=g,r.sendsClasses=!0===t[8],r.returnsClasses=!0===t[9],r}var r=function(){"use strict";function e(t){h(this,e),this.raw=t,this.parsed={}}return f(e,[{key:"find",value:function(e){var t=this.parsed[e];return void 0===t&&void 0!==this.raw[e]&&(t=n(e,this.raw[e]),this.parsed[e]=t),t}}]),e}();function s(e,t,i,n,r,s,a){for(var o=function(t,i){i?t.isObject?e.readOptionalValue(t.tag,(function(e){s[t.pos+a]=e}),t.type):s[t.pos+a]=t.type.readOptional(e,t.tag):t.isObject?e.readValue((function(e){s[t.pos+a]=e}),t.type):s[t.pos+a]=t.type.read(e)},c=0;c<i.length;++c)i[c].tag||o(i[c],!1);t&&o(t,!1);for(var u=0;u<n.length;++u)o(n[u],!0);r&&e.readPendingValues()}function a(e,t,i,n,r,s){for(var a=0;a<n.length;++a){var o=n[a];o.tag||o.type.write(e,t[o.pos])}i&&i.type.write(e,t[i.pos]);for(var c=0;c<r.length;++c){var u=r[c];u.type.writeOptional(e,u.tag,t[u.pos])}s&&e.writePendingValues()}function o(e,t,i){for(var n,r=0;void 0===n&&r<e.length;++r){var s=e[r];n=s[t],void 0===n&&(-1===i.indexOf(s)&&i.push(s),s._iceImplements&&(n=o(s._iceImplements,t,i)))}return n}function u(e,t){var i,n="_iceD_"+t,r=e[n];if(void 0===r){i=[];var c=e;while(c&&void 0===r)c._iceImplements&&(r=o(c._iceImplements,n,i)),c=Object.getPrototypeOf(c);void 0!==r&&(e[n]=r)}if(void 0===r){var u,l;if(e._iceOps&&(u=e._iceOps.find(t)),void 0===u){var d=Object.getPrototypeOf(e);while(void 0===u&&d)d._iceOps&&void 0!==(u=d._iceOps.find(t))&&(l=d),d=Object.getPrototypeOf(d);for(var h=0;void 0===u&&h<i.length;++h){var f=i[h];f._iceOps&&void 0!==(u=f._iceOps.find(t))&&(l=f)}}void 0!==u&&(r=function(e,t,i){return function(e,t,i,n){var r=e[t.servantMethod];if(void 0===r||"function"!==typeof r)throw new Ice.UnknownException("servant for identity "+n.adapter.getCommunicator().identityToString(n.id)+" does not define operation `"+t.servantMethod+"'");var o=[];if(0===t.inParams.length)i.readEmptyParams();else{var c=i.startReadParams();s(c,void 0,t.inParams,t.inParamsOpt,t.sendsClasses,o,0),i.endReadParams()}o.push(n),i.setFormat(t.format);var u=function(e){var n=t.outParams.length+(t.returns?1:0);if(n>1&&!(e instanceof Array))throw new Ice.MarshalException("operation `"+t.servantMethod+"' should return an array");if(1===n&&(e=[e]),void 0===t.returns&&0===t.outParams.length){if(e&&e.length>0)throw new Ice.MarshalException("operation `"+t.servantMethod+"' shouldn't return any value");i.writeEmptyParams()}else{var r;t.returns&&!t.returns.tag&&(r=t.returns);var s=i.startWriteParams();a(s,e,r,t.outParams,t.outParamsOpt,t.returnsClasses),i.endWriteParams()}},l=r.apply(e,o);return l instanceof Promise?l.then(u):(u(l),null)}(e,u,t,i)},e[n]=r,l&&(l[n]=r))}return r}function l(e,t,i){var r=i[0]?i[0]:t,o=null;e.prototype[r]=function(){null===o&&(o=n(t,i));for(var e=arguments.length,r=new Array(e),c=0;c<e;c++)r[c]=arguments[c];var u=r[o.inParams.length],l=null;o.inParams.length>0&&(l=function(e,t){for(var i=0;i<o.inParams.length;++i){var n=o.inParams[i],r=t[n.pos];if((!n.tag||void 0!==r)&&"function"===typeof n.type.validate&&!n.type.validate(r))throw new Ice.MarshalException("invalid value for argument "+(i+1)+" in operation `"+o.servantMethod+"'")}a(e,t,void 0,o.inParams,o.inParamsOpt,o.sendsClasses)});var d=null;return(o.returns||o.outParams.length>0)&&(d=function(e){var t,i=[],n=e.startReadParams();return o.returns&&!o.returns.tag&&(t=o.returns),s(n,t,o.outParams,o.outParamsOpt,o.returnsClasses,i,0),e.endReadParams(),1==i.length?i[0]:i}),Ice.ObjectPrx._invoke(this,o.name,o.sendMode,o.format,u,l,d,o.exceptions,Array.prototype.slice.call(r))}}var d=Ice.Slice;d.defineOperations=function(e,t,i,n,s){if(s&&(e._iceOps=new r(s)),e.prototype._iceDispatch=function(t,i){var n=u(e,i.operation);if(void 0===n||"function"!==typeof n)throw new Ice.OperationNotExistException(i.id,i.facet,i.operation);return n.call(n,this,t,i)},e.prototype._iceMostDerivedType=function(){return e},Object.defineProperty(e,"_iceIds",{get:function(){return i}}),Object.defineProperty(e,"_iceId",{get:function(){return i[n]}}),e.ice_staticId=function(){return e._iceId},void 0!==t){if(s)for(var a in s)l(t,a,s[a]);if(t._implements)for(var o in t._implements){var c=t._implements[o].prototype;for(var d in c)"function"==typeof c[d]&&void 0===t.prototype[d]&&(t.prototype[d]=c[d])}Object.defineProperty(t,"_id",{get:function(){return i[n]}})}},d.defineOperations(Ice.Object,Ice.ObjectPrx,["::Ice::Object"],0,{ice_ping:[void 0,1,1,void 0,void 0,void 0,void 0,void 0],ice_isA:[void 0,1,1,void 0,[1],[[7]],void 0,void 0],ice_id:[void 0,1,1,void 0,[7],void 0,void 0,void 0],ice_ids:[void 0,1,1,void 0,["Ice.StringSeqHelper"],void 0,void 0,void 0]})}(),function(){Ice.Router=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.Object),Ice.RouterPrx=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.ObjectPrx),p.defineOperations(Ice.Router,Ice.RouterPrx,["::Ice::Object","::Ice::Router"],1,{getClientProxy:[,2,1,,[9],,[[1,,1]],,,],getServerProxy:[,2,1,,[9],,,,,],addProxies:[,2,2,,["Ice.ObjectProxySeqHelper"],[["Ice.ObjectProxySeqHelper"]],,,,]});Ice.RouterFinder=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.Object),Ice.RouterFinderPrx=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.ObjectPrx),p.defineOperations(Ice.RouterFinder,Ice.RouterFinderPrx,["::Ice::Object","::Ice::RouterFinder"],1,{getRouter:[,,,,["Ice.RouterPrx"],,,,,]})}(),function(){var e=Ice.OutputStream,t=Ice.Current,i=Ice.Debug,n=Ice.Context,r=Ice.Identity,s=Ice.Protocol,a=Ice.StringUtil,o=function(){"use strict";function o(e,i,n,s,a){h(this,o),this._instance=e,this._response=s,this._connection=i,this._format=Ice.FormatType.DefaultFormat,this._current=new t,this._current.id=new r,this._current.adapter=n,this._current.con=this._connection,this._current.requestId=a,this._servant=null,this._locator=null,this._cookie={value:null},this._os=null,this._is=null}return f(o,[{key:"startWriteParams",value:function(){if(!this._response)throw new Ice.MarshalException("can't marshal out parameters for oneway dispatch");return i.assert(null!==this._current.encoding),this._os=new e(this._instance,s.currentProtocolEncoding),this._os.writeBlob(s.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(0),this._os.startEncapsulation(this._current.encoding,this._format),this._os}},{key:"endWriteParams",value:function(){this._response&&this._os.endEncapsulation()}},{key:"writeEmptyParams",value:function(){this._response&&(i.assert(null!==this._current.encoding),this._os=new e(this._instance,s.currentProtocolEncoding),this._os.writeBlob(s.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(s.replyOK),this._os.writeEmptyEncapsulation(this._current.encoding))}},{key:"writeParamEncaps",value:function(t,n){this._response&&(i.assert(null!==this._current.encoding),this._os=new e(this._instance,s.currentProtocolEncoding),this._os.writeBlob(s.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(n?s.replyOK:s.replyUserException),null===t||0===t.length?this._os.writeEmptyEncapsulation(this._current.encoding):this._os.writeEncapsulation(t))}},{key:"setFormat",value:function(e){this._format=e}},{key:"warning",value:function(e){i.assert(null!==this._instance);var t=[];if(t.push("dispatch exception:"),t.push("\nidentity: "+Ice.identityToString(this._current.id,this._instance.toStringMode())),t.push("\nfacet: "+a.escapeString(this._current.facet,"",this._instance.toStringMode())),t.push("\noperation: "+this._current.operation),null!==this._connection)try{for(var n=this._connection.getInfo();n;n=n.underlying)n instanceof Ice.IPConnectionInfo&&t.push("\nremote host: "+n.remoteAddress+" remote port: "+n.remotePort)}catch(r){}e.stack&&(t.push("\n"),t.push(e.stack)),this._instance.initializationData().logger.warning(t.join(""))}},{key:"handleException",value:function(t,n){i.assert(null!==this._connection);var r=this._instance.initializationData().properties;if(t instanceof Ice.RequestFailedException)null===t.id&&(t.id=this._current.id),null===t.facet&&(t.facet=this._current.facet),null!==t.operation&&0!==t.operation.length||(t.operation=this._current.operation),r.getPropertyAsIntWithDefault("Ice.Warn.Dispatch",1)>1&&this.warning(t),this._response?(this._os=new e(this._instance,s.currentProtocolEncoding),this._os.writeBlob(s.replyHdr),this._os.writeInt(this._current.requestId),t instanceof Ice.ObjectNotExistException?this._os.writeByte(s.replyObjectNotExist):t instanceof Ice.FacetNotExistException?this._os.writeByte(s.replyFacetNotExist):t instanceof Ice.OperationNotExistException?this._os.writeByte(s.replyOperationNotExist):i.assert(!1),t.id._write(this._os),null===t.facet||0===t.facet.length?Ice.StringSeqHelper.write(this._os,null):Ice.StringSeqHelper.write(this._os,[t.facet]),this._os.writeString(t.operation),this._connection.sendResponse(this._os)):this._connection.sendNoResponse();else if(t instanceof Ice.UnknownLocalException)r.getPropertyAsIntWithDefault("Ice.Warn.Dispatch",1)>0&&this.warning(t),this._response?(this._os=new e(this._instance,s.currentProtocolEncoding),this._os.writeBlob(s.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(s.replyUnknownLocalException),this._os.writeString(t.unknown),this._connection.sendResponse(this._os)):this._connection.sendNoResponse();else if(t instanceof Ice.UnknownUserException)r.getPropertyAsIntWithDefault("Ice.Warn.Dispatch",1)>0&&this.warning(t),this._response?(this._os=new e(this._instance,s.currentProtocolEncoding),this._os.writeBlob(s.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(s.replyUnknownUserException),this._os.writeString(t.unknown),this._connection.sendResponse(this._os)):this._connection.sendNoResponse();else if(t instanceof Ice.UnknownException)r.getPropertyAsIntWithDefault("Ice.Warn.Dispatch",1)>0&&this.warning(t),this._response?(this._os=new e(this._instance,s.currentProtocolEncoding),this._os.writeBlob(s.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(s.replyUnknownException),this._os.writeString(t.unknown),this._connection.sendResponse(this._os)):this._connection.sendNoResponse();else if(t instanceof Ice.LocalException)if(r.getPropertyAsIntWithDefault("Ice.Warn.Dispatch",1)>0&&this.warning(t),this._response){this._os=new e(this._instance,s.currentProtocolEncoding),this._os.writeBlob(s.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(s.replyUnknownLocalException);var a=[t.ice_id()];t.stack&&(a.push("\n"),a.push(t.stack)),this._os.writeString(a.join("")),this._connection.sendResponse(this._os)}else this._connection.sendNoResponse();else t instanceof Ice.UserException?this._response?(this._os=new e(this._instance,s.currentProtocolEncoding),this._os.writeBlob(s.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(s.replyUserException),this._os.startEncapsulation(this._current.encoding,this._format),this._os.writeException(t),this._os.endEncapsulation(),this._connection.sendResponse(this._os)):this._connection.sendNoResponse():(r.getPropertyAsIntWithDefault("Ice.Warn.Dispatch",1)>0&&this.warning(t),this._response?(this._os=new e(this._instance,s.currentProtocolEncoding),this._os.writeBlob(s.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(s.replyUnknownException),this._os.writeString(t.toString()+(t.stack?"\n"+t.stack:"")),this._connection.sendResponse(this._os)):this._connection.sendNoResponse());this._connection=null}},{key:"invoke",value:function(e,t){var r=this;this._is=t,this._current.id._read(this._is);var s=Ice.StringSeqHelper.read(this._is);if(s.length>0){if(s.length>1)throw new Ice.MarshalException;this._current.facet=s[0]}else this._current.facet="";this._current.operation=this._is.readString(),this._current.mode=Ice.OperationMode.valueOf(this._is.readByte()),this._current.ctx=new n;var a=this._is.readSize();while(a-- >0)this._current.ctx.set(this._is.readString(),this._is.readString());if(null!==e&&(this._servant=e.findServant(this._current.id,this._current.facet),null===this._servant&&(this._locator=e.findServantLocator(this._current.id.category),null===this._locator&&this._current.id.category.length>0&&(this._locator=e.findServantLocator("")),null!==this._locator)))try{this._servant=this._locator.locate(this._current,this._cookie)}catch(c){return this.skipReadParams(),void this.handleException(c,!1)}if(null===this._servant)try{throw null!==e&&e.hasServant(this._current.id)?new Ice.FacetNotExistException(this._current.id,this._current.facet,this._current.operation):new Ice.ObjectNotExistException(this._current.id,this._current.facet,this._current.operation)}catch(c){return this.skipReadParams(),void this.handleException(c,!1)}try{i.assert(null!==this._servant);var o=this._servant._iceDispatch(this,this._current);if(null!==o)return void o.then((function(){return r.completed(null,!0)}),(function(e){return r.completed(e,!0)}));i.assert(!this._response||null!==this._os),this.completed(null,!1)}catch(c){this.completed(c,!1)}}},{key:"startReadParams",value:function(){return this._current.encoding=this._is.startEncapsulation(),this._is}},{key:"endReadParams",value:function(){this._is.endEncapsulation()}},{key:"readEmptyParams",value:function(){this._current.encoding=this._is.skipEmptyEncapsulation()}},{key:"readParamEncaps",value:function(){return this._current.encoding=new Ice.EncodingVersion,this._is.readEncapsulation(this._current.encoding)}},{key:"skipReadParams",value:function(){this._current.encoding=this._is.skipEncapsulation()}},{key:"completed",value:function(e,t){try{if(null!==this._locator){i.assert(null!==this._locator&&null!==this._servant);try{this._locator.finished(this._current,this._servant,this._cookie.value)}catch(n){return void this.handleException(n,t)}}i.assert(null!==this._connection),null!==e?this.handleException(e,t):this._response?this._connection.sendResponse(this._os):this._connection.sendNoResponse()}catch(n){if(!(n instanceof Ice.LocalException))throw n;this._connection.invokeException(n,1)}this._connection=null}}]),o}();Ice.IncomingAsync=o}(),function(){var e=Ice.Debug,t=f((function e(t,i,n,r){"use strict";if(h(this,e),void 0===t)return this.timeout=6e4,this.heartbeat=Ice.ACMHeartbeat.HeartbeatOnDispatch,void(this.close=Ice.ACMClose.CloseOnInvocationAndIdle);var s;s="Ice.ACM.Client"!=n&&"Ice.ACM.Server"!=n||0!==t.getProperty(n+".Timeout").length?n+".Timeout":n,this.timeout=1e3*t.getPropertyAsIntWithDefault(s,r.timeout/1e3),this.timeout<0&&(i.warning("invalid value for property `"+s+"', default value will be used instead"),this.timeout=r.timeout);var a=t.getPropertyAsIntWithDefault(n+".Heartbeat",r.heartbeat.value);a>=0&&a<=Ice.ACMHeartbeat.maxValue?this.heartbeat=Ice.ACMHeartbeat.valueOf(a):(i.warning("invalid value for property `"+n+".Heartbeat', default value will be used instead"),this.heartbeat=r.heartbeat);var o=t.getPropertyAsIntWithDefault(n+".Close",r.close.value);o>=0&&o<=Ice.ACMClose.maxValue?this.close=Ice.ACMClose.valueOf(o):(i.warning("invalid value for property `"+n+".Close', default value will be used instead"),this.close=r.close)})),i=function(){"use strict";function i(e,t){h(this,i),this._instance=e,this._config=t,this._reapedConnections=[],this._connections=[]}return f(i,[{key:"destroy",value:function(){null!==this._instance&&(this._instance=null)}},{key:"add",value:function(e){var t=this;0!==this._config.timeout&&(this._connections.push(e),1==this._connections.length&&(this._timerToken=this._instance.timer().scheduleRepeated((function(){return t.runTimerTask()}),this._config.timeout/2)))}},{key:"remove",value:function(t){if(0!==this._config.timeout){var i=this._connections.indexOf(t);e.assert(i>=0),this._connections.splice(i,1),0===this._connections.length&&this._instance.timer().cancel(this._timerToken)}}},{key:"reap",value:function(e){this._reapedConnections.push(e)}},{key:"acm",value:function(i,r,s){e.assert(null!==this._instance);var a=new t;return a.timeout=this._config.timeout,a.close=this._config.close,a.heartbeat=this._config.heartbeat,void 0!==i&&(a.timeout=1e3*i),void 0!==r&&(a.close=r),void 0!==s&&(a.heartbeat=s),new n(this,this._instance.timer(),a)}},{key:"getACM",value:function(){return new Ice.ACM(this._config.timeout/1e3,this._config.close,this._config.heartbeat)}},{key:"swapReapedConnections",value:function(){if(0===this._reapedConnections.length)return null;var e=this._reapedConnections;return this._reapedConnections=[],e}},{key:"runTimerTask",value:function(){var e=this;if(null!==this._instance){var t=Date.now();this._connections.forEach((function(i){try{i.monitor(t,e._config)}catch(n){e.handleException(n)}}))}else this._connections=null}},{key:"handleException",value:function(e){null!==this._instance&&this._instance.initializationData().logger.error("exception in connection monitor:\n"+e)}}]),i}(),n=function(){"use strict";function t(e,i,n){h(this,t),this._parent=e,this._timer=i,this._config=n,this._connection=null}return f(t,[{key:"add",value:function(t){var i=this;e.assert(null===this._connection),this._connection=t,this._config.timeout>0&&(this._timerToken=this._timer.scheduleRepeated((function(){return i.runTimerTask()}),this._config.timeout/2))}},{key:"remove",value:function(t){e.assert(this._connection===t),this._connection=null,this._config.timeout>0&&this._timer.cancel(this._timerToken)}},{key:"reap",value:function(e){this._parent.reap(e)}},{key:"acm",value:function(e,t,i){return this._parent.acm(e,t,i)}},{key:"getACM",value:function(){return new Ice.ACM(this._config.timeout/1e3,this._config.close,this._config.heartbeat)}},{key:"runTimerTask",value:function(){try{this._connection.monitor(Date.now(),this._config)}catch(e){this._parent.handleException(e)}}}]),t}();Ice.FactoryACMMonitor=i,Ice.ACMConfig=t}(),function(){Ice.Process=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.Object),Ice.ProcessPrx=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.ObjectPrx),p.defineOperations(Ice.Process,Ice.ProcessPrx,["::Ice::Object","::Ice::Process"],1,{shutdown:[,,,,,,,,,],writeMessage:[,,,,,[[7],[3]],,,,]})}(),function(){var e=Ice.HashMap,t=Ice.Debug,i=f((function e(t,i){"use strict";h(this,e),this.time=t,this.endpoints=i})),n=f((function e(t,i){"use strict";h(this,e),this.time=t,this.reference=i})),r=function(){"use strict";function r(){h(this,r),this._adapterEndpointsTable=new Map,this._objectTable=new e(e.compareEquals)}return f(r,[{key:"clear",value:function(){this._adapterEndpointsTable.clear(),this._objectTable.clear()}},{key:"getAdapterEndpoints",value:function(e,t,i){if(0===t)return i.value=!1,null;var n=this._adapterEndpointsTable.get(e);return void 0!==n?(i.value=this.checkTTL(n.time,t),n.endpoints):(i.value=!1,null)}},{key:"addAdapterEndpoints",value:function(e,t){this._adapterEndpointsTable.set(e,new i(Date.now(),t))}},{key:"removeAdapterEndpoints",value:function(e){var t=this._adapterEndpointsTable.get(e);return this._adapterEndpointsTable.delete(e),void 0!==t?t.endpoints:null}},{key:"getObjectReference",value:function(e,t,i){if(0===t)return i.value=!1,null;var n=this._objectTable.get(e);return void 0!==n?(i.value=this.checkTTL(n.time,t),n.reference):(i.value=!1,null)}},{key:"addObjectReference",value:function(e,t){this._objectTable.set(e,new n(Date.now(),t))}},{key:"removeObjectReference",value:function(e){var t=this._objectTable.get(e);return this._objectTable.delete(e),void 0!==t?t.reference:null}},{key:"checkTTL",value:function(e,i){return t.assert(0!==i),i<0||Date.now()-e<=1e3*i}}]),r}();Ice.LocatorTable=r}(),function(){var e=f((function e(t,i){"use strict";h(this,e),this.host=t,this.port=i}));Ice.Address=e}(),function(){var e=Ice.Address,t=Ice.HashUtil,i=Ice.StringUtil,r=Ice.EndpointParseException,s=function(s){"use strict";u(o,s);var a=v(o);function o(e,t,i,n,r){var s;return h(this,o),s=a.call(this),s._instance=e,s._host=void 0===t?null:t,s._port=void 0===i?0:i,s._sourceAddr=void 0===n?null:n,s._connectionId=void 0===r?"":r,s}return f(o,[{key:"streamWrite",value:function(e){e.startEncapsulation(),this.streamWriteImpl(e),e.endEncapsulation()}},{key:"getInfo",value:function(){var e=new Ice.IPEndpointInfo;return this.fillEndpointInfo(e),e}},{key:"type",value:function(){return this._instance.type()}},{key:"protocol",value:function(){return this._instance.protocol()}},{key:"secure",value:function(){return this._instance.secure()}},{key:"connectionId",value:function(){return this._connectionId}},{key:"changeConnectionId",value:function(e){return e===this._connectionId?this:this.createEndpoint(this._host,this._port,e)}},{key:"hashCode",value:function(){return void 0===this._hashCode&&(this._hashCode=this.hashInit(5381)),this._hashCode}},{key:"options",value:function(){var e="";if(null!==this._host&&this._host.length>0){e+=" -h ";var t=-1!=this._host.indexOf(":");t&&(e+='"'),e+=this._host,t&&(e+='"')}if(e+=" -p "+this._port,null!==this._sourceAddr&&this._sourceAddr.length>0){e+=" --sourceAddress ";var i=-1!=this._sourceAddr.indexOf(":");i&&(e+='"'),e+=this._sourceAddr,i&&(e+='"')}return e}},{key:"compareTo",value:function(e){return this===e?0:null===e?1:e instanceof o?this._port<e._port?-1:e._port<this._port?1:this._host!=e._host?this._host<e._host?-1:1:this._sourceAddr!=e._sourceAddr?this._sourceAddr<e._sourceAddr?-1:1:this._connectionId!=e._connectionId?this._connectionId<e._connectionId?-1:1:0:this.type()<e.type()?-1:1}},{key:"getAddress",value:function(){return new e(this._host,this._port)}},{key:"toConnectorString",value:function(){return this._host+":"+this._port}},{key:"streamWriteImpl",value:function(e){e.writeString(this._host),e.writeInt(this._port)}},{key:"hashInit",value:function(e){return e=t.addNumber(e,this.type()),e=t.addString(e,this._host),e=t.addNumber(e,this._port),e=t.addString(e,this._sourceAddr),e=t.addString(e,this._connectionId),e}},{key:"fillEndpointInfo",value:function(e){var t=this;e.type=function(){return t.type()},e.datagram=function(){return t.datagram()},e.secure=function(){return t.secure()},e.host=this._host,e.port=this._port,e.sourceAddress=this._sourceAddr}},{key:"initWithOptions",value:function(e,t){if(n(d(o.prototype),"initWithOptions",this).call(this,e),null===this._host||0===this._host.length)this._host=this._instance.defaultHost();else if("*"==this._host){if(!t)throw new r("`-h *' not valid for proxy endpoint `"+this+"'");this._host=""}if(null===this._host&&(this._host=""),null===this._sourceAddr)t||(this._sourceAddr=this._instance.defaultSourceAddress());else if(t)throw new r("`--sourceAddress not valid for object adapter endpoint `"+this+"'")}},{key:"initWithStream",value:function(e){this._host=e.readString(),this._port=e.readInt()}},{key:"checkOption",value:function(e,t,n){if("-h"===e){if(null===t)throw new r("no argument provided for -h option in endpoint "+n);this._host=t}else if("-p"===e){if(null===t)throw new r("no argument provided for -p option in endpoint "+n);try{this._port=i.toInt(t)}catch(s){throw new r("invalid port value `"+t+"' in endpoint "+n)}if(this._port<0||this._port>65535)throw new r("port value `"+t+"' out of range in endpoint "+n)}else{if("--sourceAddress"!==e)return!1;if(null===t)throw new r("no argument provided for --sourceAddress option in endpoint "+n);this._sourceAddr=t}return!0}}]),o}(Ice.EndpointI);Ice.IPEndpointI=s}(),function(){IceSSL.EndpointInfo=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r){return h(this,i),t.call(this,e,n,r)}return f(i)}(Ice.EndpointInfo)}(),function(){Ice.ToStringMode=Ice.Slice.defineEnum([["Unicode",0],["ASCII",1],["Compat",2]])}(),function(){Ice.TraceLevels=function(e){var t="Ice.Trace.",i=e.getPropertyAsInt(t+"Network"),n=e.getPropertyAsInt(t+"Protocol"),r=e.getPropertyAsInt(t+"Retry"),s=e.getPropertyAsInt(t+"Locator"),a=e.getPropertyAsInt(t+"Slicing");return e.getPropertyAsInt(t+"ThreadPool"),function(){"use strict";function e(){h(this,e)}return f(e,null,[{key:"network",get:function(){return i}},{key:"networkCat",get:function(){return"Network"}},{key:"protocol",get:function(){return n}},{key:"protocolCat",get:function(){return"Protocol"}},{key:"retry",get:function(){return r}},{key:"retryCat",get:function(){return"Retry"}},{key:"location",get:function(){return s}},{key:"locationCat",get:function(){return"Locator"}},{key:"slicing",get:function(){return a}},{key:"slicingCat",get:function(){return"Slicing"}}]),e}()}}(),function(){var e=Ice.AsyncStatus,t=Ice.AsyncResultBase,i=Ice.InputStream,n=Ice.OutputStream,r=Ice.BatchRequestQueue,a=Ice.ConnectionFlushBatch,o=Ice.HeartbeatAsync,c=Ice.Debug,u=Ice.ExUtil,l=Ice.HashMap,d=Ice.IncomingAsync,p=Ice.RetryException,v=Ice.Protocol,m=Ice.SocketOperation,y=Ice.Timer,_=Ice.TraceUtil,S=Ice.ProtocolVersion,I=Ice.EncodingVersion,w=Ice.ACM,k=Ice.ACMClose,C=Ice.ACMHeartbeat,b=Ice.ConnectionClose,E=f((function e(t){"use strict";h(this,e),this.stream=new i(t,v.currentProtocolEncoding),this.invokeNum=0,this.requestId=0,this.servantManager=null,this.adapter=null,this.outAsync=null,this.heartbeatCallback=null})),T=function(){"use strict";function T(e,t,s,a,o,c,u){h(this,T),this._communicator=e,this._instance=t,this._monitor=s,this._transceiver=a,this._desc=a.toString(),this._type=a.type(),this._endpoint=o,this._incoming=c,this._adapter=u;var d=t.initializationData();this._logger=d.logger,this._traceLevels=t.traceLevels(),this._timer=t.timer(),this._writeTimeoutId=0,this._writeTimeoutScheduled=!1,this._readTimeoutId=0,this._readTimeoutScheduled=!1,this._hasMoreData={value:!1},this._warn=d.properties.getPropertyAsInt("Ice.Warn.Connections")>0,this._warnUdp=t.initializationData().properties.getPropertyAsInt("Ice.Warn.Datagrams")>0,this._acmLastActivity=null!==this._monitor&&this._monitor.getACM().timeout>0?Date.now():-1,this._nextRequestId=1,this._messageSizeMax=u?u.messageSizeMax():t.messageSizeMax(),this._batchRequestQueue=new r(t,o.datagram()),this._sendStreams=[],this._readStream=new i(t,v.currentProtocolEncoding),this._readHeader=!1,this._writeStream=new n(t,v.currentProtocolEncoding),this._readStreamPos=-1,this._writeStreamPos=-1,this._dispatchCount=0,this._state=0,this._shutdownInitiated=!1,this._initialized=!1,this._validated=!1,this._readProtocol=new S,this._readProtocolEncoding=new I,this._asyncRequests=new l,this._exception=null,this._startPromise=null,this._closePromises=[],this._finishedPromises=[],null!==this._adapter?this._servantManager=this._adapter.getServantManager():this._servantManager=null,this._closeCallback=null,this._heartbeatCallback=null}return f(T,[{key:"start",value:function(){var e=this;c.assert(null===this._startPromise);try{if(this._state>=5)return c.assert(null!==this._exception),Ice.Promise.reject(this._exception);this._startPromise=new Ice.Promise,this._transceiver.setCallbacks((function(){return e.message(m.Write)}),(function(){return e.message(m.Read)}),(function(){return e.message(m.Write)})),this.initialize()}catch(i){var t=this._startPromise;return this.exception(i),t}return this._startPromise}},{key:"activate",value:function(){this._state<=1||(this._acmLastActivity>0&&(this._acmLastActivity=Date.now()),this.setState(2))}},{key:"hold",value:function(){this._state<=1||this.setState(3)}},{key:"destroy",value:function(e){switch(e){case T.ObjectAdapterDeactivated:this.setState(4,new Ice.ObjectAdapterDeactivatedException);break;case T.CommunicatorDestroyed:this.setState(4,new Ice.CommunicatorDestroyedException);break;default:c.assert(!1);break}}},{key:"close",value:function(e){var i=new t(this._communicator,"close",this,null,null);return e==b.Forcefully?(this.setState(5,new Ice.ConnectionManuallyClosedException(!1)),i.resolve()):e==b.Gracefully?(this.setState(4,new Ice.ConnectionManuallyClosedException(!0)),i.resolve()):(c.assert(e==b.GracefullyWithWait),this._closePromises.push(i),this.checkClose()),i}},{key:"checkClose",value:function(){var e=this;0===this._asyncRequests.size&&this._closePromises.length>0&&y.setImmediate((function(){e.setState(4,new Ice.ConnectionManuallyClosedException(!0)),e._closePromises.forEach((function(e){return e.resolve()})),e._closePromises=[]}))}},{key:"isActiveOrHolding",value:function(){return this._state>1&&this._state<4}},{key:"isFinished",value:function(){return 6===this._state&&0===this._dispatchCount&&(c.assert(6===this._state),!0)}},{key:"throwException",value:function(){if(null!==this._exception)throw c.assert(this._state>=4),this._exception}},{key:"waitUntilFinished",value:function(){var e=new Ice.Promise;return this._finishedPromises.push(e),this.checkState(),e}},{key:"monitor",value:function(e,t){2===this._state&&((t.heartbeat==Ice.ACMHeartbeat.HeartbeatAlways||t.heartbeat!=Ice.ACMHeartbeat.HeartbeatOff&&this._writeStream.isEmpty()&&e>=this._acmLastActivity+t.timeout/4)&&(t.heartbeat!=Ice.ACMHeartbeat.HeartbeatOnDispatch||this._dispatchCount>0)&&this.sendHeartbeatNow(),this._readStream.size>v.headerSize||!this._writeStream.isEmpty()||t.close!=Ice.ACMClose.CloseOff&&e>=this._acmLastActivity+t.timeout&&(t.close==Ice.ACMClose.CloseOnIdleForceful||t.close!=Ice.ACMClose.CloseOnIdle&&this._asyncRequests.size>0?this.setState(5,new Ice.ConnectionTimeoutException):t.close!=Ice.ACMClose.CloseOnInvocation&&0===this._dispatchCount&&this._batchRequestQueue.isEmpty()&&0===this._asyncRequests.size&&this.setState(4,new Ice.ConnectionTimeoutException)))}},{key:"sendAsyncRequest",value:function(e,t,i){var n,r=0,s=e.getOs();if(null!==this._exception)throw new p(this._exception);c.assert(this._state>1),c.assert(this._state<4),this._transceiver.checkSendSize(s),e.cancelable(this),t?(r=this._nextRequestId++,r<=0&&(this._nextRequestId=1,r=this._nextRequestId++),s.pos=v.headerSize,s.writeInt(r)):i>0&&(s.pos=v.headerSize,s.writeInt(i));try{n=this.sendMessage(x.create(e,e.getOs(),r))}catch(a){throw a instanceof Ice.LocalException?(this.setState(5,a),c.assert(null!==this._exception),this._exception):a}return t&&this._asyncRequests.set(r,e),n}},{key:"getBatchRequestQueue",value:function(){return this._batchRequestQueue}},{key:"flushBatchRequests",value:function(){var e=new a(this,this._communicator,"flushBatchRequests");return e.invoke(),e}},{key:"setCloseCallback",value:function(e){var t=this;this._state>=5?null!==e&&y.setImmediate((function(){try{e(t)}catch(i){t._logger.error("connection callback exception:\n"+i+"\n"+t._desc)}})):this._closeCallback=e}},{key:"setHeartbeatCallback",value:function(e){this._state>=5||(this._heartbeatCallback=e)}},{key:"heartbeat",value:function(){var e=new o(this,this._communicator);return e.invoke(),e}},{key:"setACM",value:function(e,t,i){if(void 0!==e&&e<0)throw new RangeError("invalid negative ACM timeout value");null===this._monitor||this._state>=5||(2==this._state&&this._monitor.remove(this),this._monitor=this._monitor.acm(e,t,i),2==this._state&&this._monitor.add(this),this._monitor.getACM().timeout<=0?this._acmLastActivity=-1:2==this._state&&-1==this._acmLastActivity&&(this._acmLastActivity=Date.now()))}},{key:"getACM",value:function(){return null!==this._monitor?this._monitor.getACM():new w(0,k.CloseOff,C.HeartbeatOff)}},{key:"asyncRequestCanceled",value:function(e,t){for(var i=0;i<this._sendStreams.length;i++){var n=this._sendStreams[i];if(n.outAsync===e)return n.requestId>0&&this._asyncRequests.delete(n.requestId),n.canceled(),0!==i&&this._sendStreams.splice(i,1),e.completedEx(t),void this.checkClose()}if(e instanceof Ice.OutgoingAsync){var r,a=g(this._asyncRequests);try{for(a.s();!(r=a.n()).done;){var o=s(r.value,2),c=o[0],u=o[1];if(u===e)return this._asyncRequests.delete(c),e.completedEx(t),void this.checkClose()}}catch(l){a.e(l)}finally{a.f()}}}},{key:"sendResponse",value:function(e){c.assert(this._state>1);try{if(0===--this._dispatchCount&&(6===this._state&&this.reap(),this.checkState()),this._state>=5)throw c.assert(null!==this._exception),this._exception;this.sendMessage(x.createForStream(e,!0)),4===this._state&&0===this._dispatchCount&&this.initiateShutdown()}catch(t){if(!(t instanceof Ice.LocalException))throw t;this.setState(5,t)}}},{key:"sendNoResponse",value:function(){c.assert(this._state>1);try{if(0===--this._dispatchCount&&(6===this._state&&this.reap(),this.checkState()),this._state>=5)throw c.assert(null!==this._exception),this._exception;4===this._state&&0===this._dispatchCount&&this.initiateShutdown()}catch(e){if(!(e instanceof Ice.LocalException))throw e;this.setState(5,e)}}},{key:"endpoint",value:function(){return this._endpoint}},{key:"setAdapter",value:function(e){if(null!==e){if(e.checkForDeactivation(),this._state<=1||this._state>=4)return;this._adapter=e,this._servantManager=e.getServantManager()}else{if(this._state<=1||this._state>=4)return;this._adapter=null,this._servantManager=null}}},{key:"getAdapter",value:function(){return this._adapter}},{key:"getEndpoint",value:function(){return this._endpoint}},{key:"createProxy",value:function(e){return this._instance.proxyFactory().referenceToProxy(this._instance.referenceFactory().createFixed(e,this))}},{key:"message",value:function(e){var t=this;if(!(this._state>=5)){this.unscheduleTimeout(e),this._hasMoreData.value=0!==(e&m.Read);var i=null;try{if(0!==(e&m.Write)&&this._writeStream.buffer.remaining>0){if(!this.write(this._writeStream.buffer))return c.assert(!this._writeStream.isEmpty()),void this.scheduleTimeout(m.Write);c.assert(0===this._writeStream.buffer.remaining)}if(0!==(e&m.Read)&&!this._readStream.isEmpty()){if(this._readHeader){if(!this.read(this._readStream.buffer))return;c.assert(0===this._readStream.buffer.remaining),this._readHeader=!1,this._validated=!0;var n=this._readStream.pos;if(n<v.headerSize)throw new Ice.IllegalMessageSizeException;this._readStream.pos=0;var r=this._readStream.readByte(),s=this._readStream.readByte(),a=this._readStream.readByte(),o=this._readStream.readByte();if(r!==v.magic[0]||s!==v.magic[1]||a!==v.magic[2]||o!==v.magic[3])throw new Ice.BadMagicException("",new Uint8Array([r,s,a,o]));this._readProtocol._read(this._readStream),v.checkSupportedProtocol(this._readProtocol),this._readProtocolEncoding._read(this._readStream),v.checkSupportedProtocolEncoding(this._readProtocolEncoding),this._readStream.readByte(),this._readStream.readByte();var l=this._readStream.readInt();if(l<v.headerSize)throw new Ice.IllegalMessageSizeException;l>this._messageSizeMax&&u.throwMemoryLimitException(l,this._messageSizeMax),l>this._readStream.size&&this._readStream.resize(l),this._readStream.pos=n}if(this._readStream.pos!=this._readStream.size){if(this._endpoint.datagram())throw new Ice.DatagramLimitException;if(!this.read(this._readStream.buffer))return c.assert(!this._readStream.isEmpty()),void this.scheduleTimeout(m.Read);c.assert(0===this._readStream.buffer.remaining)}}if(this._state<=1){if(0===this._state&&!this.initialize())return;if(this._state<=1&&!this.validate())return;this._transceiver.unregister(),this.setState(3),null!==this._startPromise&&++this._dispatchCount}else c.assert(this._state<=4),0!==(e&m.Read)&&(i=this.parseMessage()),0!==(e&m.Write)&&this.sendNextMessage()}catch(d){if(d instanceof Ice.DatagramLimitException)return this._warnUdp&&this._logger.warning("maximum datagram size of "+this._readStream.pos+" exceeded"),this._readStream.resize(v.headerSize),this._readStream.pos=0,void(this._readHeader=!0);if(d instanceof Ice.SocketException)return void this.setState(5,d);if(d instanceof Ice.LocalException)return void(this._endpoint.datagram()?(this._warn&&this._logger.warning("datagram connection exception:\n"+d+"\n"+this._desc),this._readStream.resize(v.headerSize),this._readStream.pos=0,this._readHeader=!0):this.setState(5,d));throw d}this._acmLastActivity>0&&(this._acmLastActivity=Date.now()),this.dispatch(i),this._hasMoreData.value&&y.setImmediate((function(){return t.message(m.Read)}))}}},{key:"dispatch",value:function(e){var t=0;if(null!==this._startPromise&&(this._startPromise.resolve(),this._startPromise=null,++t),null!==e&&(null!==e.outAsync&&(e.outAsync.completed(e.stream),++t),e.invokeNum>0&&this.invokeAll(e.stream,e.invokeNum,e.requestId,e.servantManager,e.adapter),e.heartbeatCallback)){try{e.heartbeatCallback(this)}catch(i){this._logger.error("connection callback exception:\n"+i+"\n"+this._desc)}e.heartbeatCallback=null,++t}if(t>0&&(this._dispatchCount-=t,0===this._dispatchCount)){if(4===this._state)try{this.initiateShutdown()}catch(i){if(!(i instanceof Ice.LocalException))throw i;this.setState(5,i)}else 6===this._state&&this.reap();this.checkState()}}},{key:"finish",value:function(){c.assert(5===this._state),this.unscheduleTimeout(m.Read|m.Write|m.Connect);var e=this._instance.traceLevels();if(this._initialized){if(e.network>=1){var t=[];t.push("closed "),t.push(this._endpoint.protocol()),t.push(" connection\n"),t.push(this.toString()),this._exception instanceof Ice.CloseConnectionException||this._exception instanceof Ice.ConnectionManuallyClosedException||this._exception instanceof Ice.ConnectionTimeoutException||this._exception instanceof Ice.CommunicatorDestroyedException||this._exception instanceof Ice.ObjectAdapterDeactivatedException||(t.push("\n"),t.push(this._exception.toString())),this._instance.initializationData().logger.trace(e.networkCat,t.join(""))}}else if(e.network>=2){var i=[];i.push("failed to establish "),i.push(this._endpoint.protocol()),i.push(" connection\n"),i.push(this.toString()),i.push("\n"),i.push(this._exception.toString()),this._instance.initializationData().logger.trace(e.networkCat,i.join(""))}if(null!==this._startPromise&&(this._startPromise.reject(this._exception),this._startPromise=null),this._sendStreams.length>0){this._writeStream.isEmpty()||this._writeStream.swap(this._sendStreams[0].stream);for(var n=0;n<this._sendStreams.length;++n){var r=this._sendStreams[n];r.requestId>0&&this._asyncRequests.delete(r.requestId),r.completed(this._exception)}this._sendStreams=[]}var s,a=g(this._asyncRequests.values());try{for(a.s();!(s=a.n()).done;){var o=s.value;o.completedEx(this._exception)}}catch(u){a.e(u)}finally{a.f()}if(this._asyncRequests.clear(),this.checkClose(),this._readStream.clear(),this._readStream.buffer.clear(),this._writeStream.clear(),this._writeStream.buffer.clear(),null!==this._closeCallback){try{this._closeCallback(this)}catch(l){this._logger.error("connection callback exception:\n"+l+"\n"+this._desc)}this._closeCallback=null}this._heartbeatCallback=null,0===this._dispatchCount&&this.reap(),this.setState(6)}},{key:"toString",value:function(){return this._desc}},{key:"timedOut",value:function(e){this._state<=1?this.setState(5,new Ice.ConnectTimeoutException):this._state<4?this.setState(5,new Ice.TimeoutException):4===this._state&&this.setState(5,new Ice.CloseTimeoutException)}},{key:"type",value:function(){return this._type}},{key:"timeout",value:function(){return this._endpoint.timeout()}},{key:"getInfo",value:function(){if(this._state>=5)throw this._exception;for(var e=this._transceiver.getInfo(),t=e;null!==t;t=t.underlying)t.adapterName=null!==this._adapter?this._adapter.getName():"",t.incoming=this._incoming;return e}},{key:"setBufferSize",value:function(e,t){if(this._state>=5)throw this._exception;this._transceiver.setBufferSize(e,t)}},{key:"exception",value:function(e){this.setState(5,e)}},{key:"invokeException",value:function(e,t){this.setState(5,e),t>0&&(c.assert(this._dispatchCount>0),this._dispatchCount-=t,c.assert(this._dispatchCount>=0),0===this._dispatchCount&&(6===this._state&&this.reap(),this.checkState()))}},{key:"setState",value:function(e,t){if(void 0!==t){if(c.assert(t instanceof Ice.LocalException),c.assert(e>=4),this._state===e)return;null===this._exception&&(this._exception=t,this._warn&&this._validated&&(this._exception instanceof Ice.CloseConnectionException||this._exception instanceof Ice.ConnectionManuallyClosedException||this._exception instanceof Ice.ConnectionTimeoutException||this._exception instanceof Ice.CommunicatorDestroyedException||this._exception instanceof Ice.ObjectAdapterDeactivatedException||this._exception instanceof Ice.ConnectionLostException&&4===this._state||this.warning("connection exception",this._exception)))}if(this._endpoint.datagram()&&4===e&&(e=5),this._state<=1&&4===e&&(e=5),this._state!==e){try{switch(e){case 0:c.assert(!1);break;case 1:if(0!==this._state)return void c.assert(5===this._state);this._endpoint.datagram()||this._incoming||this._transceiver.register();break;case 2:if(3!==this._state&&1!==this._state)return;this._transceiver.register();break;case 3:if(2!==this._state&&1!==this._state)return;2===this._state&&this._transceiver.unregister();break;case 4:if(this._state>=5)return;3===this._state&&this._transceiver.register();break;case 5:if(6===this._state)return;this._batchRequestQueue.destroy(this._exception),this._transceiver.unregister();break;case 6:c.assert(5===this._state),this._transceiver.close(),this._communicator=null;break;default:c.assert(!1);break}}catch(t){if(!(t instanceof Ice.LocalException))throw t;this._instance.initializationData().logger.error("unexpected connection exception:\n".concat(this._desc,"\n").concat(t.toString()))}if(null!==this._monitor&&(2===e?(this._monitor.add(this),this._acmLastActivity>0&&(this._acmLastActivity=Date.now())):2===this._state&&this._monitor.remove(this)),this._state=e,4===this._state&&0===this._dispatchCount)try{this.initiateShutdown()}catch(t){if(!(t instanceof Ice.LocalException))throw t;this.setState(5,t)}else 5===this._state&&this.finish();this.checkState()}}},{key:"initiateShutdown",value:function(){if(c.assert(4===this._state&&0===this._dispatchCount),!this._shutdownInitiated&&(this._shutdownInitiated=!0,!this._endpoint.datagram())){var t=new n(this._instance,v.currentProtocolEncoding);t.writeBlob(v.magic),v.currentProtocol._write(t),v.currentProtocolEncoding._write(t),t.writeByte(v.closeConnectionMsg),t.writeByte(0),t.writeInt(v.headerSize),(this.sendMessage(x.createForStream(t,!1))&e.Sent)>0&&this.scheduleTimeout(m.Read)}}},{key:"sendHeartbeatNow",value:function(){if(c.assert(2===this._state),!this._endpoint.datagram()){var e=new n(this._instance,v.currentProtocolEncoding);e.writeBlob(v.magic),v.currentProtocol._write(e),v.currentProtocolEncoding._write(e),e.writeByte(v.validateConnectionMsg),e.writeByte(0),e.writeInt(v.headerSize);try{this.sendMessage(x.createForStream(e,!1))}catch(t){this.setState(5,t),c.assert(null!==this._exception)}}}},{key:"initialize",value:function(){var e=this._transceiver.initialize(this._readStream.buffer,this._writeStream.buffer);return e!=m.None?(this.scheduleTimeout(e),!1):(this._desc=this._transceiver.toString(),this._initialized=!0,this.setState(1),!0)}},{key:"validate",value:function(){if(!this._endpoint.datagram())if(null!==this._adapter){if(0===this._writeStream.size&&(this._writeStream.writeBlob(v.magic),v.currentProtocol._write(this._writeStream),v.currentProtocolEncoding._write(this._writeStream),this._writeStream.writeByte(v.validateConnectionMsg),this._writeStream.writeByte(0),this._writeStream.writeInt(v.headerSize),_.traceSend(this._writeStream,this._logger,this._traceLevels),this._writeStream.prepareWrite()),this._writeStream.pos!=this._writeStream.size&&!this.write(this._writeStream.buffer))return this.scheduleTimeout(m.Write),!1}else{if(0===this._readStream.size&&(this._readStream.resize(v.headerSize),this._readStream.pos=0),this._readStream.pos!==this._readStream.size&&!this.read(this._readStream.buffer))return this.scheduleTimeout(m.Read),!1;this._validated=!0,c.assert(this._readStream.pos===v.headerSize),this._readStream.pos=0;var e=this._readStream.readBlob(4);if(e[0]!==v.magic[0]||e[1]!==v.magic[1]||e[2]!==v.magic[2]||e[3]!==v.magic[3])throw new Ice.BadMagicException("",e);this._readProtocol._read(this._readStream),v.checkSupportedProtocol(this._readProtocol),this._readProtocolEncoding._read(this._readStream),v.checkSupportedProtocolEncoding(this._readProtocolEncoding);var t=this._readStream.readByte();if(t!==v.validateConnectionMsg)throw new Ice.ConnectionNotValidatedException;if(this._readStream.readByte(),this._readStream.readInt()!==v.headerSize)throw new Ice.IllegalMessageSizeException;_.traceRecv(this._readStream,this._logger,this._traceLevels)}this._writeStream.resize(0),this._writeStream.pos=0,this._readStream.resize(v.headerSize),this._readHeader=!0,this._readStream.pos=0;var i=this._instance.traceLevels();if(i.network>=1){var n=[];this._endpoint.datagram()?(n.push("starting to send "),n.push(this._endpoint.protocol()),n.push(" messages\n"),n.push(this._transceiver.toDetailedString())):(n.push("established "),n.push(this._endpoint.protocol()),n.push(" connection\n"),n.push(this.toString())),this._instance.initializationData().logger.trace(i.networkCat,n.join(""))}return!0}},{key:"sendNextMessage",value:function(){if(0!==this._sendStreams.length){c.assert(!this._writeStream.isEmpty()&&this._writeStream.pos===this._writeStream.size);try{while(1){var e=this._sendStreams.shift();if(this._writeStream.swap(e.stream),e.sent(),0===this._sendStreams.length)break;if(this._state>=5)return;e=this._sendStreams[0],c.assert(!e.prepared);var t=e.stream;if(t.pos=10,t.writeInt(t.size),t.prepareWrite(),e.prepared=!0,_.traceSend(t,this._logger,this._traceLevels),this._writeStream.swap(e.stream),this._writeStream.pos!=this._writeStream.size&&!this.write(this._writeStream.buffer))return c.assert(!this._writeStream.isEmpty()),void this.scheduleTimeout(m.Write)}}catch(i){if(i instanceof Ice.LocalException)return void this.setState(5,i);throw i}c.assert(this._writeStream.isEmpty()),4===this._state&&this._shutdownInitiated&&this.scheduleTimeout(m.Read)}}},{key:"sendMessage",value:function(t){if(this._sendStreams.length>0)return t.doAdopt(),this._sendStreams.push(t),e.Queued;c.assert(this._state<5),c.assert(!t.prepared);var i=t.stream;return i.pos=10,i.writeInt(i.size),i.prepareWrite(),t.prepared=!0,_.traceSend(i,this._logger,this._traceLevels),this.write(i.buffer)?(t.sent(),this._acmLastActivity>0&&(this._acmLastActivity=Date.now()),e.Sent):(t.doAdopt(),this._writeStream.swap(t.stream),this._sendStreams.push(t),this.scheduleTimeout(m.Write),e.Queued)}},{key:"parseMessage",value:function(){c.assert(this._state>1&&this._state<5);var e=new E(this._instance);this._readStream.swap(e.stream),this._readStream.resize(v.headerSize),this._readStream.pos=0,this._readHeader=!0,c.assert(e.stream.pos===e.stream.size);try{e.stream.pos=8;var t=e.stream.readByte(),i=e.stream.readByte();if(2===i)throw new Ice.FeatureNotSupportedException("Cannot uncompress compressed message");switch(e.stream.pos=v.headerSize,t){case v.closeConnectionMsg:_.traceRecv(e.stream,this._logger,this._traceLevels),this._endpoint.datagram()?this._warn&&this._logger.warning("ignoring close connection message for datagram connection:\n"+this._desc):this.setState(5,new Ice.CloseConnectionException);break;case v.requestMsg:4===this._state?_.traceIn("received request during closing\n(ignored by server, client will retry)",e.stream,this._logger,this._traceLevels):(_.traceRecv(e.stream,this._logger,this._traceLevels),e.requestId=e.stream.readInt(),e.invokeNum=1,e.servantManager=this._servantManager,e.adapter=this._adapter,++this._dispatchCount);break;case v.requestBatchMsg:if(4===this._state)_.traceIn("received batch request during closing\n(ignored by server, client will retry)",e.stream,this._logger,this._traceLevels);else{if(_.traceRecv(e.stream,this._logger,this._traceLevels),e.invokeNum=e.stream.readInt(),e.invokeNum<0)throw e.invokeNum=0,new Ice.UnmarshalOutOfBoundsException;e.servantManager=this._servantManager,e.adapter=this._adapter,this._dispatchCount+=e.invokeNum}break;case v.replyMsg:_.traceRecv(e.stream,this._logger,this._traceLevels),e.requestId=e.stream.readInt(),e.outAsync=this._asyncRequests.get(e.requestId),e.outAsync?(this._asyncRequests.delete(e.requestId),++this._dispatchCount):e=null,this.checkClose();break;case v.validateConnectionMsg:_.traceRecv(e.stream,this._logger,this._traceLevels),null!==this._heartbeatCallback&&(e.heartbeatCallback=this._heartbeatCallback,++this._dispatchCount);break;default:throw _.traceIn("received unknown message\n(invalid, closing connection)",e.stream,this._logger,this._traceLevels),new Ice.UnknownMessageException}}catch(n){if(!(n instanceof Ice.LocalException))throw n;this._endpoint.datagram()?this._warn&&this._logger.warning("datagram connection exception:\n"+n+"\n"+this._desc):this.setState(5,n)}return e}},{key:"invokeAll",value:function(e,t,i,n,r){try{while(t>0){var s=new d(this._instance,this,r,!this._endpoint.datagram()&&0!==i,i);s.invoke(n,e),--t}e.clear()}catch(a){a instanceof Ice.LocalException?this.invokeException(a,t):(this._logger.error("unexpected exception:\n"+a.toString()),this.invokeException(new Ice.UnknownException(a),t))}}},{key:"scheduleTimeout",value:function(e){var t,i=this;if(this._state<2){var n=this._instance.defaultsAndOverrides();t=n.overrideConnectTimeout?n.overrideConnectTimeoutValue:this._endpoint.timeout()}else if(this._state<4)this._readHeader&&(e&=~m.Read),t=this._endpoint.timeout();else{var r=this._instance.defaultsAndOverrides();t=r.overrideCloseTimeout?r.overrideCloseTimeoutValue:this._endpoint.timeout()}t<0||(0!==(e&m.Read)&&(this._readTimeoutScheduled&&this._timer.cancel(this._readTimeoutId),this._readTimeoutId=this._timer.schedule((function(){return i.timedOut()}),t),this._readTimeoutScheduled=!0),0!==(e&(m.Write|m.Connect))&&(this._writeTimeoutScheduled&&this._timer.cancel(this._writeTimeoutId),this._writeTimeoutId=this._timer.schedule((function(){return i.timedOut()}),t),this._writeTimeoutScheduled=!0))}},{key:"unscheduleTimeout",value:function(e){0!==(e&m.Read)&&this._readTimeoutScheduled&&(this._timer.cancel(this._readTimeoutId),this._readTimeoutScheduled=!1),0!==(e&(m.Write|m.Connect))&&this._writeTimeoutScheduled&&(this._timer.cancel(this._writeTimeoutId),this._writeTimeoutScheduled=!1)}},{key:"warning",value:function(e,t){this._logger.warning(e+":\n"+this._desc+"\n"+t.toString())}},{key:"checkState",value:function(){this._state<3||this._dispatchCount>0||6===this._state&&this._finishedPromises.length>0&&(this._adapter=null,this._finishedPromises.forEach((function(e){return e.resolve()})),this._finishedPromises=[])}},{key:"reap",value:function(){null!==this._monitor&&this._monitor.reap(this)}},{key:"read",value:function(e){var t=e.position,i=this._transceiver.read(e,this._hasMoreData);if(this._instance.traceLevels().network>=3&&e.position!=t){var n=[];n.push("received "),this._endpoint.datagram()?n.push(e.limit):(n.push(e.position-t),n.push(" of "),n.push(e.limit-t)),n.push(" bytes via "),n.push(this._endpoint.protocol()),n.push("\n"),n.push(this.toString()),this._instance.initializationData().logger.trace(this._instance.traceLevels().networkCat,n.join(""))}return i}},{key:"write",value:function(e){var t=e.position,i=this._transceiver.write(e);if(this._instance.traceLevels().network>=3&&e.position!=t){var n=[];n.push("sent "),n.push(e.position-t),this._endpoint.datagram()||(n.push(" of "),n.push(e.limit-t)),n.push(" bytes via "),n.push(this._endpoint.protocol()),n.push("\n"),n.push(this.toString()),this._instance.initializationData().logger.trace(this._instance.traceLevels().networkCat,n.join(""))}return i}}]),T}();T.ObjectAdapterDeactivated=0,T.CommunicatorDestroyed=1,Ice.ConnectionI=T;var x=function(){"use strict";function e(){h(this,e),this.stream=null,this.outAsync=null,this.requestId=0,this.prepared=!1}return f(e,[{key:"canceled",value:function(){c.assert(null!==this.outAsync),this.outAsync=null}},{key:"doAdopt",value:function(){if(this.adopt){var e=new n(this.stream.instance,v.currentProtocolEncoding);e.swap(this.stream),this.stream=e,this.adopt=!1}}},{key:"sent",value:function(){null!==this.outAsync&&this.outAsync.sent()}},{key:"completed",value:function(e){null!==this.outAsync&&this.outAsync.completedEx(e)}}],[{key:"createForStream",value:function(t,i){var n=new e;return n.stream=t,n.adopt=i,n.isSent=!1,n.requestId=0,n.outAsync=null,n}},{key:"create",value:function(t,i,n){var r=new e;return r.stream=i,r.outAsync=t,r.requestId=n,r.isSent=!1,r.adopt=!1,r}}]),e}()}(),function(){var e=Ice.Base64,t=Ice.Debug,i=Ice.HashUtil,r=Ice.StringUtil,s=Ice.EndpointParseException,a=function(a){"use strict";u(l,a);var c=v(l);function l(e){var t;return h(this,l),t=c.call(this),t._rawEncoding=Ice.Encoding_1_0,t._type=void 0===e?-1:e,t._rawBytes=null,t}return f(l,[{key:"streamWrite",value:function(e){e.startEncapsulation(this._rawEncoding,Ice.FormatType.DefaultFormat),e.writeBlob(this._rawBytes),e.endEncapsulation()}},{key:"getInfo",value:function(){return new o(null,-1,!1,this._rawEncoding,this._rawBytes,this._type)}},{key:"type",value:function(){return this._type}},{key:"protocol",value:function(){return"opaque"}},{key:"timeout",value:function(){return-1}},{key:"changeTimeout",value:function(e){return this}},{key:"changeConnectionId",value:function(e){return this}},{key:"compress",value:function(){return!1}},{key:"changeCompress",value:function(e){return this}},{key:"datagram",value:function(){return!1}},{key:"secure",value:function(){return!1}},{key:"rawBytes",value:function(){return this._rawBytes}},{key:"transceiver",value:function(e){return e.value=null,null}},{key:"acceptor",value:function(e,t){return e.value=this,null}},{key:"connect",value:function(){return null}},{key:"hashCode",value:function(){if(void 0===this._hashCode){var e=5381;e=i.addNumber(e,this._type),e=i.addHashable(e,this._rawEncoding),e=i.addArray(e,this._rawBytes,i.addNumber),this._hashCode=e}return this._hashCode}},{key:"options",value:function(){var t="";return t+=" -t "+this._type,t+=" -e "+Ice.encodingVersionToString(this._rawEncoding),t+=" -v "+e.encode(this._rawBytes),t}},{key:"equals",value:function(e){if(!(e instanceof l))return!1;if(this===e)return!0;if(this._type!==e._type)return!1;if(!this._rawEncoding.equals(e._rawEncoding))return!1;if(this._rawBytes.length!==e._rawBytes.length)return!1;for(var t=0;t<this._rawBytes.length;t++)if(this._rawBytes[t]!==e._rawBytes[t])return!1;return!0}},{key:"compareTo",value:function(e){if(this===e)return 0;if(null===e)return 1;if(!(e instanceof l))return this.type()<e.type()?-1:1;if(this._type<e._type)return-1;if(e._type<this._type)return 1;if(this._rawEncoding.major<e._rawEncoding.major)return-1;if(e._rawEncoding.major<this._rawEncoding.major)return 1;if(this._rawEncoding.minor<e._rawEncoding.minor)return-1;if(e._rawEncoding.minor<this._rawEncoding.minor)return 1;if(this._rawBytes.length<e._rawBytes.length)return-1;if(e._rawBytes.length<this._rawBytes.length)return 1;for(var t=0;t<this._rawBytes.length;t++){if(this._rawBytes[t]<e._rawBytes[t])return-1;if(e._rawBytes[t]<this._rawBytes[t])return 1}return 0}},{key:"checkOption",value:function(t,i,n){switch(t.charAt(1)){case"t":if(this._type>-1)throw new s("multiple -t options in endpoint "+n);if(null===i)throw new s("no argument provided for -t option in endpoint "+n);var a;try{a=r.toInt(i)}catch(c){throw new s("invalid type value `"+i+"' in endpoint "+n)}if(a<0||a>65535)throw new s("type value `"+i+"' out of range in endpoint "+n);return this._type=a,!0;case"v":if(this._rawBytes)throw new s("multiple -v options in endpoint "+n);if(null===i||0===i.length)throw new s("no argument provided for -v option in endpoint "+n);for(var o=0;o<i.length;++o)if(!e.isBase64(i.charAt(o)))throw new s("invalid base64 character `"+i.charAt(o)+"' (ordinal "+i.charCodeAt(o)+") in endpoint "+n);return this._rawBytes=e.decode(i),!0;case"e":if(null===i)throw new s("no argument provided for -e option in endpoint "+n);try{this._rawEncoding=Ice.stringToEncodingVersion(i)}catch(u){throw new s("invalid encoding version `"+i+"' in endpoint "+n+":\n"+u.str)}return!0;default:return!1}}},{key:"initWithOptions",value:function(e){if(n(d(l.prototype),"initWithOptions",this).call(this,e),t.assert(this._rawEncoding),this._type<0)throw new s("no -t option in endpoint `"+this+"'");if(null===this._rawBytes||0===this._rawBytes.length)throw new s("no -v option in endpoint `"+this+"'")}},{key:"initWithStream",value:function(e){this._rawEncoding=e.getEncoding(),this._rawBytes=e.readBlob(e.getEncapsulationSize())}}]),l}(Ice.EndpointI),o=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r,s,a){var o;return h(this,i),o=t.call(this,-1,!1,r,s),o._type=a,o}return f(i,[{key:"type",value:function(){return this._type}},{key:"datagram",value:function(){return!1}},{key:"secure",value:function(){return!1}}]),i}(Ice.OpaqueEndpointInfo);Ice.OpaqueEndpointI=a}(),function(){Ice.AdapterNotFoundException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,[{key:"_mostDerivedType",value:function(){return Ice.AdapterNotFoundException}}],[{key:"_parent",get:function(){return Ice.UserException}},{key:"_id",get:function(){return"::Ice::AdapterNotFoundException"}}]),i}(Ice.UserException),Ice.InvalidReplicaGroupIdException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,[{key:"_mostDerivedType",value:function(){return Ice.InvalidReplicaGroupIdException}}],[{key:"_parent",get:function(){return Ice.UserException}},{key:"_id",get:function(){return"::Ice::InvalidReplicaGroupIdException"}}]),i}(Ice.UserException),Ice.AdapterAlreadyActiveException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,[{key:"_mostDerivedType",value:function(){return Ice.AdapterAlreadyActiveException}}],[{key:"_parent",get:function(){return Ice.UserException}},{key:"_id",get:function(){return"::Ice::AdapterAlreadyActiveException"}}]),i}(Ice.UserException),Ice.ObjectNotFoundException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,[{key:"_mostDerivedType",value:function(){return Ice.ObjectNotFoundException}}],[{key:"_parent",get:function(){return Ice.UserException}},{key:"_id",get:function(){return"::Ice::ObjectNotFoundException"}}]),i}(Ice.UserException),Ice.ServerNotFoundException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,[{key:"_mostDerivedType",value:function(){return Ice.ServerNotFoundException}}],[{key:"_parent",get:function(){return Ice.UserException}},{key:"_id",get:function(){return"::Ice::ServerNotFoundException"}}]),i}(Ice.UserException);Ice.Locator=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.Object),Ice.LocatorPrx=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.ObjectPrx),p.defineOperations(Ice.Locator,Ice.LocatorPrx,["::Ice::Locator","::Ice::Object"],0,{findObjectById:[,2,1,,[9],[[Ice.Identity]],,[Ice.ObjectNotFoundException],,],findAdapterById:[,2,1,,[9],[[7]],,[Ice.AdapterNotFoundException],,],getRegistry:[,2,1,,["Ice.LocatorRegistryPrx"],,,,,]});Ice.LocatorRegistry=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.Object),Ice.LocatorRegistryPrx=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.ObjectPrx),p.defineOperations(Ice.LocatorRegistry,Ice.LocatorRegistryPrx,["::Ice::LocatorRegistry","::Ice::Object"],0,{setAdapterDirectProxy:[,2,2,,,[[7],[9]],,[Ice.AdapterAlreadyActiveException,Ice.AdapterNotFoundException],,],setReplicatedAdapterDirectProxy:[,2,2,,,[[7],[7],[9]],,[Ice.AdapterAlreadyActiveException,Ice.AdapterNotFoundException,Ice.InvalidReplicaGroupIdException],,],setServerProcessProxy:[,2,2,,,[[7],["Ice.ProcessPrx"]],,[Ice.ServerNotFoundException],,]});Ice.LocatorFinder=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.Object),Ice.LocatorFinderPrx=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.ObjectPrx),p.defineOperations(Ice.LocatorFinder,Ice.LocatorFinderPrx,["::Ice::LocatorFinder","::Ice::Object"],0,{getLocator:[,,,,["Ice.LocatorPrx"],,,,,]})}(),function(){var e=Ice.AlreadyRegisteredException,t=function(){"use strict";function t(){h(this,t),this._factoryMap=new Map}return f(t,[{key:"add",value:function(t,i){if(this._factoryMap.has(i))throw new e("value factory",i);this._factoryMap.set(i,t)}},{key:"find",value:function(e){return this._factoryMap.get(e)}},{key:"destroy",value:function(){this._factoryMap=new Map}}]),t}();Ice.ValueFactoryManagerI=t}(),function(){IceSSL.ConnectionInfo=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r,s){var a,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,u=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return h(this,i),a=t.call(this,e,n,r,s),a.cipher=o,a.certs=c,a.verified=u,a}return f(i)}(Ice.ConnectionInfo)}(),function(){p.defineDictionary(Ice,"FacetMap","FacetMapHelper","Ice.StringHelper","Ice.ObjectHelper",!1,void 0,"Ice.Value")}(),function(){var e=Ice._ModuleRegistry.module("IceSSL"),t=-1===navigator.userAgent.indexOf("Edge/")&&-1!==navigator.userAgent.indexOf("Chrome/"),i=/^((?!chrome).)*safari/i.test(navigator.userAgent),n=Ice.Debug,r=Ice.SocketOperation,s=Ice.Timer,a=function(){"use strict";function a(e){h(this,a),this._readBuffers=[],this._readPosition=0,this._maxSendPacketSize=e.properties().getPropertyAsIntWithDefault("Ice.TCP.SndSize",524288),this._writeReadyTimeout=0}return f(a,[{key:"writeReadyTimeout",value:function(){var e=Math.round(this._writeReadyTimeout);return this._writeReadyTimeout+=this._writeReadyTimeout>=5?5:.2,Math.min(e,25)}},{key:"setCallbacks",value:function(e,t,i){this._connectedCallback=e,this._bytesAvailableCallback=t,this._bytesWrittenCallback=i}},{key:"initialize",value:function(e,t){var i=this;try{if(this._exception)throw this._exception;if(0===this._state)return this._state=1,this._fd=new WebSocket(this._url,"ice.zeroc.com"),this._fd.binaryType="arraybuffer",this._fd.onopen=function(e){return i.socketConnected(e)},this._fd.onmessage=function(e){return i.socketBytesAvailable(e.data)},this._fd.onclose=function(e){return i.socketClosed(e)},r.Connect;1===this._state&&(this._desc=function(e){return"local address = <not available>\nremote address = "+e.host+":"+e.port}(this._addr),this._state=2)}catch(s){throw this._exception||(this._exception=o(this._state,s)),this._exception}return n.assert(2===this._state),r.None}},{key:"register",value:function(){var e=this;this._registered=!0,(this._hasBytesAvailable||this._exception)&&(this._hasBytesAvailable=!1,s.setTimeout((function(){return e._bytesAvailableCallback()}),0))}},{key:"unregister",value:function(){this._registered=!1}},{key:"close",value:function(){if(null!==this._fd)if(!t&&!i||this._fd.readyState!==WebSocket.CONNECTING){n.assert(null!==this._fd);try{this._state=4,this._fd.close()}catch(e){throw o(this._state,e)}finally{this._fd=null}}else this._state=3;else n.assert(this._exception)}},{key:"write",value:function(e){var t=this;if(this._exception)throw this._exception;if(0===e.remaining)return!0;n.assert(this._fd);var r=function i(){if(t._fd){var n=t._maxSendPacketSize>0&&e.remaining>t._maxSendPacketSize?t._maxSendPacketSize:e.remaining;t._fd.bufferedAmount+n<=t._maxSendPacketSize?t._bytesWrittenCallback(0,0):s.setTimeout(i,t.writeReadyTimeout())}};while(1){var a=this._maxSendPacketSize>0&&e.remaining>this._maxSendPacketSize?this._maxSendPacketSize:e.remaining;if(0===e.remaining)break;if(n.assert(a>0),this._fd.bufferedAmount+a>this._maxSendPacketSize)return s.setTimeout(r,this.writeReadyTimeout()),!1;this._writeReadyTimeout=0;var o=e.b.slice(e.position,e.position+a);if(this._fd.send(o),e.position+=a,i&&e.remaining>0)return s.setTimeout(r,this.writeReadyTimeout()),!1}return!0}},{key:"read",value:function(e,t){if(this._exception)throw this._exception;if(t.value=!1,0===this._readBuffers.length)return!1;var i=this._readBuffers[0].byteLength-this._readPosition;n.assert(i>0);while(e.remaining>0)if(i>e.remaining&&(i=e.remaining),new Uint8Array(e.b).set(new Uint8Array(this._readBuffers[0],this._readPosition,i),e.position),e.position+=i,this._readPosition+=i,this._readPosition===this._readBuffers[0].byteLength){if(this._readPosition=0,this._readBuffers.shift(),0===this._readBuffers.length)break;i=this._readBuffers[0].byteLength}return t.value=this._readBuffers.length>0,0===e.remaining}},{key:"type",value:function(){return this._secure?"wss":"ws"}},{key:"getInfo",value:function(){n.assert(null!==this._fd);var t=new Ice.WSConnectionInfo,i=new Ice.TCPConnectionInfo;return i.localAddress="",i.localPort=-1,i.remoteAddress=this._addr.host,i.remotePort=this._addr.port,t.underlying=this._secure?new e.ConnectionInfo(i,i.timeout,i.compress):i,t.rcvSize=-1,t.sndSize=this._maxSendPacketSize,t.headers={},t}},{key:"checkSendSize",value:function(e){}},{key:"setBufferSize",value:function(e,t){this._maxSendPacketSize=t}},{key:"toString",value:function(){return this._desc}},{key:"socketConnected",value:function(e){3!=this._state?(n.assert(null!==this._connectedCallback),this._connectedCallback()):this.close()}},{key:"socketBytesAvailable",value:function(e){n.assert(null!==this._bytesAvailableCallback),e.byteLength>0&&(this._readBuffers.push(e),this._registered?this._bytesAvailableCallback():this._hasBytesAvailable||(this._hasBytesAvailable=!0))}},{key:"socketClosed",value:function(e){3!=this._state?(this._exception=o(this._state,e),this._state<2?this._connectedCallback():this._registered&&this._bytesAvailableCallback()):this.close()}}],[{key:"createOutgoing",value:function(e,t,i,n){var r=new a(e),s=t?"wss":"ws";return s+="://"+i.host,80!==i.port&&(s+=":"+i.port),s+=n||"/",r._url=s,r._fd=null,r._addr=i,r._desc="local address = <not available>\nremote address = "+i.host+":"+i.port,r._state=0,r._secure=t,r._exception=null,r}}]),a}();function o(e,t){return e<2?new Ice.ConnectFailedException(t.code,t):1e3===t.code||1006===t.code?new Ice.ConnectionLostException:new Ice.SocketException(t.code,t)}Ice.WSTransceiver=a}(),function(){var e=Ice.AsyncResultBase,t=Ice.ConnectionI,i=Ice.Debug,r=Ice.HashMap,s=Ice.FactoryACMMonitor,a=function(){"use strict";function n(e,t){h(this,n),this._communicator=e,this._instance=t,this._destroyed=!1,this._monitor=new s(this._instance,this._instance.clientACM()),this._connectionsByEndpoint=new o,this._pending=new r(r.compareEquals),this._pendingConnectCount=0,this._waitPromise=null}return f(n,[{key:"destroy",value:function(){this._destroyed||(this._connectionsByEndpoint.forEach((function(e){return e.destroy(t.CommunicatorDestroyed)})),this._destroyed=!0,this._communicator=null,this.checkFinished())}},{key:"waitUntilFinished",value:function(){return this._waitPromise=new Ice.Promise,this.checkFinished(),this._waitPromise}},{key:"create",value:function(e,t,n){i.assert(e.length>0);var r=this.applyOverrides(e);try{var s=this.findConnectionByEndpoint(r);if(null!==s)return Ice.Promise.resolve(s)}catch(a){return Ice.Promise.reject(a)}return new c(this,r,t,n).start()}},{key:"setRouterInfo",value:function(e){var t=this;return Ice.Promise.try((function(){if(t._destroyed)throw new Ice.CommunicatorDestroyedException;return e.getClientEndpoints()})).then((function(i){var n=e.getAdapter(),r=t._instance.defaultsAndOverrides();i.forEach((function(e){r.overrideTimeout&&(e=e.changeTimeout(r.overrideTimeoutValue)),e=e.changeCompress(!1),t._connectionsByEndpoint.forEach((function(t){t.endpoint().equals(e)&&t.setAdapter(n)}))}))}))}},{key:"removeAdapter",value:function(e){this._destroyed||this._connectionsByEndpoint.forEach((function(t){t.getAdapter()===e&&t.setAdapter(null)}))}},{key:"flushAsyncBatchRequests",value:function(){var t=new e(this._communicator,"flushBatchRequests",null,null,null);return this._destroyed?(t.resolve(),t):(Ice.Promise.all(this._connectionsByEndpoint.map((function(e){if(e.isActiveOrHolding())return e.flushBatchRequests().catch((function(e){if(!(e instanceof Ice.LocalException))throw e}))}))).then(t.resolve,t.reject),t)}},{key:"applyOverrides",value:function(e){var t=this._instance.defaultsAndOverrides();return e.map((function(e){return t.overrideTimeout?e.changeTimeout(t.overrideTimeoutValue):e}))}},{key:"findConnectionByEndpoint",value:function(e){if(this._destroyed)throw new Ice.CommunicatorDestroyedException;i.assert(e.length>0);for(var t=0;t<e.length;++t){var n=e[t];if(!this._pending.has(n)){var r=this._connectionsByEndpoint.get(n);if(void 0!==r)for(var s=0;s<r.length;++s)if(r[s].isActiveOrHolding())return r[s]}}return null}},{key:"incPendingConnectCount",value:function(){if(this._destroyed)throw new Ice.CommunicatorDestroyedException;++this._pendingConnectCount}},{key:"decPendingConnectCount",value:function(){--this._pendingConnectCount,i.assert(this._pendingConnectCount>=0),this._destroyed&&0===this._pendingConnectCount&&this.checkFinished()}},{key:"getConnection",value:function(e,t){var i=this;if(this._destroyed)throw new Ice.CommunicatorDestroyedException;var n=this._monitor.swapReapedConnections();null!==n&&n.forEach((function(e){i._connectionsByEndpoint.removeConnection(e.endpoint(),e),i._connectionsByEndpoint.removeConnection(e.endpoint().changeCompress(!0),e)}));while(1){if(this._destroyed)throw new Ice.CommunicatorDestroyedException;var r=this.findConnectionByEndpoint(e);if(null!==r)return r;if(this.addToPending(t,e))return null;break}return t.nextEndpoint(),null}},{key:"createConnection",value:function(e,n){i.assert(this._pending.has(n)&&null!==e);var r=null;try{if(this._destroyed)throw new Ice.CommunicatorDestroyedException;r=new t(this._communicator,this._instance,this._monitor,e,n.changeCompress(!1),!1,null)}catch(s){if(s instanceof Ice.LocalException)try{e.close()}catch(a){}throw s}return this._connectionsByEndpoint.set(r.endpoint(),r),this._connectionsByEndpoint.set(r.endpoint().changeCompress(!0),r),r}},{key:"finishGetConnection",value:function(e,t,i,n){var r=this,s=[];null!==n&&s.push(n);var a=[];e.forEach((function(e){var i=r._pending.get(e);void 0!==i&&(r._pending.delete(e),i.forEach((function(e){e.hasEndpoint(t)?-1===s.indexOf(e)&&s.push(e):-1===a.indexOf(e)&&a.push(e)})))})),s.forEach((function(e){e.removeFromPending();var t=a.indexOf(e);-1!==t&&a.splice(t,1)})),a.forEach((function(e){return e.removeFromPending()})),a.forEach((function(e){return e.getConnection()})),s.forEach((function(e){return e.setConnection(i)})),this.checkFinished()}},{key:"finishGetConnectionEx",value:function(e,t,n){var r=this,s=[];null!==n&&s.push(n);var a=[];e.forEach((function(t){var i=r._pending.get(t);void 0!==i&&(r._pending.delete(t),i.forEach((function(t){t.removeEndpoints(e)?-1===s.indexOf(t)&&s.push(t):-1===a.indexOf(t)&&a.push(t)})))})),a.forEach((function(e){i.assert(-1===s.indexOf(e)),e.removeFromPending()})),this.checkFinished(),a.forEach((function(e){return e.getConnection()})),s.forEach((function(e){return e.setException(t)}))}},{key:"addToPending",value:function(e,t){var i=this,n=!1;return null!==e&&t.forEach((function(t){var r=i._pending.get(t);void 0!==r&&(n=!0,-1===r.indexOf(e)&&r.push(e))})),!!n||(t.forEach((function(e){i._pending.has(e)||i._pending.set(e,[])})),!1)}},{key:"removeFromPending",value:function(e,t){var i=this;t.forEach((function(t){var n=i._pending.get(t);if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}))}},{key:"handleConnectionException",value:function(e,t){var i=this._instance.traceLevels();if(i.network>=2){var n=[];n.push("connection to endpoint failed"),e instanceof Ice.CommunicatorDestroyedException?n.push("\n"):t?n.push(", trying next endpoint\n"):n.push(" and no more endpoints to try\n"),n.push(e.toString()),this._instance.initializationData().logger.trace(i.networkCat,n.join(""))}}},{key:"handleException",value:function(e,t){var i=this._instance.traceLevels();if(i.network>=2){var n=[];n.push("couldn't resolve endpoint host"),e instanceof Ice.CommunicatorDestroyedException?n.push("\n"):t?n.push(", trying next endpoint\n"):n.push(" and no more endpoints to try\n"),n.push(e.toString()),this._instance.initializationData().logger.trace(i.networkCat,n.join(""))}}},{key:"checkFinished",value:function(){var e=this;!this._waitPromise||!this._destroyed||this._pending.size>0||this._pendingConnectCount>0||Ice.Promise.all(this._connectionsByEndpoint.map((function(e){return e.waitUntilFinished().catch((function(e){return i.assert(!1)}))}))).then((function(){var t=e._monitor.swapReapedConnections();if(null!==t){var n=[];e._connectionsByEndpoint.forEach((function(e){-1===n.indexOf(e)&&n.push(e)})),i.assert(t.length===n.length),e._connectionsByEndpoint.clear()}else i.assert(0===e._connectionsByEndpoint.size);i.assert(null!==e._waitPromise),e._waitPromise.resolve(),e._monitor.destroy()}))}}]),n}();Ice.OutgoingConnectionFactory=a;var o=function(e){"use strict";u(a,e);var s=v(a);function a(e){return h(this,a),s.call(this,e||r.compareEquals)}return f(a,[{key:"set",value:function(e,r){var s=this.get(e);void 0===s&&(s=[],n(d(a.prototype),"set",this).call(this,e,s)),i.assert(r instanceof t),s.push(r)}},{key:"removeConnection",value:function(e,t){var n=this.get(e);i.assert(null!==n);var r=n.indexOf(t);i.assert(-1!==r),n.splice(r,1),0===n.length&&this.delete(e)}},{key:"map",value:function(e){var t=[];return this.forEach((function(i){return t.push(e(i))})),t}},{key:"forEach",value:function(e){var t,i=g(this.values());try{for(i.s();!(t=i.n()).done;){var n=t.value;n.forEach(e)}}catch(r){i.e(r)}finally{i.f()}}}]),a}(r),c=function(){"use strict";function e(t,i,n,r){h(this,e),this._factory=t,this._endpoints=i,this._hasMore=n,this._selType=r,this._promise=new Ice.Promise,this._index=0,this._current=null}return f(e,[{key:"connectionStartCompleted",value:function(e){e.activate(),this._factory.finishGetConnection(this._endpoints,this._current,e,this)}},{key:"connectionStartFailed",value:function(e,t){i.assert(null!==this._current),this.connectionStartFailedImpl(t)&&this.nextEndpoint()}},{key:"setConnection",value:function(e){this._promise.resolve(e),this._factory.decPendingConnectCount()}},{key:"setException",value:function(e){this._promise.reject(e),this._factory.decPendingConnectCount()}},{key:"hasEndpoint",value:function(e){return-1!==this.findEndpoint(e)}},{key:"findEndpoint",value:function(e){return this._endpoints.findIndex((function(t){return e.equals(t)}))}},{key:"removeEndpoints",value:function(e){var t=this;return e.forEach((function(e){var i=t.findEndpoint(e);-1!==i&&t._endpoints.splice(i,1)})),this._index=0,0===this._endpoints.length}},{key:"removeFromPending",value:function(){this._factory.removeFromPending(this,this._endpoints)}},{key:"start",value:function(){try{this._factory.incPendingConnectCount()}catch(e){return void this._promise.reject(e)}return this.getConnection(),this._promise}},{key:"getConnection",value:function(){try{var e=this._factory.getConnection(this._endpoints,this);if(null===e)return;this._promise.resolve(e),this._factory.decPendingConnectCount()}catch(t){this._promise.reject(t),this._factory.decPendingConnectCount()}}},{key:"nextEndpoint",value:function(){var e=this,t=function(t){t.start().then((function(){e.connectionStartCompleted(t)}),(function(i){e.connectionStartFailed(t,i)}))};while(1){var n=this._factory._instance.traceLevels();try{if(i.assert(this._index<this._endpoints.length),this._current=this._endpoints[this._index++],n.network>=2){var r=[];r.push("trying to establish "),r.push(this._current.protocol()),r.push(" connection to "),r.push(this._current.toConnectorString()),this._factory._instance.initializationData().logger.trace(n.networkCat,r.join(""))}t(this._factory.createConnection(this._current.connect(),this._current))}catch(a){if(n.network>=2){var s=[];s.push("failed to establish "),s.push(this._current.protocol()),s.push(" connection to "),s.push(this._current.toString()),s.push("\n"),s.push(a.toString()),this._factory._instance.initializationData().logger.trace(n.networkCat,s.join(""))}if(this.connectionStartFailedImpl(a))continue}break}}},{key:"connectionStartFailedImpl",value:function(e){if(e instanceof Ice.LocalException)if(this._factory.handleConnectionException(e,this._hasMore||this._index<this._endpoints.length),e instanceof Ice.CommunicatorDestroyedException)this._factory.finishGetConnectionEx(this._endpoints,e,this);else{if(this._index<this._endpoints.length)return!0;this._factory.finishGetConnectionEx(this._endpoints,e,this)}else this._factory.finishGetConnectionEx(this._endpoints,e,this);return!1}}]),e}()}(),function(){var e=Ice.Debug,t=Ice.HashUtil,i=Ice.StringUtil,r="undefined"!==typeof Ice.TcpTransceiver?Ice.TcpTransceiver:null,s=function(s){"use strict";u(o,s);var a=v(o);function o(e,t,i,n,r,s,c){var u;return h(this,o),u=a.call(this,e,t,i,n,s),u._timeout=void 0===r?e?e.defaultTimeout():void 0:r,u._compress=void 0!==c&&c,u}return f(o,[{key:"getInfo",value:function(){var e=new Ice.TCPEndpointInfo;return this.fillEndpointInfo(e),this.secure()?new IceSSL.EndpointInfo(e,e.timeout,e.compress):e}},{key:"timeout",value:function(){return this._timeout}},{key:"changeTimeout",value:function(e){return e===this._timeout?this:new o(this._instance,this._host,this._port,this._sourceAddr,e,this._connectionId,this._compress)}},{key:"changeConnectionId",value:function(e){return e===this._connectionId?this:new o(this._instance,this._host,this._port,this._sourceAddr,this._timeout,e,this._compress)}},{key:"compress",value:function(){return this._compress}},{key:"changeCompress",value:function(e){return e===this._compress?this:new o(this._instance,this._host,this._port,this._sourceAddr,this._timeout,this._connectionId,e)}},{key:"datagram",value:function(){return!1}},{key:"connectable",value:function(){return null!==r&&!this.secure()}},{key:"connect",value:function(){return e.assert(!this.secure()),r.createOutgoing(this._instance,this.getAddress(),this._sourceAddr)}},{key:"options",value:function(){var e=n(d(o.prototype),"options",this).call(this);return-1==this._timeout?e+=" -t infinite":e+=" -t "+this._timeout,this._compress&&(e+=" -z"),e}},{key:"compareTo",value:function(e){return this===e?0:null===e?1:e instanceof o?this._timeout<e._timeout?-1:e._timeout<this._timeout?1:!this._compress&&e._compress?-1:!e._compress&&this._compress?1:n(d(o.prototype),"compareTo",this).call(this,e):this.type()<e.type()?-1:1}},{key:"streamWriteImpl",value:function(e){n(d(o.prototype),"streamWriteImpl",this).call(this,e),e.writeInt(this._timeout),e.writeBool(this._compress)}},{key:"hashInit",value:function(e){return e=n(d(o.prototype),"hashInit",this).call(this,e),e=t.addNumber(e,this._timeout),e=t.addBoolean(e,this._compress),e}},{key:"fillEndpointInfo",value:function(e){n(d(o.prototype),"fillEndpointInfo",this).call(this,e),e.timeout=this._timeout,e.compress=this._compress}},{key:"initWithStream",value:function(e){n(d(o.prototype),"initWithStream",this).call(this,e),this._timeout=e.readInt(),this._compress=e.readBool()}},{key:"checkOption",value:function(e,t,r){if(n(d(o.prototype),"checkOption",this).call(this,e,t,r))return!0;if("-t"===e){if(null===t)throw new Ice.EndpointParseException("no argument provided for -t option in endpoint "+r);if("infinite"==t)this._timeout=-1;else{var s=!1;try{this._timeout=i.toInt(t)}catch(a){s=!0}if(s||this._timeout<1)throw new Ice.EndpointParseException("invalid timeout value `"+t+"' in endpoint "+r)}}else{if("-z"!==e)return!1;if(null!==t)throw new Ice.EndpointParseException("unexpected argument `"+t+"' provided for -z option in "+r);this._compress=!0}return!0}},{key:"createEndpoint",value:function(e,t,i){return new o(this._instance,e,t,this._sourceAddr,this._timeout,i,this._compress)}}]),o}(Ice.IPEndpointI);Ice.TcpEndpointI=s}(),function(){var e=Ice.ArrayUtil,t=Ice.Debug,i=Ice.BatchRequestQueue,r=Ice.HashUtil,a=Ice.OpaqueEndpointI,o=Ice.ReferenceMode,c=Ice.StringUtil,l=Ice.StringSeqHelper,p=Ice.EndpointSelectionType,m=Ice.Identity,y=Ice.RouterPrx,_=Ice.LocatorPrx,S=Ice.PropertyNames,I=Ice.ConnectionRequestHandler,w=Ice.MapUtil,k=["EndpointSelection","ConnectionCached","PreferSecure","EncodingVersion","LocatorCacheTimeout","InvocationTimeout","Locator","Router","CollocationOptimized"],C=function(){"use strict";function e(t,i){h(this,e),this._instance=t,this._communicator=i,this._defaultRouter=null,this._defaultLocator=null}return f(e,[{key:"create",value:function(e,t,i,n){return 0===e.name.length&&0===e.category.length?null:this.createImpl(e,t,i.getMode(),i.getSecure(),i.getProtocol(),i.getEncoding(),n,null,null)}},{key:"createWithAdapterId",value:function(e,t,i,n){return 0===e.name.length&&0===e.category.length?null:this.createImpl(e,t,i.getMode(),i.getSecure(),i.getProtocol(),i.getEncoding(),null,n,null)}},{key:"createFixed",value:function(e,t){return 0===e.name.length&&0===e.category.length?null:new E(this._instance,this._communicator,e,"",t.endpoint().datagram()?o.ModeDatagram:o.ModeTwoway,t.endpoint().secure(),Ice.Protocol_1_0,this._instance.defaultsAndOverrides().defaultEncoding,t,-1,null)}},{key:"copy",value:function(e){var t=e.getIdentity();return 0===t.name.length&&0===t.category.length?null:e.clone()}},{key:"createFromString",value:function(e,i){if(void 0===e||null===e||0===e.length)return null;var n=0,r=c.findFirstNotOf(e," \t\n\r",n);if(-1==r)throw new Ice.ProxyParseException("no non-whitespace characters found in `"+e+"'");var s=null;if(n=c.checkQuote(e,r),-1===n)throw new Ice.ProxyParseException("mismatched quotes around identity in `"+e+"'");if(0===n?(n=c.findFirstOf(e," \t\n\r:@",r),-1===n&&(n=e.length),s=e.substring(r,n)):(r++,s=e.substring(r,n),n++),r===n)throw new Ice.ProxyParseException("no identity in `"+e+"'");var a=Ice.stringToIdentity(s);if(0===a.name.length){if(a.category.length>0)throw new Ice.IllegalIdentityException(a);if(-1!=c.findFirstNotOf(e," \t\n\r",n))throw new Ice.ProxyParseException("invalid characters after identity in `"+e+"'");return null}var u="",l=o.ModeTwoway,d=!1,h=this._instance.defaultsAndOverrides().defaultEncoding,f=Ice.Protocol_1_0,g="";while(1){if(r=c.findFirstNotOf(e," \t\n\r",n),-1===r)break;if(":"==e.charAt(r)||"@"==e.charAt(r))break;if(n=c.findFirstOf(e," \t\n\r:@",r),-1==n&&(n=e.length),r==n)break;var p=e.substring(r,n);if(2!=p.length||"-"!=p.charAt(0))throw new Ice.ProxyParseException("expected a proxy option but found `"+p+"' in `"+e+"'");var v=null,m=c.findFirstNotOf(e," \t\n\r",n);if(-1!=m){var y=e.charAt(m);if("@"!=y&&":"!=y&&"-"!=y){if(r=m,n=c.checkQuote(e,r),-1==n)throw new Ice.ProxyParseException("mismatched quotes around value for "+p+" option in `"+e+"'");0===n?(n=c.findFirstOf(e," \t\n\r:@",r),-1===n&&(n=e.length),v=e.substring(r,n)):(r++,v=e.substring(r,n),n++)}}switch(p.charAt(1)){case"f":if(null===v)throw new Ice.ProxyParseException("no argument provided for -f option in `"+e+"'");try{u=c.unescapeString(v,0,v.length)}catch(T){throw new Ice.ProxyParseException("invalid facet in `"+e+"': "+T.message)}break;case"t":if(null!==v)throw new Ice.ProxyParseException("unexpected argument `"+v+"' provided for -t option in `"+e+"'");l=o.ModeTwoway;break;case"o":if(null!==v)throw new Ice.ProxyParseException("unexpected argument `"+v+"' provided for -o option in `"+e+"'");l=o.ModeOneway;break;case"O":if(null!==v)throw new Ice.ProxyParseException("unexpected argument `"+v+"' provided for -O option in `"+e+"'");l=o.ModeBatchOneway;break;case"d":if(null!==v)throw new Ice.ProxyParseException("unexpected argument `"+v+"' provided for -d option in `"+e+"'");l=o.ModeDatagram;break;case"D":if(null!==v)throw new Ice.ProxyParseException("unexpected argument `"+v+"' provided for -D option in `"+e+"'");l=o.ModeBatchDatagram;break;case"s":if(null!==v)throw new Ice.ProxyParseException("unexpected argument `"+v+"' provided for -s option in `"+e+"'");d=!0;break;case"e":if(null===v)throw new Ice.ProxyParseException("no argument provided for -e option in `"+e+"'");try{h=Ice.stringToEncodingVersion(v)}catch(x){throw new Ice.ProxyParseException("invalid encoding version `"+v+"' in `"+e+"':\n"+x.str)}break;case"p":if(null===v)throw new Ice.ProxyParseException("no argument provided for -p option in `"+e+"'");try{f=Ice.stringToProtocolVersion(v)}catch(x){throw new Ice.ProxyParseException("invalid protocol version `"+v+"' in `"+e+"':\n"+x.str)}break;default:throw new Ice.ProxyParseException("unknown option `"+p+"' in `"+e+"'")}}if(-1===r)return this.createImpl(a,u,l,d,f,h,null,null,i);var _=[];if(":"==e.charAt(r)){var S=[];n=r;while(n<e.length&&":"==e.charAt(n)){r=n+1,n=r;while(1){if(n=e.indexOf(":",n),-1==n){n=e.length;break}var I=!1,w=r;while(1){if(w=e.indexOf('"',w),-1==w||n<w)break;if(w=e.indexOf('"',++w),-1==w)break;if(n<w){I=!0;break}++w}if(!I)break;++n}var k=e.substring(r,n),C=this._instance.endpointFactoryManager().create(k,!1);null!==C?_.push(C):S.push(k)}if(0===_.length)throw t.assert(S.length>0),new Ice.EndpointParseException("invalid endpoint `"+S[0]+"' in `"+e+"'");if(0!==S.length&&this._instance.initializationData().properties.getPropertyAsIntWithDefault("Ice.Warn.Endpoints",1)>0){var b=[];b.push("Proxy contains unknown endpoints:"),S.forEach((function(e){b.push(" `"),b.push(e),b.push("'")})),this._instance.initializationData().logger.warning(b.join(""))}return this.createImpl(a,u,l,d,f,h,_,null,i)}if("@"==e.charAt(r)){if(r=c.findFirstNotOf(e," \t\n\r",r+1),-1==r)throw new Ice.ProxyParseException("missing adapter id in `"+e+"'");var E=null;if(n=c.checkQuote(e,r),-1===n)throw new Ice.ProxyParseException("mismatched quotes around adapter id in `"+e+"'");if(0===n?(n=c.findFirstOf(e," \t\n\r",r),-1===n&&(n=e.length),E=e.substring(r,n)):(r++,E=e.substring(r,n),n++),n!==e.length&&-1!==c.findFirstNotOf(e," \t\n\r",n))throw new Ice.ProxyParseException("invalid trailing characters after `"+e.substring(0,n+1)+"' in `"+e+"'");try{g=c.unescapeString(E,0,E.length)}catch(T){throw new Ice.ProxyParseException("invalid adapter id in `"+e+"': "+T.message)}if(0===g.length)throw new Ice.ProxyParseException("empty adapter id in `"+e+"'");return this.createImpl(a,u,l,d,f,h,null,g,i)}throw new Ice.ProxyParseException("malformed proxy `"+e+"'")}},{key:"createFromStream",value:function(e,t){if(0===e.name.length&&0===e.category.length)return null;var i,n=l.read(t);if(n.length>0){if(n.length>1)throw new Ice.ProxyUnmarshalException;i=n[0]}else i="";var r=t.readByte();if(r<0||r>o.ModeLast)throw new Ice.ProxyUnmarshalException;var s=t.readBool(),a=null,c=null;t.getEncoding().equals(Ice.Encoding_1_0)?(a=Ice.Protocol_1_0,c=Ice.Encoding_1_0):(a=new Ice.ProtocolVersion,a._read(t),c=new Ice.EncodingVersion,c._read(t));var u=null,d=null,h=t.readSize();if(h>0){u=[];for(var f=0;f<h;f++)u[f]=this._instance.endpointFactoryManager().read(t)}else d=t.readString();return this.createImpl(e,i,r,s,a,c,u,d,null)}},{key:"setDefaultRouter",value:function(t){if(null===this._defaultRouter?null===t:this._defaultRouter.equals(t))return this;var i=new e(this._instance,this._communicator);return i._defaultLocator=this._defaultLocator,i._defaultRouter=t,i}},{key:"getDefaultRouter",value:function(){return this._defaultRouter}},{key:"setDefaultLocator",value:function(t){if(null===this._defaultLocator?null===t:this._defaultLocator.equals(t))return this;var i=new e(this._instance,this._communicator);return i._defaultRouter=this._defaultRouter,i._defaultLocator=t,i}},{key:"getDefaultLocator",value:function(){return this._defaultLocator}},{key:"checkForUnknownProperties",value:function(e){for(var t=[],i=0;i<S.clPropNames.length;++i)if(0===e.indexOf(S.clPropNames[i]+"."))return;var n=this._instance.initializationData().properties.getPropertiesForPrefix(e+".");if(t=t.concat(Array.from(n.keys()).filter((function(t){return!k.some((function(i){return t===e+"."+i}))}))),t.length>0){var r=[];r.push("found unknown properties for proxy '"),r.push(e),r.push("':"),t.forEach((function(e){return r.push("\n ",e)})),this._instance.initializationData().logger.warning(r.join(""))}}},{key:"createImpl",value:function(e,t,i,n,r,s,a,o,c){var u=this._instance.defaultsAndOverrides(),l=null;null!==this._defaultLocator&&(l=this._defaultLocator._getReference().getEncoding().equals(s)?this._instance.locatorManager().find(this._defaultLocator):this._instance.locatorManager().find(this._defaultLocator.ice_encodingVersion(s)));var d=this._instance.routerManager().find(this._defaultRouter),h=!0,f=u.defaultPreferSecure,g=u.defaultEndpointSelection,v=u.defaultLocatorCacheTimeout,m=u.defaultInvocationTimeout;if(null!==c&&c.length>0){var S=this._instance.initializationData().properties;S.getPropertyAsIntWithDefault("Ice.Warn.UnknownProperties",1)>0&&this.checkForUnknownProperties(c);var I=c+".Locator",w=_.uncheckedCast(this._communicator.propertyToProxy(I));null!==w&&(l=w._getReference().getEncoding().equals(s)?this._instance.locatorManager().find(w):this._instance.locatorManager().find(w.ice_encodingVersion(s))),I=c+".Router";var k=y.uncheckedCast(this._communicator.propertyToProxy(I));if(null!==k){c.lastIndexOf(".Router")==c.length-".Router".length?this._instance.initializationData().logger.warning("`"+I+"="+S.getProperty(I)+"': cannot set a router on a router; setting ignored"):d=this._instance.routerManager().find(k)}if(I=c+".ConnectionCached",h=S.getPropertyAsIntWithDefault(I,h?1:0)>0,I=c+".PreferSecure",f=S.getPropertyAsIntWithDefault(I,f?1:0)>0,I=c+".EndpointSelection",S.getProperty(I).length>0){var C=S.getProperty(I);if("Random"==C)g=p.Random;else{if("Ordered"!=C)throw new Ice.EndpointSelectionTypeParseException("illegal value `"+C+"'; expected `Random' or `Ordered'");g=p.Ordered}}I=c+".LocatorCacheTimeout";var b=S.getProperty(I);0!==b.length&&(v=S.getPropertyAsIntWithDefault(I,v),v<-1&&(v=-1,this._instance.initializationData().logger.warning("invalid value for"+I+"`"+S.getProperty(I)+"': defaulting to -1"))),I=c+".InvocationTimeout",b=S.getProperty(I),0!==b.length&&(m=S.getPropertyAsIntWithDefault(I,m),m<1&&-1!==m&&(m=-1,this._instance.initializationData().logger.warning("invalid value for"+I+"`"+S.getProperty(I)+"': defaulting to -1")))}return new T(this._instance,this._communicator,e,t,i,n,r,s,a,o,l,d,h,f,g,v,m)}}]),e}();Ice.ReferenceFactory=C;var b=function(){"use strict";function e(i,n,r,s,a,o,c,u,l,d){h(this,e),t.assert(void 0===r||null!==r.name),t.assert(void 0===r||null!==r.category),t.assert(void 0===s||null!==s),this._instance=i,this._communicator=n,this._mode=a,this._secure=o,this._identity=r,this._context=void 0===d?e._emptyContext:d,this._facet=s,this._protocol=c,this._encoding=u,this._invocationTimeout=l,this._hashInitialized=!1}return f(e,[{key:"getMode",value:function(){return this._mode}},{key:"getSecure",value:function(){return this._secure}},{key:"getProtocol",value:function(){return this._protocol}},{key:"getEncoding",value:function(){return this._encoding}},{key:"getIdentity",value:function(){return this._identity}},{key:"getFacet",value:function(){return this._facet}},{key:"getInstance",value:function(){return this._instance}},{key:"getContext",value:function(){return this._context}},{key:"getInvocationTimeout",value:function(){return this._invocationTimeout}},{key:"getCommunicator",value:function(){return this._communicator}},{key:"getEndpoints",value:function(){return t.assert(!1),null}},{key:"getAdapterId",value:function(){return t.assert(!1),""}},{key:"getRouterInfo",value:function(){return t.assert(!1),null}},{key:"getLocatorInfo",value:function(){return t.assert(!1),null}},{key:"getCacheConnection",value:function(){return t.assert(!1),!1}},{key:"getPreferSecure",value:function(){return t.assert(!1),!1}},{key:"getEndpointSelection",value:function(){return t.assert(!1),null}},{key:"getLocatorCacheTimeout",value:function(){return t.assert(!1),0}},{key:"getConnectionId",value:function(){return t.assert(!1),""}},{key:"getTimeout",value:function(){return t.assert(!1),""}},{key:"changeContext",value:function(t){void 0!==t&&null!==t||(t=e._emptyContext);var i=this._instance.referenceFactory().copy(this);return 0===t.size?i._context=e._emptyContext:i._context=new Map(t),i}},{key:"changeMode",value:function(e){if(e===this._mode)return this;var t=this._instance.referenceFactory().copy(this);return t._mode=e,t}},{key:"changeSecure",value:function(e){if(e===this._secure)return this;var t=this._instance.referenceFactory().copy(this);return t._secure=e,t}},{key:"changeIdentity",value:function(e){if(e.equals(this._identity))return this;var t=this._instance.referenceFactory().copy(this);return t._identity=new m(e.name,e.category),t}},{key:"changeFacet",value:function(e){if(e===this._facet)return this;var t=this._instance.referenceFactory().copy(this);return t._facet=e,t}},{key:"changeInvocationTimeout",value:function(e){if(e===this._invocationTimeout)return this;var t=this._instance.referenceFactory().copy(this);return t._invocationTimeout=e,t}},{key:"changeEncoding",value:function(e){if(e.equals(this._encoding))return this;var t=this._instance.referenceFactory().copy(this);return t._encoding=e,t}},{key:"changeAdapterId",value:function(e){return t.assert(!1),null}},{key:"changeEndpoints",value:function(e){return t.assert(!1),null}},{key:"changeLocator",value:function(e){return t.assert(!1),null}},{key:"changeRouter",value:function(e){return t.assert(!1),null}},{key:"changeCacheConnection",value:function(e){return t.assert(!1),null}},{key:"changePreferSecure",value:function(e){return t.assert(!1),null}},{key:"changeEndpointSelection",value:function(e){return t.assert(!1),null}},{key:"changeLocatorCacheTimeout",value:function(e){return t.assert(!1),null}},{key:"changeTimeout",value:function(e){return t.assert(!1),null}},{key:"changeConnectionId",value:function(e){return t.assert(!1),null}},{key:"changeConnection",value:function(e){return t.assert(!1),null}},{key:"hashCode",value:function(){if(this._hashInitialized)return this._hashValue;var e=5381;if(e=r.addNumber(e,this._mode),e=r.addBoolean(e,this._secure),e=r.addHashable(e,this._identity),null!==this._context&&void 0!==this._context){var t,i=g(this._context);try{for(i.s();!(t=i.n()).done;){var n=s(t.value,2),a=n[0],o=n[1];e=r.addString(e,a),e=r.addString(e,o)}}catch(c){i.e(c)}finally{i.f()}}return e=r.addString(e,this._facet),e=r.addHashable(e,this._protocol),e=r.addHashable(e,this._encoding),e=r.addNumber(e,this._invocationTimeout),this._hashValue=e,this._hashInitialized=!0,this._hashValue}},{key:"isIndirect",value:function(){return t.assert(!1),!1}},{key:"isWellKnown",value:function(){return t.assert(!1),!1}},{key:"streamWrite",value:function(e){0===this._facet.length?e.writeSize(0):(e.writeSize(1),e.writeString(this._facet)),e.writeByte(this._mode),e.writeBool(this._secure),e.getEncoding().equals(Ice.Encoding_1_0)||(this._protocol._write(e),this._encoding._write(e))}},{key:"toString",value:function(){var e=[],i=this._instance.toStringMode(),n=Ice.identityToString(this._identity,i);if(-1!=n.search(/[ :@]/)?(e.push('"'),e.push(n),e.push('"')):e.push(n),this._facet.length>0){e.push(" -f ");var r=c.escapeString(this._facet,"",i);-1!=r.search(/[ :@]/)?(e.push('"'),e.push(r),e.push('"')):e.push(r)}switch(this._mode){case o.ModeTwoway:e.push(" -t");break;case o.ModeOneway:e.push(" -o");break;case o.ModeBatchOneway:e.push(" -O");break;case o.ModeDatagram:e.push(" -d");break;case o.ModeBatchDatagram:e.push(" -D");break;default:t.assert(!1);break}return this._secure&&e.push(" -s"),this._protocol.equals(Ice.Protocol_1_0)||(e.push(" -p "),e.push(Ice.protocolVersionToString(this._protocol))),e.push(" -e "),e.push(Ice.encodingVersionToString(this._encoding)),e.join("")}},{key:"toProperty",value:function(e){return t.assert(!1),null}},{key:"getRequestHandler",value:function(e){t.assert(!1)}},{key:"getBatchRequestQueue",value:function(){t.assert(!1)}},{key:"equals",value:function(e){return this._mode===e._mode&&(this._secure===e._secure&&(!!this._identity.equals(e._identity)&&(!!w.equals(this._context,e._context)&&(this._facet===e._facet&&(!!this._protocol.equals(e._protocol)&&(!!this._encoding.equals(e._encoding)&&this._invocationTimeout===e._invocationTimeout))))))}},{key:"clone",value:function(){return t.assert(!1),null}},{key:"copyMembers",value:function(e){e._context=this._context}}]),e}();b._emptyContext=new Map,b._emptyEndpoints=[],Ice.Reference=b;var E=function(e){"use strict";u(r,e);var i=v(r);function r(e,t,n,s,a,o,c,u,l,d,f){var g;return h(this,r),g=i.call(this,e,t,n,s,a,o,c,u,d,f),g._fixedConnection=l,g}return f(r,[{key:"getEndpoints",value:function(){return b._emptyEndpoints}},{key:"getAdapterId",value:function(){return""}},{key:"getRouterInfo",value:function(){return null}},{key:"getLocatorInfo",value:function(){return null}},{key:"getCacheConnection",value:function(){return!0}},{key:"getPreferSecure",value:function(){return!1}},{key:"getEndpointSelection",value:function(){return p.Random}},{key:"getLocatorCacheTimeout",value:function(){return 0}},{key:"getConnectionId",value:function(){return""}},{key:"getTimeout",value:function(){}},{key:"changeAdapterId",value:function(e){throw new Ice.FixedProxyException}},{key:"changeEndpoints",value:function(e){throw new Ice.FixedProxyException}},{key:"changeLocato",value:function(e){throw new Ice.FixedProxyException}},{key:"changeRouter",value:function(e){throw new Ice.FixedProxyException}},{key:"changeCacheConnection",value:function(e){throw new Ice.FixedProxyException}},{key:"changePreferSecure",value:function(e){throw new Ice.FixedProxyException}},{key:"changeEndpointSelection",value:function(e){throw new Ice.FixedProxyException}},{key:"changeLocatorCacheTimeout",value:function(e){throw new Ice.FixedProxyException}},{key:"changeTimeout",value:function(e){throw new Ice.FixedProxyException}},{key:"changeConnectionId",value:function(e){throw new Ice.FixedProxyException}},{key:"changeConnection",value:function(e){if(e==this._fixedConnection)return this;var t=this.getInstance().referenceFactory().copy(this);return t._fixedConnection=e,t}},{key:"isIndirect",value:function(){return!1}},{key:"isWellKnown",value:function(){return!1}},{key:"streamWrite",value:function(e){throw new Ice.FixedProxyException}},{key:"toProperty",value:function(e){throw new Ice.FixedProxyException}},{key:"clone",value:function(){var e=new r(this.getInstance(),this.getCommunicator(),this.getIdentity(),this.getFacet(),this.getMode(),this.getSecure(),this.getProtocol(),this.getEncoding(),this._fixedConnection,this.getInvocationTimeout(),this.getContext());return this.copyMembers(e),e}},{key:"getRequestHandler",value:function(e){switch(this.getMode()){case o.ModeTwoway:case o.ModeOneway:case o.ModeBatchOneway:if(this._fixedConnection.endpoint().datagram())throw new Ice.NoEndpointException(this.toString());break;case o.ModeDatagram:case o.ModeBatchDatagram:if(!this._fixedConnection.endpoint().datagram())throw new Ice.NoEndpointException(this.toString());break;default:t.assert(!1);break}var i=this.getInstance().defaultsAndOverrides(),n=i.overrideSecure?i.overrideSecureValue:this.getSecure();if(n&&!this._fixedConnection.endpoint().secure())throw new Ice.NoEndpointException(this.toString());return this._fixedConnection.throwException(),e._setRequestHandler(new I(this,this._fixedConnection))}},{key:"getBatchRequestQueue",value:function(){return this._fixedConnection.getBatchRequestQueue()}},{key:"equals",value:function(e){return this===e||e instanceof r&&(!!n(d(r.prototype),"equals",this).call(this,e)&&this._fixedConnection==e._fixedConnection)}}]),r}(b);Ice.FixedReference=E;var T=function(l){"use strict";u(m,l);var g=v(m);function m(e,i,n,r,s,a,o,c,u,l,d,f,p,v,y,_,S,I){var w;return h(this,m),w=g.call(this,e,i,n,r,s,a,o,c,S,I),w._endpoints=u,w._adapterId=l,w._locatorInfo=d,w._routerInfo=f,w._cacheConnection=p,w._preferSecure=v,w._endpointSelection=y,w._locatorCacheTimeout=_,w._overrideTimeout=!1,w._timeout=-1,null===w._endpoints&&(w._endpoints=b._emptyEndpoints),null===w._adapterId&&(w._adapterId=""),w._connectionId="",t.assert(0===w._adapterId.length||0===w._endpoints.length),w}return f(m,[{key:"getEndpoints",value:function(){return this._endpoints}},{key:"getAdapterId",value:function(){return this._adapterId}},{key:"getRouterInfo",value:function(){return this._routerInfo}},{key:"getLocatorInfo",value:function(){return this._locatorInfo}},{key:"getCacheConnection",value:function(){return this._cacheConnection}},{key:"getPreferSecure",value:function(){return this._preferSecure}},{key:"getEndpointSelection",value:function(){return this._endpointSelection}},{key:"getLocatorCacheTimeout",value:function(){return this._locatorCacheTimeout}},{key:"getConnectionId",value:function(){return this._connectionId}},{key:"getTimeout",value:function(){return this._overrideTimeout?this._timeout:void 0}},{key:"changeEncoding",value:function(e){var t=n(d(m.prototype),"changeEncoding",this).call(this,e);return t!==this&&(null===t._locatorInfo||t._locatorInfo.getLocator().ice_getEncodingVersion().equals(e)||(t._locatorInfo=this.getInstance().locatorManager().find(t._locatorInfo.getLocator().ice_encodingVersion(e)))),t}},{key:"changeAdapterId",value:function(e){if(this._adapterId===e)return this;var t=this.getInstance().referenceFactory().copy(this);return t._adapterId=e,t._endpoints=b._emptyEndpoints,t}},{key:"changeEndpoints",value:function(t){if(e.equals(t,this._endpoints,(function(e,t){return e.equals(t)})))return this;var i=this.getInstance().referenceFactory().copy(this);return i._endpoints=t,i._adapterId="",i.applyOverrides(i._endpoints),i}},{key:"changeLocator",value:function(e){var t=this.getInstance().locatorManager().find(e);if(null!==t&&null!==this._locatorInfo&&t.equals(this._locatorInfo))return this;var i=this.getInstance().referenceFactory().copy(this);return i._locatorInfo=t,i}},{key:"changeRouter",value:function(e){var t=this.getInstance().routerManager().find(e);if(null!==t&&null!==this._routerInfo&&t.equals(this._routerInfo))return this;var i=this.getInstance().referenceFactory().copy(this);return i._routerInfo=t,i}},{key:"changeCacheConnection",value:function(e){if(e===this._cacheConnection)return this;var t=this.getInstance().referenceFactory().copy(this);return t._cacheConnection=e,t}},{key:"changePreferSecure",value:function(e){if(e===this._preferSecure)return this;var t=this.getInstance().referenceFactory().copy(this);return t._preferSecure=e,t}},{key:"changeEndpointSelection",value:function(e){if(e===this._endpointSelection)return this;var t=this.getInstance().referenceFactory().copy(this);return t._endpointSelection=e,t}},{key:"changeLocatorCacheTimeout",value:function(e){if(this._locatorCacheTimeout===e)return this;var t=this.getInstance().referenceFactory().copy(this);return t._locatorCacheTimeout=e,t}},{key:"changeTimeout",value:function(e){if(this._overrideTimeout&&this._timeout===e)return this;var t=this.getInstance().referenceFactory().copy(this);return t._timeout=e,t._overrideTimeout=!0,t._endpoints=this._endpoints.map((function(t){return t.changeTimeout(e)})),t}},{key:"changeConnectionId",value:function(e){if(this._connectionId===e)return this;var t=this.getInstance().referenceFactory().copy(this);return t._connectionId=e,t._endpoints=this._endpoints.map((function(t){return t.changeConnectionId(e)})),t}},{key:"changeConnection",value:function(e){return new E(this.getInstance(),this.getCommunicator(),this.getIdentity(),this.getFacet(),this.getMode(),this.getSecure(),this.getProtocol(),this.getEncoding(),e,this.getInvocationTimeout(),this.getContext())}},{key:"isIndirect",value:function(){return 0===this._endpoints.length}},{key:"isWellKnown",value:function(){return 0===this._endpoints.length&&0===this._adapterId.length}},{key:"streamWrite",value:function(e){n(d(m.prototype),"streamWrite",this).call(this,e),e.writeSize(this._endpoints.length),this._endpoints.length>0?(t.assert(0===this._adapterId.length),this._endpoints.forEach((function(t){e.writeShort(t.type()),t.streamWrite(e)}))):e.writeString(this._adapterId)}},{key:"toString",value:function(){var e=[];if(e.push(n(d(m.prototype),"toString",this).call(this)),this._endpoints.length>0)this._endpoints.forEach((function(t){var i=t.toString();null!==i&&i.length>0&&(e.push(":"),e.push(i))}));else if(this._adapterId.length>0){e.push(" @ ");var t=c.escapeString(this._adapterId,null,this._instance.toStringMode());-1!=t.search(/[ :@]/)?(e.push('"'),e.push(t),e.push('"')):e.push(t)}return e.join("")}},{key:"toProperty",value:function(e){var t=new Map;return t.set(e,this.toString()),t.set(e+".CollocationOptimized","0"),t.set(e+".ConnectionCached",this._cacheConnection?"1":"0"),t.set(e+".PreferSecure",this._preferSecure?"1":"0"),t.set(e+".EndpointSelection",this._endpointSelection===p.Random?"Random":"Ordered"),t.set(e+".LocatorCacheTimeout",String(this._locatorCacheTimeout)),t.set(e+".InvocationTimeout",String(this.getInvocationTimeout())),null!==this._routerInfo&&this._routerInfo.getRouter()._getReference().toProperty(e+".Router").forEach((function(e,i){return t.set(i,e)})),null!==this._locatorInfo&&this._locatorInfo.getLocator()._getReference().toProperty(e+".Locator").forEach((function(e,i){return t.set(i,e)})),t}},{key:"hashCode",value:function(){return this._hashInitialized||(n(d(m.prototype),"hashCode",this).call(this),this._hashValue=r.addString(this._hashValue,this._adapterId)),this._hashValue}},{key:"equals",value:function(t){return this===t||t instanceof m&&(!!n(d(m.prototype),"equals",this).call(this,t)&&(!!(null===this._locatorInfo?null===t._locatorInfo:this._locatorInfo.equals(t._locatorInfo))&&(!!(null===this._routerInfo?null===t._routerInfo:this._routerInfo.equals(t._routerInfo))&&(this._cacheConnection===t._cacheConnection&&(this._preferSecure===t._preferSecure&&(this._endpointSelection===t._endpointSelection&&(this._locatorCacheTimeout===t._locatorCacheTimeout&&(this._connectionId===t._connectionId&&(this._overrideTimeout===t._overrideTimeout&&((!this._overrideTimeout||this._timeout===t._timeout)&&(!!e.equals(this._endpoints,t._endpoints,(function(e,t){return e.equals(t)}))&&this._adapterId===t._adapterId)))))))))))}},{key:"getRequestHandler",value:function(e){return this._instance.requestHandlerFactory().getRequestHandler(this,e)}},{key:"getBatchRequestQueue",value:function(){return new i(this._instance,this._mode===o.ModeBatchDatagram)}},{key:"getConnection",value:function(){var e=this,t=new Ice.Promise;return null!==this._routerInfo?this._routerInfo.getClientEndpoints().then((function(i){i.length>0?(e.applyOverrides(i),e.createConnection(i).then(t.resolve,t.reject)):e.getConnectionNoRouterInfo(t)})).catch(t.reject):this.getConnectionNoRouterInfo(t),t}},{key:"getConnectionNoRouterInfo",value:function(e){var i=this;this._endpoints.length>0?this.createConnection(this._endpoints).then(e.resolve).catch(e.reject):null!==this._locatorInfo?this._locatorInfo.getEndpoints(this,null,this._locatorCacheTimeout).then((function(n){var r=s(n,2),a=r[0],o=r[1];0!==a.length?(i.applyOverrides(a),i.createConnection(a).then(e.resolve,(function(n){if(n instanceof Ice.NoEndpointException)e.reject(n);else{if(t.assert(null!==i._locatorInfo),i.getLocatorInfo().clearCache(i),o){var r=i.getInstance().traceLevels();return r.retry>=2&&i.getInstance().initializationData().logger.trace(r.retryCat,"connection to cached endpoints failed\nremoving endpoints from cache and trying again\n"+n.toString()),void i.getConnectionNoRouterInfo(e)}e.reject(n)}}))):e.reject(new Ice.NoEndpointException(i.toString()))})).catch(e.reject):e.reject(new Ice.NoEndpointException(this.toString()))}},{key:"clone",value:function(){var e=new m(this.getInstance(),this.getCommunicator(),this.getIdentity(),this.getFacet(),this.getMode(),this.getSecure(),this.getProtocol(),this.getEncoding(),this._endpoints,this._adapterId,this._locatorInfo,this._routerInfo,this._cacheConnection,this._preferSecure,this._endpointSelection,this._locatorCacheTimeout,this._invocationTimeout);return this.copyMembers(e),e}},{key:"copyMembers",value:function(e){n(d(m.prototype),"copyMembers",this).call(this,e),e._overrideTimeout=this._overrideTimeout,e._timeout=this._timeout,e._connectionId=this._connectionId}},{key:"applyOverrides",value:function(e){for(var t=0;t<e.length;++t)e[t]=e[t].changeConnectionId(this._connectionId),this._overrideTimeout&&(e[t]=e[t].changeTimeout(this._timeout))}},{key:"filterEndpoints",value:function(i){var n=i.filter((function(e){return!(e instanceof a)&&e.connectable()}));switch(this.getMode()){case o.ModeTwoway:case o.ModeOneway:case o.ModeBatchOneway:n=n.filter((function(e){return!e.datagram()}));break;case o.ModeDatagram:case o.ModeBatchDatagram:n=n.filter((function(e){return e.datagram()}));break;default:t.assert(!1);break}switch(this.getEndpointSelection()){case p.Random:e.shuffle(n);break;case p.Ordered:break;default:t.assert(!1);break}var r=this.getInstance().defaultsAndOverrides();if(r.overrideSecure?r.overrideSecureValue:this.getSecure())n=n.filter((function(e){return e.secure()}));else{var s=this.getPreferSecure();n.sort((function(e,t){var i=e.secure(),n=t.secure();return i&&n||!i&&!n?0:!i&&n?s?1:-1:s?-1:1}))}return n}},{key:"createConnection",value:function(e){var t=this.filterEndpoints(e);if(0===t.length)return Ice.Promise.reject(new Ice.NoEndpointException(this.toString()));var i=new Ice.Promise,n=this.getInstance().outgoingConnectionFactory();if(this.getCacheConnection()||1==t.length){var r=new x(this,null,i);n.create(t,!1,this.getEndpointSelection()).then((function(e){return r.setConnection(e)})).catch((function(e){return r.setException(e)}))}else{var s=new x(this,t,i);n.create([t[0]],!0,this.getEndpointSelection()).then((function(e){return s.setConnection(e)})).catch((function(e){return s.setException(e)}))}return i}}]),m}(b);Ice.RoutableReference=T;var x=function(){"use strict";function e(t,i,n){h(this,e),this.ref=t,this.endpoints=i,this.promise=n,this.i=0,this.exception=null}return f(e,[{key:"setConnection",value:function(e){null!==this.ref.getRouterInfo()&&null!==this.ref.getRouterInfo().getAdapter()&&e.setAdapter(this.ref.getRouterInfo().getAdapter()),this.promise.resolve(e)}},{key:"setException",value:function(e){var t=this;null===this.exception&&(this.exception=e),null!==this.endpoints&&++this.i!==this.endpoints.length?this.ref.getInstance().outgoingConnectionFactory().create([this.endpoints[this.i]],this.i!=this.endpoints.length-1,this.ref.getEndpointSelection()).then((function(e){return t.setConnection(e)})).catch((function(e){return t.setException(e)})):this.promise.reject(this.exception)}}]),e}()}(),function(){var e=Ice.HashUtil,t=Ice.EndpointI,i=function(t){"use strict";u(n,t);var i=v(n);function n(e,t,r){var s;return h(this,n),s=i.call(this),s._instance=e,s._delegate=t,s._resource=r||"/",s}return f(n,[{key:"getInfo",value:function(){var e=this,t=new Ice.WSEndpointInfo;return t.type=function(){return e.type()},t.datagram=function(){return e.datagram()},t.secure=function(){return e.secure()},t.resource=this._resource,t.underlying=this._delegate.getInfo(),t.timeout=t.underlying.timeout,t.compress=t.underlying.compress,t}},{key:"type",value:function(){return this._delegate.type()}},{key:"protocol",value:function(){return this._delegate.protocol()}},{key:"streamWrite",value:function(e){e.startEncapsulation(),this._delegate.streamWriteImpl(e),e.writeString(this._resource),e.endEncapsulation()}},{key:"timeout",value:function(){return this._delegate.timeout()}},{key:"changeTimeout",value:function(e){return e===this._delegate.timeout()?this:new n(this._instance,this._delegate.changeTimeout(e),this._resource)}},{key:"changeConnectionId",value:function(e){return e===this._delegate.connectionId()?this:new n(this._instance,this._delegate.changeConnectionId(e),this._resource)}},{key:"compress",value:function(){return this._delegate.compress()}},{key:"changeCompress",value:function(e){return e===this._delegate.compress()?this:new n(this._instance,this._delegate.changeCompress(e),this._resource)}},{key:"datagram",value:function(){return this._delegate.datagram()}},{key:"secure",value:function(){return this._delegate.secure()}},{key:"connect",value:function(){return Ice.WSTransceiver.createOutgoing(this._instance,this._delegate.secure(),this._delegate.getAddress(),this._resource)}},{key:"hashCode",value:function(){return void 0===this._hashCode&&(this._hashCode=this._delegate.hashCode(),this._hashCode=e.addString(this._hashCode,this._resource)),this._hashCode}},{key:"compareTo",value:function(e){if(this===e)return 0;if(null===e)return 1;if(!(e instanceof n))return this.type()<e.type()?-1:1;var t=this._delegate.compareTo(e._delegate);return 0!==t?t:this._resource!==e._resource?this._resource<e._resource?-1:1:0}},{key:"options",value:function(){var e=this._delegate.options();return null!==this._resource&&this._resource.length>0&&(e+=" -r ",e+=-1!==this._resource.indexOf(":")?'"'+this._resource+'"':this._resource),e}},{key:"toConnectorString",value:function(){return this._delegate.toConnectorString()}},{key:"initWithStream",value:function(e){this._resource=e.readString()}},{key:"checkOption",value:function(e,t,i){if("-r"!==e)return!1;if(null===t)throw new Ice.EndpointParseException("no argument provided for -r option in endpoint "+i);return this._resource=t,!0}},{key:"connectable",value:function(){return"undefined"!==typeof Ice.WSTransceiver}}]),n}(t);Ice.WSEndpoint=i}(),function(){var e=Ice.Debug,t=Ice.StringUtil,i=Ice.HashMap,n=function(){"use strict";function n(e,t){h(this,n),this._instance=e,this._adapterName=t,this._servantMapMap=new i(i.compareEquals),this._defaultServantMap=new Map,this._locatorMap=new Map}return f(n,[{key:"addServant",value:function(i,n,r){e.assert(null!==this._instance),null===r&&(r="");var s=this._servantMapMap.get(n);if(void 0===s)s=new Map,this._servantMapMap.set(n,s);else if(s.has(r)){var a=new Ice.AlreadyRegisteredException;throw a.id=Ice.identityToString(n,this._instance.toStringMode()),a.kindOfObject="servant",r.length>0&&(a.id+=" -f "+t.escapeString(r,"",this._instance.toStringMode())),a}s.set(r,i)}},{key:"addDefaultServant",value:function(t,i){if(e.assert(null!==this._instance),this._defaultServantMap.has(i)){var n=new Ice.AlreadyRegisteredException;throw n.kindOfObject="default servant",n.id=i,n}this._defaultServantMap.set(i,t)}},{key:"removeServant",value:function(i,n){e.assert(null!==this._instance),null===n&&(n="");var r=this._servantMapMap.get(i);if(void 0===r||!r.has(n)){var s=new Ice.NotRegisteredException;throw s.id=Ice.identityToString(i,this._instance.toStringMode()),s.kindOfObject="servant",n.length>0&&(s.id+=" -f "+t.escapeString(n,"",this._instance.toStringMode())),s}var a=r.get(n);return r.delete(n),0===r.size&&this._servantMapMap.delete(i),a}},{key:"removeDefaultServant",value:function(t){e.assert(null!==this._instance);var i=this._defaultServantMap.get(t);if(void 0===i){var n=new Ice.NotRegisteredException;throw n.kindOfObject="default servant",n.id=t,n}return this._defaultServantMap.delete(t),i}},{key:"removeAllFacets",value:function(t){e.assert(null!==this._instance);var i=this._servantMapMap.get(t);if(void 0===i){var n=new Ice.NotRegisteredException;throw n.id=Ice.identityToString(t,this._instance.toStringMode()),n.kindOfObject="servant",n}return this._servantMapMap.delete(t),i}},{key:"findServant",value:function(e,t){null===t&&(t="");var i=this._servantMapMap.get(e),n=null;return void 0===i?(n=this._defaultServantMap.get(e.category),void 0===n&&(n=this._defaultServantMap.get(""))):n=i.get(t),void 0===n?null:n}},{key:"findDefaultServant",value:function(t){e.assert(null!==this._instance);var i=this._defaultServantMap.get(t);return void 0===i?null:i}},{key:"findAllFacets",value:function(t){e.assert(null!==this._instance);var i=this._servantMapMap.get(t);return void 0!==i?new Map(i):new Map}},{key:"hasServant",value:function(t){var i=this._servantMapMap.get(t);return void 0!==i&&(e.assert(i.size>0),!0)}},{key:"addServantLocator",value:function(i,n){if(e.assert(null!==this._instance),this._locatorMap.has(n)){var r=new Ice.AlreadyRegisteredException;throw r.id=t.escapeString(n,"",this._instance.toStringMode()),r.kindOfObject="servant locator",r}this._locatorMap.set(n,i)}},{key:"removeServantLocator",value:function(i){e.assert(null!==this._instance);var n=this._locatorMap.get(i);if(void 0===n){var r=new Ice.NotRegisteredException;throw r.id=t.escapeString(i,"",this._instance.toStringMode()),r.kindOfObject="servant locator",r}return this._locatorMap.delete(i),n}},{key:"findServantLocator",value:function(e){var t=this._locatorMap.get(e);return void 0===t?null:t}},{key:"destroy",value:function(){e.assert(null!==this._instance);var t=this._instance.initializationData().logger;this._servantMapMap.clear(),this._defaultServantMap.clear();var i=new Map(this._locatorMap);this._locatorMap.clear(),this._instance=null;var n,r=g(i);try{for(r.s();!(n=r.n()).done;){var a=s(n.value,2),o=a[0],c=a[1];try{c.deactivate(o)}catch(u){t.error("exception during locator deactivation:\nobject adapter: `"+this._adapterName+"'\nlocator category: `"+o+"'\n"+u.toString())}}}catch(l){r.e(l)}finally{r.f()}}}]),n}();Ice.ServantManager=n}(),function(){var e=Ice.Context,t=Ice.InitializationException,i=function(){"use strict";function i(){h(this,i),this._context=new e}return f(i,[{key:"getContext",value:function(){return new e(this._context)}},{key:"setContext",value:function(t){null!==t&&t.size>0?this._context=new e(t):this._context.clear()}},{key:"containsKey",value:function(e){return null===e&&(e=""),this._context.has(e)}},{key:"get",value:function(e){null===e&&(e="");var t=this._context.get(e);return null===t&&(t=""),t}},{key:"put",value:function(e,t){null===e&&(e=""),null===t&&(t="");var i=this._context.get(e);return null===i&&(i=""),this._context.set(e,t),i}},{key:"remove",value:function(e){null===e&&(e="");var t=this._context.get(e);return this._context.delete(e),null===t&&(t=""),t}},{key:"write",value:function(t,i){if(0===t.size)Ice.ContextHelper.write(i,this._context);else{var n=null;if(0===this._context.size)n=t;else{n=new e(this._context);var r,a=g(t);try{for(a.s();!(r=a.n()).done;){var o=s(r.value,2),c=o[0],u=o[1];n.set(c,u)}}catch(l){a.e(l)}finally{a.f()}}Ice.ContextHelper.write(i,n)}}}],[{key:"create",value:function(e){if(0===e.length||"None"===e)return null;if("Shared"===e)return new i;throw new t("'"+e+"' is not a valid value for Ice.ImplicitContext")}}]),i}();Ice.ImplicitContextI=i}(),function(){var e=Ice.Debug,t=Ice.ObjectPrx,i=Ice.StringUtil,n=Ice.Identity,r=function(){"use strict";function r(e){h(this,r),this._instance=e;var t=this._instance.initializationData().properties.getPropertyAsList("Ice.RetryIntervals");if(t.length>0){this._retryIntervals=[];for(var n=0;n<t.length;n++){var s=void 0;try{s=i.toInt(t[n])}catch(a){s=0}if(0===n&&-1===s)break;this._retryIntervals[n]=s>0?s:0}}else this._retryIntervals=[0]}return f(r,[{key:"stringToProxy",value:function(e){return this.referenceToProxy(this._instance.referenceFactory().createFromString(e,null))}},{key:"proxyToString",value:function(e){return null===e?"":e._getReference().toString()}},{key:"propertyToProxy",value:function(e){var t=this._instance.initializationData().properties.getProperty(e),i=this._instance.referenceFactory().createFromString(t,e);return this.referenceToProxy(i)}},{key:"proxyToProperty",value:function(e,t){return null===e?new Map:e._getReference().toProperty(t)}},{key:"streamToProxy",value:function(e,t){var i=new n;return i._read(e),this.referenceToProxy(this._instance.referenceFactory().createFromStream(i,e),t)}},{key:"referenceToProxy",value:function(e,i){if(null!==e){var n=i?new i:new t;return n._setup(e),n}return null}},{key:"checkRetryAfterException",value:function(t,i,n,r){var s,a=this._instance.traceLevels(),o=this._instance.initializationData().logger;if(i.getMode()===Ice.Reference.ModeBatchOneway||i.getMode()===Ice.Reference.ModeBatchDatagram)throw t;if(t instanceof Ice.ObjectNotExistException){if(null!==i.getRouterInfo()&&"ice_add_proxy"===t.operation)return i.getRouterInfo().clearCache(i),a.retry>=1&&o.trace(a.retryCat,"retrying operation call to add proxy to router\n"+t.toString()),null!==n&&(n.value=0),r;if(!i.isIndirect())throw t;if(i.isWellKnown()){var c=i.getLocatorInfo();null!==c&&c.clearCache(i)}}else if(t instanceof Ice.RequestFailedException)throw t;if(t instanceof Ice.MarshalException)throw t;if(t instanceof Ice.CommunicatorDestroyedException||t instanceof Ice.ObjectAdapterDeactivatedException||t instanceof Ice.ConnectionManuallyClosedException)throw t;if(t instanceof Ice.InvocationTimeoutException||t instanceof Ice.InvocationCanceledException)throw t;if(++r,e.assert(r>0),r===this._retryIntervals.length+1&&t instanceof Ice.CloseConnectionException)s=0;else{if(r>this._retryIntervals.length)throw a.retry>=1&&o.trace(a.retryCat,"cannot retry operation call because retry limit has been exceeded\n"+t.toString()),t;s=this._retryIntervals[r-1]}if(a.retry>=1){var u="retrying operation call";s>0&&(u+=" in "+s+"ms"),u+=" because of exception\n"+t.toString(),o.trace(a.retryCat,u)}return e.assert(null!==n),n.value=s,r}}]),r}();Ice.ProxyFactory=r}(),function(){var e=Ice.Debug,t=Ice.InputStream,i=Ice.OutputStream,n=Ice.EndpointParseException,r=Ice.OpaqueEndpointI,s=Ice.Protocol,a=Ice.StringUtil,o=function(){"use strict";function o(e){h(this,o),this._instance=e,this._factories=[]}return f(o,[{key:"add",value:function(t){e.assert(void 0===this._factories.find((function(e){return t.type()==e.type()}))),this._factories.push(t)}},{key:"get",value:function(e){return this._factories.find((function(t){return e==t.type()}))||null}},{key:"create",value:function(e,o){var c=e.trim();if(0===c.length)throw new n("value has no non-whitespace characters");var u=a.splitString(c," \t\n\r");if(0===u.length)throw new n("value has no non-whitespace characters");var l=u[0];u.splice(0,1),"default"===l&&(l=this._instance.defaultsAndOverrides().defaultProtocol);for(var d=0,h=this._factories.length;d<h;++d)if(this._factories[d].protocol()===l){var f=this._factories[d].create(u,o);if(u.length>0)throw new n("unrecognized argument `"+u[0]+"' in endpoint `"+e+"'");return f}if("opaque"===l){var g=new r;if(g.initWithOptions(u),u.length>0)throw new n("unrecognized argument `"+u[0]+"' in endpoint `"+e+"'");for(var p=0,v=this._factories.length;p<v;++p)if(this._factories[p].type()==g.type()){var m=new i(this._instance,s.currentProtocolEncoding);m.writeShort(g.type()),g.streamWrite(m);var y=new t(this._instance,s.currentProtocolEncoding,m.buffer);y.pos=0,y.readShort(),y.startEncapsulation();var _=this._factories[p].read(y);return y.endEncapsulation(),_}return g}return null}},{key:"read",value:function(e){var t=e.readShort(),i=this.get(t),n=null;return e.startEncapsulation(),i&&(n=i.read(e)),n||(n=new r(t),n.initWithStream(e)),e.endEncapsulation(),n}},{key:"destroy",value:function(){this._factories.forEach((function(e){return e.destroy()})),this._factories=[]}}]),o}();Ice.EndpointFactoryManager=o}(),function(){var e=Ice.FormatType,t=Ice.EndpointSelectionType,i=Ice.Protocol,n=f((function n(r,s){"use strict";h(this,n),this.defaultProtocol=r.getPropertyWithDefault("Ice.Default.Protocol",void 0!==Ice.TcpEndpointFactory?"tcp":"ws");var a=r.getProperty("Ice.Default.Host");if(this.defaultHost=a.length>0?a:null,a=r.getProperty("Ice.Default.SourceAddress"),this.defaultSourceAddress=a.length>0?a:null,a=r.getProperty("Ice.Override.Timeout"),a.length>0?(this.overrideTimeout=!0,this.overrideTimeoutValue=r.getPropertyAsInt("Ice.Override.Timeout"),this.overrideTimeoutValue<1&&-1!==this.overrideTimeoutValue&&(this.overrideTimeoutValue=-1,s.warning("invalid value for Ice.Override.Timeout `"+r.getProperty("Ice.Override.Timeout")+"': defaulting to -1"))):(this.overrideTimeout=!1,this.overrideTimeoutValue=-1),a=r.getProperty("Ice.Override.ConnectTimeout"),a.length>0?(this.overrideConnectTimeout=!0,this.overrideConnectTimeoutValue=r.getPropertyAsInt("Ice.Override.ConnectTimeout"),this.overrideConnectTimeoutValue<1&&-1!==this.overrideConnectTimeoutValue&&(this.overrideConnectTimeoutValue=-1,s.warning("invalid value for Ice.Override.ConnectTimeout `"+r.getProperty("Ice.Override.ConnectTimeout")+"': defaulting to -1"))):(this.overrideConnectTimeout=!1,this.overrideConnectTimeoutValue=-1),a=r.getProperty("Ice.Override.CloseTimeout"),a.length>0?(this.overrideCloseTimeout=!0,this.overrideCloseTimeoutValue=r.getPropertyAsInt("Ice.Override.CloseTimeout"),this.overrideCloseTimeoutValue<1&&-1!==this.overrideCloseTimeoutValue&&(this.overrideCloseTimeoutValue=-1,s.warning("invalid value for Ice.Override.CloseTimeout `"+r.getProperty("Ice.Override.CloseTimeout")+"': defaulting to -1"))):(this.overrideCloseTimeout=!1,this.overrideCloseTimeoutValue=-1),this.overrideSecure=!1,a=r.getPropertyWithDefault("Ice.Default.EndpointSelection","Random"),"Random"===a)this.defaultEndpointSelection=t.Random;else{if("Ordered"!==a){var o=new Ice.EndpointSelectionTypeParseException;throw o.str="illegal value `"+a+"'; expected `Random' or `Ordered'",o}this.defaultEndpointSelection=t.Ordered}this.defaultTimeout=r.getPropertyAsIntWithDefault("Ice.Default.Timeout",6e4),this.defaultTimeout<1&&-1!==this.defaultTimeout&&(this.defaultTimeout=6e4,s.warning("invalid value for Ice.Default.Timeout `"+r.getProperty("Ice.Default.Timeout")+"': defaulting to 60000")),this.defaultLocatorCacheTimeout=r.getPropertyAsIntWithDefault("Ice.Default.LocatorCacheTimeout",-1),this.defaultLocatorCacheTimeout<-1&&(this.defaultLocatorCacheTimeout=-1,s.warning("invalid value for Ice.Default.LocatorCacheTimeout `"+r.getProperty("Ice.Default.LocatorCacheTimeout")+"': defaulting to -1")),this.defaultInvocationTimeout=r.getPropertyAsIntWithDefault("Ice.Default.InvocationTimeout",-1),this.defaultInvocationTimeout<1&&-1!==this.defaultInvocationTimeout&&(this.defaultInvocationTimeout=-1,s.warning("invalid value for Ice.Default.InvocationTimeout `"+r.getProperty("Ice.Default.InvocationTimeout")+"': defaulting to -1")),this.defaultPreferSecure=r.getPropertyAsIntWithDefault("Ice.Default.PreferSecure",0)>0,a=r.getPropertyWithDefault("Ice.Default.EncodingVersion",Ice.encodingVersionToString(i.currentEncoding)),this.defaultEncoding=Ice.stringToEncodingVersion(a),i.checkSupportedEncoding(this.defaultEncoding);var c=r.getPropertyAsIntWithDefault("Ice.Default.SlicedFormat",0)>0;this.defaultFormat=c?e.SlicedFormat:e.CompactFormat}));Ice.DefaultsAndOverrides=n}(),function(){var e=Ice.Debug,t=Ice.Protocol,i=Ice.LocatorRegisterPrx,n=Ice.HashMap,r=function(){"use strict";function t(e,i,r){h(this,t),this._locator=e,this._locatorRegistry=null,this._table=i,this._background=r,this._adapterRequests=new Map,this._objectRequests=new n(n.compareEquals)}return f(t,[{key:"destroy",value:function(){this._locatorRegistry=null,this._table.clear()}},{key:"equals",value:function(e){return this===e||e instanceof t&&this._locator.equals(e._locator)}},{key:"hashCode",value:function(){return this._locator.hashCode()}},{key:"getLocator",value:function(){return this._locator}},{key:"getLocatorRegistry",value:function(){var e=this;return null!==this._locatorRegistry?Ice.Promise.resolve(this._locatorRegistry):this._locator.getRegistry().then((function(t){return e._locatorRegistry=i.uncheckedCast(t.ice_locator(null).ice_endpointSelection(Ice.EndpointSelectionType.Ordered)),e._locatorRegistry}))}},{key:"getEndpoints",value:function(t,i,n,r){var s=r||new Ice.Promise;e.assert(t.isIndirect());var a=null,o={value:!1};if(t.isWellKnown()){var c=this._table.getObjectReference(t.getIdentity(),n,o);if(!o.value){if(!this._background||null===c)return this.getObjectRequest(t).addCallback(t,null,n,s),s;this.getObjectRequest(t).addCallback(t,null,n,null)}if(c.isIndirect()){if(!c.isWellKnown())return t.getInstance().traceLevels().location>=1&&this.traceWellKnown("found adapter for well-known object in locator cache",t,c),this.getEndpoints(c,t,n,s),s}else a=c.getEndpoints()}else if(a=this._table.getAdapterEndpoints(t.getAdapterId(),n,o),!o.value){if(!this._background||null===a)return this.getAdapterRequest(t).addCallback(t,i,n,s),s;this.getAdapterRequest(t).addCallback(t,i,n,null)}return e.assert(null!==a),t.getInstance().traceLevels().location>=1&&this.getEndpointsTrace(t,a,!0),s.resolve([a,!0]),s}},{key:"clearCache",value:function(t){if(e.assert(t.isIndirect()),t.isWellKnown()){var i=this._table.removeObjectReference(t.getIdentity());null!==i&&(i.isIndirect()?i.isWellKnown()||(t.getInstance().traceLevels().location>=2&&this.traceWellKnown("removed adapter for well-known object from locator cache",t,i),this.clearCache(i)):t.getInstance().traceLevels().location>=2&&this.trace("removed endpoints for well-known object from locator cache",t,i.getEndpoints()))}else{var n=this._table.removeAdapterEndpoints(t.getAdapterId());null!==n&&t.getInstance().traceLevels().location>=2&&this.trace("removed endpoints for adapter from locator cache",t,n)}}},{key:"trace",value:function(t,i,n){e.assert(i.isIndirect());var r=[];r.push(t),r.push("\n"),i.isWellKnown()?(r.push("well-known proxy = "),r.push(i.toString()),r.push("\n")):(r.push("adapter = "),r.push(i.getAdapterId()),r.push("\n")),r.push("endpoints = "),r.push(n.map((function(e){return e.toString()})).join(":")),i.getInstance().initializationData().logger.trace(i.getInstance().traceLevels().locationCat,r.join(""))}},{key:"traceWellKnown",value:function(t,i,n){e.assert(i.isWellKnown());var r=[];r.push(t),r.push("\n"),r.push("well-known proxy = "),r.push(i.toString()),r.push("\n"),r.push("adapter = "),r.push(n.getAdapterId()),i.getInstance().initializationData().logger.trace(i.getInstance().traceLevels().locationCat,r.join(""))}},{key:"getEndpointsException",value:function(t,i){e.assert(t.isIndirect());var n=t.getInstance();try{throw i}catch(u){if(u instanceof Ice.AdapterNotFoundException){if(n.traceLevels().location>=1){var r=[];r.push("adapter not found\n"),r.push("adapter = "),r.push(t.getAdapterId()),n.initializationData().logger.trace(n.traceLevels().locationCat,r.join(""))}var s=new Ice.NotRegisteredException;throw s.kindOfObject="object adapter",s.id=t.getAdapterId(),s}if(u instanceof Ice.ObjectNotFoundException){if(n.traceLevels().location>=1){var a=[];a.push("object not found\n"),a.push("object = "),a.push(Ice.identityToString(t.getIdentity(),n.toStringMode())),n.initializationData().logger.trace(n.traceLevels().locationCat,a.join(""))}var o=new Ice.NotRegisteredException;throw o.kindOfObject="object",o.id=Ice.identityToString(t.getIdentity(),n.toStringMode()),o}if(u instanceof Ice.NotRegisteredException)throw u;if(u instanceof Ice.LocalException){if(n.traceLevels().location>=1){var c=[];c.push("couldn't contact the locator to retrieve endpoints\n"),t.getAdapterId().length>0?(c.push("adapter = "),c.push(t.getAdapterId()),c.push("\n")):(c.push("well-known proxy = "),c.push(t.toString()),c.push("\n")),c.push("reason = "+u.toString()),n.initializationData().logger.trace(n.traceLevels().locationCat,c.join(""))}throw u}e.assert(!1)}}},{key:"getEndpointsTrace",value:function(e,t,i){if(null!==t&&t.length>0)i?e.isWellKnown()?this.trace("found endpoints for well-known proxy in locator cache",e,t):this.trace("found endpoints for adapter in locator cache",e,t):e.isWellKnown()?this.trace("retrieved endpoints for well-known proxy from locator, adding to locator cache",e,t):this.trace("retrieved endpoints for adapter from locator, adding to locator cache",e,t);else{var n=e.getInstance(),r=[];r.push("no endpoints configured for "),e.getAdapterId().length>0?(r.push("adapter\n"),r.push("adapter = "),r.push(e.getAdapterId()),r.push("\n")):(r.push("well-known object\n"),r.push("well-known proxy = "),r.push(e.toString()),r.push("\n")),n.initializationData().logger.trace(n.traceLevels().locationCat,r.join(""))}}},{key:"getAdapterRequest",value:function(e){if(e.getInstance().traceLevels().location>=1){var t=e.getInstance(),i=[];i.push("searching for adapter by id\n"),i.push("adapter = "),i.push(e.getAdapterId()),t.initializationData().logger.trace(t.traceLevels().locationCat,i.join(""))}var n=this._adapterRequests.get(e.getAdapterId());return void 0!==n||(n=new c(this,e),this._adapterRequests.set(e.getAdapterId(),n)),n}},{key:"getObjectRequest",value:function(e){if(e.getInstance().traceLevels().location>=1){var t=e.getInstance(),i=[];i.push("searching for well-known object\n"),i.push("well-known proxy = "),i.push(e.toString()),t.initializationData().logger.trace(t.traceLevels().locationCat,i.join(""))}var n=this._objectRequests.get(e.getIdentity());return void 0!==n||(n=new o(this,e),this._objectRequests.set(e.getIdentity(),n)),n}},{key:"finishRequest",value:function(t,i,n,r){if(null===n||n._getReference().isIndirect())for(var s=0;s<i.length;++s)this._table.removeObjectReference(i[s].getIdentity());t.isWellKnown()?(null===n||n._getReference().isWellKnown()?r&&this._table.removeObjectReference(t.getIdentity()):this._table.addObjectReference(t.getIdentity(),n._getReference()),e.assert(this._objectRequests.has(t.getIdentity())),this._objectRequests.delete(t.getIdentity())):(null===n||n._getReference().isIndirect()?r&&this._table.removeAdapterEndpoints(t.getAdapterId()):this._table.addAdapterEndpoints(t.getAdapterId(),n._getReference().getEndpoints()),e.assert(this._adapterRequests.has(t.getAdapterId())),this._adapterRequests.delete(t.getAdapterId()))}}]),t}();Ice.LocatorInfo=r;var s=function(){"use strict";function e(t,i,n){h(this,e),this._ref=t,this._ttl=i,this._promise=n}return f(e,[{key:"response",value:function(e,i){var n=this,r=null;if(null!==i){var s=i._getReference();if(this._ref.isWellKnown()&&!t.isSupported(this._ref.getEncoding(),s.getEncoding()));else if(s.isIndirect()){if(this._ref.isWellKnown()&&!s.isWellKnown())return this._ref.getInstance().traceLevels().location>=1&&e.traceWellKnown("retrieved adapter for well-known object from locator, adding to locator cache",this._ref,s),void e.getEndpoints(s,this._ref,this._ttl).then((function(e){null!==n._promise&&n._promise.resolve(e)}),(function(e){null!==n._promise&&n._promise.reject(e)}))}else r=s.getEndpoints()}this._ref.getInstance().traceLevels().location>=1&&e.getEndpointsTrace(this._ref,r,!1),null!==this._promise&&this._promise.resolve(null===r?[[],!1]:[r,!1])}},{key:"exception",value:function(e,t){try{e.getEndpointsException(this._ref,t)}catch(i){null!==this._promise&&this._promise.reject(i)}}}]),e}(),a=function(){"use strict";function e(t,i){h(this,e),this._locatorInfo=t,this._ref=i,this._callbacks=[],this._wellKnownRefs=[],this._sent=!1,this._response=!1,this._proxy=null,this._exception=null}return f(e,[{key:"addCallback",value:function(e,t,i,n){var r=new s(e,i,n);this._response?r.response(this._locatorInfo,this._proxy):null!==this._exception?r.exception(this._locatorInfo,this._exception):(this._callbacks.push(r),null!==t&&this._wellKnownRefs.push(t),this._sent||(this._sent=!0,this.send()))}},{key:"response",value:function(e){this._locatorInfo.finishRequest(this._ref,this._wellKnownRefs,e,!1),this._response=!0,this._proxy=e;for(var t=0;t<this._callbacks.length;++t)this._callbacks[t].response(this._locatorInfo,e)}},{key:"exception",value:function(e){this._locatorInfo.finishRequest(this._ref,this._wellKnownRefs,null,e instanceof Ice.UserException),this._exception=e;for(var t=0;t<this._callbacks.length;++t)this._callbacks[t].exception(this._locatorInfo,e)}}]),e}(),o=function(t){"use strict";u(n,t);var i=v(n);function n(t,r){var s;return h(this,n),s=i.call(this,t,r),e.assert(r.isWellKnown()),s}return f(n,[{key:"send",value:function(){var e=this;try{this._locatorInfo.getLocator().findObjectById(this._ref.getIdentity()).then((function(t){return e.response(t)}),(function(t){return e.exception(t)}))}catch(t){this.exception(t)}}}]),n}(a),c=function(t){"use strict";u(n,t);var i=v(n);function n(t,r){var s;return h(this,n),s=i.call(this,t,r),e.assert(r.isIndirect()),s}return f(n,[{key:"send",value:function(){var e=this;try{this._locatorInfo.getLocator().findAdapterById(this._ref.getAdapterId()).then((function(t){return e.response(t)}),(function(t){return e.exception(t)}))}catch(t){this.exception(t)}}}]),n}(a)}(),function(){p.defineDictionary(Ice,"PropertyDict","PropertyDictHelper","Ice.StringHelper","Ice.StringHelper",!1,void 0,void 0);Ice.PropertiesAdmin=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.Object),Ice.PropertiesAdminPrx=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.ObjectPrx),p.defineOperations(Ice.PropertiesAdmin,Ice.PropertiesAdminPrx,["::Ice::Object","::Ice::PropertiesAdmin"],1,{getProperty:[,,,,[7],[[7]],,,,],getPropertiesForPrefix:[,,,,["Ice.PropertyDictHelper"],[[7]],,,,],setProperties:[,,,,,[["Ice.PropertyDictHelper"]],,,,]})}(),function(){var e=Ice.HashMap,t=Ice.LocatorInfo,i=Ice.LocatorTable,n=Ice.LocatorPrx,r=function(){"use strict";function r(t){h(this,r),this._background=t.getPropertyAsInt("Ice.BackgroundLocatorCacheUpdates")>0,this._table=new e(e.compareEquals),this._locatorTables=new e(e.compareEquals)}return f(r,[{key:"destroy",value:function(){var e,t=g(this._table.values());try{for(t.s();!(e=t.n()).done;){var i=e.value;i.destroy()}}catch(n){t.e(n)}finally{t.f()}this._table.clear(),this._locatorTables.clear()}},{key:"find",value:function(e){if(null===e)return null;var r=n.uncheckedCast(e.ice_locator(null)),s=this._table.get(r);if(void 0===s){var a=this._locatorTables.get(r.ice_getIdentity());void 0===a&&(a=new i,this._locatorTables.set(r.ice_getIdentity(),a)),s=new t(r,a,this._background),this._table.set(r,s)}return s}}]),r}();Ice.LocatorManager=r}(),function(){var e=Ice.HashMap,t=Ice.RouterInfo,i=Ice.RouterPrx,n=function(){"use strict";function n(){h(this,n),this._table=new e(e.compareEquals)}return f(n,[{key:"destroy",value:function(){var e,t=g(this._table.values());try{for(t.s();!(e=t.n()).done;){var i=e.value;i.destroy()}}catch(n){t.e(n)}finally{t.f()}this._table.clear()}},{key:"find",value:function(e){if(null===e)return null;var n=i.uncheckedCast(e.ice_router(null)),r=this._table.get(n);return void 0===r&&(r=new t(n),this._table.set(n,r)),r}},{key:"erase",value:function(e){var t=null;if(null!==e){var n=i.uncheckedCast(e.ice_router(null));t=this._table.get(n),this._table.delete(n)}return t}}]),n}();Ice.RouterManager=n}(),function(){var e=Ice.HashMap,t=Ice.ConnectRequestHandler,i=function(){"use strict";function i(t){h(this,i),this._instance=t,this._handlers=new e(e.compareEquals)}return f(i,[{key:"getRequestHandler",value:function(e,i){var n,r=!1;return e.getCacheConnection()?(n=this._handlers.get(e),n||(n=new t(e,i),this._handlers.set(e,n),r=!0)):(r=!0,n=new t(e,i)),r&&e.getConnection().then((function(e){n.setConnection(e)}),(function(e){n.setException(e)})),i._setRequestHandler(n.connect(i))}},{key:"removeRequestHandler",value:function(e,t){e.getCacheConnection()&&this._handlers.get(e)===t&&this._handlers.delete(e)}}]),i}();Ice.RequestHandlerFactory=i}(),function(){p.defineDictionary(IceMX,"StringIntDict","StringIntDictHelper","Ice.StringHelper","Ice.IntHelper",!1,void 0,void 0);IceMX.Metrics=function(e){"use strict";u(i,e);var t=v(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ice.Long(0,0),s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Ice.Long(0,0),o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return h(this,i),e=t.call(this),e.id=n,e.total=r,e.current=s,e.totalLifetime=a,e.failures=o,e}return f(i,[{key:"_iceWriteMemberImpl",value:function(e){e.writeString(this.id),e.writeLong(this.total),e.writeInt(this.current),e.writeLong(this.totalLifetime),e.writeInt(this.failures)}},{key:"_iceReadMemberImpl",value:function(e){this.id=e.readString(),this.total=e.readLong(),this.current=e.readInt(),this.totalLifetime=e.readLong(),this.failures=e.readInt()}}]),i}(Ice.Value),p.defineValue(IceMX.Metrics,["::Ice::Object","::IceMX::Metrics"][1],!1),IceMX.MetricsFailures=function(){"use strict";function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;h(this,e),this.id=t,this.failures=i}return f(e,[{key:"_write",value:function(e){e.writeString(this.id),IceMX.StringIntDictHelper.write(e,this.failures)}},{key:"_read",value:function(e){this.id=e.readString(),this.failures=IceMX.StringIntDictHelper.read(e)}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),p.defineStruct(IceMX.MetricsFailures,!1,!0),p.defineSequence(IceMX,"MetricsFailuresSeqHelper","IceMX.MetricsFailures",!1),p.defineSequence(IceMX,"MetricsMapHelper","Ice.ObjectHelper",!1,"IceMX.Metrics"),p.defineDictionary(IceMX,"MetricsView","MetricsViewHelper","Ice.StringHelper","IceMX.MetricsMapHelper",!1,void 0,void 0,Ice.ArrayUtil.equals),IceMX.UnknownMetricsView=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,[{key:"_mostDerivedType",value:function(){return IceMX.UnknownMetricsView}}],[{key:"_parent",get:function(){return Ice.UserException}},{key:"_id",get:function(){return"::IceMX::UnknownMetricsView"}}]),i}(Ice.UserException);IceMX.MetricsAdmin=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.Object),IceMX.MetricsAdminPrx=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.ObjectPrx),p.defineOperations(IceMX.MetricsAdmin,IceMX.MetricsAdminPrx,["::Ice::Object","::IceMX::MetricsAdmin"],1,{getMetricsViewNames:[,,,2,["Ice.StringSeqHelper"],,[["Ice.StringSeqHelper"]],,,],enableMetricsView:[,,,2,,[[7]],,[IceMX.UnknownMetricsView],,],disableMetricsView:[,,,2,,[[7]],,[IceMX.UnknownMetricsView],,],getMetricsView:[,,,2,["IceMX.MetricsViewHelper"],[[7]],[[4]],[IceMX.UnknownMetricsView],,!0],getMapMetricsFailures:[,,,2,["IceMX.MetricsFailuresSeqHelper"],[[7],[7]],,[IceMX.UnknownMetricsView],,],getMetricsFailures:[,,,2,[IceMX.MetricsFailures],[[7],[7],[7]],,[IceMX.UnknownMetricsView],,]});IceMX.ThreadMetrics=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r,s,a){var o,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0;return h(this,i),o=t.call(this,e,n,r,s,a),o.inUseForIO=c,o.inUseForUser=u,o.inUseForOther=l,o}return f(i,[{key:"_iceWriteMemberImpl",value:function(e){e.writeInt(this.inUseForIO),e.writeInt(this.inUseForUser),e.writeInt(this.inUseForOther)}},{key:"_iceReadMemberImpl",value:function(e){this.inUseForIO=e.readInt(),this.inUseForUser=e.readInt(),this.inUseForOther=e.readInt()}}]),i}(IceMX.Metrics),p.defineValue(IceMX.ThreadMetrics,["::Ice::Object","::IceMX::Metrics","::IceMX::ThreadMetrics"][2],!1);IceMX.DispatchMetrics=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r,s,a){var o,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new Ice.Long(0,0),l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:new Ice.Long(0,0);return h(this,i),o=t.call(this,e,n,r,s,a),o.userException=c,o.size=u,o.replySize=l,o}return f(i,[{key:"_iceWriteMemberImpl",value:function(e){e.writeInt(this.userException),e.writeLong(this.size),e.writeLong(this.replySize)}},{key:"_iceReadMemberImpl",value:function(e){this.userException=e.readInt(),this.size=e.readLong(),this.replySize=e.readLong()}}]),i}(IceMX.Metrics),p.defineValue(IceMX.DispatchMetrics,["::Ice::Object","::IceMX::DispatchMetrics","::IceMX::Metrics"][1],!1);IceMX.ChildInvocationMetrics=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r,s,a){var o,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:new Ice.Long(0,0),u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new Ice.Long(0,0);return h(this,i),o=t.call(this,e,n,r,s,a),o.size=c,o.replySize=u,o}return f(i,[{key:"_iceWriteMemberImpl",value:function(e){e.writeLong(this.size),e.writeLong(this.replySize)}},{key:"_iceReadMemberImpl",value:function(e){this.size=e.readLong(),this.replySize=e.readLong()}}]),i}(IceMX.Metrics),p.defineValue(IceMX.ChildInvocationMetrics,["::Ice::Object","::IceMX::ChildInvocationMetrics","::IceMX::Metrics"][1],!1);IceMX.CollocatedMetrics=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r,s,a,o,c){return h(this,i),t.call(this,e,n,r,s,a,o,c)}return f(i)}(IceMX.ChildInvocationMetrics),p.defineValue(IceMX.CollocatedMetrics,["::Ice::Object","::IceMX::ChildInvocationMetrics","::IceMX::CollocatedMetrics","::IceMX::Metrics"][2],!1);IceMX.RemoteMetrics=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r,s,a,o,c){return h(this,i),t.call(this,e,n,r,s,a,o,c)}return f(i)}(IceMX.ChildInvocationMetrics),p.defineValue(IceMX.RemoteMetrics,["::Ice::Object","::IceMX::ChildInvocationMetrics","::IceMX::Metrics","::IceMX::RemoteMetrics"][3],!1);IceMX.InvocationMetrics=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r,s,a){var o,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null;return h(this,i),o=t.call(this,e,n,r,s,a),o.retry=c,o.userException=u,o.remotes=l,o.collocated=d,o}return f(i,[{key:"_iceWriteMemberImpl",value:function(e){e.writeInt(this.retry),e.writeInt(this.userException),IceMX.MetricsMapHelper.write(e,this.remotes),IceMX.MetricsMapHelper.write(e,this.collocated)}},{key:"_iceReadMemberImpl",value:function(e){this.retry=e.readInt(),this.userException=e.readInt(),this.remotes=IceMX.MetricsMapHelper.read(e),this.collocated=IceMX.MetricsMapHelper.read(e)}}]),i}(IceMX.Metrics),p.defineValue(IceMX.InvocationMetrics,["::Ice::Object","::IceMX::InvocationMetrics","::IceMX::Metrics"][1],!1);IceMX.ConnectionMetrics=function(e){"use strict";u(i,e);var t=v(i);function i(e,n,r,s,a){var o,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:new Ice.Long(0,0),u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new Ice.Long(0,0);return h(this,i),o=t.call(this,e,n,r,s,a),o.receivedBytes=c,o.sentBytes=u,o}return f(i,[{key:"_iceWriteMemberImpl",value:function(e){e.writeLong(this.receivedBytes),e.writeLong(this.sentBytes)}},{key:"_iceReadMemberImpl",value:function(e){this.receivedBytes=e.readLong(),this.sentBytes=e.readLong()}}]),i}(IceMX.Metrics),p.defineValue(IceMX.ConnectionMetrics,["::Ice::Object","::IceMX::ConnectionMetrics","::IceMX::Metrics"][1],!1)}(),function(){var e=Ice.AsyncResultBase,t=Ice.Debug,i=Ice.Identity,n=Ice.PropertyNames,r=Ice.ServantManager,s=Ice.StringUtil,a=Ice.ArrayUtil,o=Ice.Timer,c=["ACM","AdapterId","Endpoints","Locator","Locator.EncodingVersion","Locator.EndpointSelection","Locator.ConnectionCached","Locator.PreferSecure","Locator.CollocationOptimized","Locator.Router","MessageSizeMax","PublishedEndpoints","ReplicaGroupId","Router","Router.EncodingVersion","Router.EndpointSelection","Router.ConnectionCached","Router.PreferSecure","Router.CollocationOptimized","Router.Locator","Router.Locator.EndpointSelection","Router.Locator.ConnectionCached","Router.Locator.PreferSecure","Router.Locator.CollocationOptimized","Router.Locator.LocatorCacheTimeout","Router.Locator.InvocationTimeout","Router.LocatorCacheTimeout","Router.InvocationTimeout","ProxyOptions","ThreadPool.Size","ThreadPool.SizeMax","ThreadPool.SizeWarn","ThreadPool.StackSize","ThreadPool.Serialize"],u=function(){"use strict";function u(e,i,n,s,a,o,c){var l=this;if(h(this,u),this._instance=e,this._communicator=i,this._objectAdapterFactory=n,this._servantManager=new r(e,s),this._name=s,this._publishedEndpoints=[],this._routerInfo=null,this._state=0,this._noConfig=o,this._statePromises=[],this._noConfig)return this._reference=this._instance.referenceFactory().createFromString("dummy -t",""),this._messageSizeMax=this._instance.messageSizeMax(),void c.resolve(this);var d=this._instance.initializationData().properties,f=[],g=this.filterProperties(f);if(0!==f.length&&d.getPropertyAsIntWithDefault("Ice.Warn.UnknownProperties",1)>0){var p=["found unknown properties for object adapter `"+s+"':"];f.forEach((function(e){return p.push("\n "+e)})),this._instance.initializationData().logger.warning(p.join(""))}if(null===a&&g)throw new Ice.InitializationException("object adapter `".concat(this._name,"' requires configuration"));var v=d.getPropertyWithDefault(this._name+".ProxyOptions","-t");try{this._reference=this._instance.referenceFactory().createFromString("dummy "+v,"")}catch(I){throw I instanceof Ice.ProxyParseException?new Ice.InitializationException("invalid proxy options `".concat(v,"' for object adapter `").concat(s,"'")):I}var m=this._instance.messageSizeMax()/1024,y=d.getPropertyAsIntWithDefault(this._name+".MessageSizeMax",m);this._messageSizeMax=y<1||y>2147483647/1024?2147483647:1024*y;try{var _;if(null===a&&(a=Ice.RouterPrx.uncheckedCast(this._instance.proxyFactory().propertyToProxy(this._name+".Router"))),null!==a){if(this._routerInfo=this._instance.routerManager().find(a),t.assert(null!==this._routerInfo),null!==this._routerInfo.getAdapter())throw new Ice.AlreadyRegisteredException("object adapter with router",Ice.identityToString(a.ice_getIdentity(),this._instance.toStringMode()));this._routerInfo.setAdapter(this),_=this._instance.outgoingConnectionFactory().setRouterInfo(this._routerInfo)}else{var S=d.getProperty(this._name+".Endpoints");if(S.length>0)throw new Ice.FeatureNotSupportedException("object adapter endpoints not supported");_=Ice.Promise.resolve()}_.then((function(){return l.computePublishedEndpoints()})).then((function(e){l._publishedEndpoints=e,c.resolve(l)}),(function(e){l.destroy(),c.reject(e)}))}catch(w){throw this.destroy(),w}}return f(u,[{key:"getName",value:function(){return this._noConfig?"":this._name}},{key:"getCommunicator",value:function(){return this._communicator}},{key:"activate",value:function(){var t=new e(this._communicator,"activate",null,null,this);return this.setState(3),t.resolve(),t}},{key:"hold",value:function(){this.checkForDeactivation(),this.setState(1)}},{key:"waitForHold",value:function(){var t=new e(this._communicator,"waitForHold",null,null,this);try{this.checkForDeactivation(),this.waitState(1,t)}catch(i){t.reject(i)}return t}},{key:"deactivate",value:function(){var t=new e(this._communicator,"deactivate",null,null,this);return this._state<5&&(this.setState(5),this._instance.outgoingConnectionFactory().removeAdapter(this)),t.resolve(),t}},{key:"waitForDeactivate",value:function(){var t=new e(this._communicator,"waitForDeactivate",null,null,this);return this.waitState(5,t),t}},{key:"isDeactivated",value:function(){return this._state>=5}},{key:"destroy",value:function(){var t=this;return this.deactivate().then((function(){t._state<6&&(t.setState(6),t._servantManager.destroy(),t._objectAdapterFactory.removeObjectAdapter(t),t._publishedEndpoints=[]);var i=new e(t._communicator,"destroy",null,null,t);return i.resolve(),i}))}},{key:"add",value:function(e,t){return this.addFacet(e,t,"")}},{key:"addFacet",value:function(e,t,i){this.checkForDeactivation(),this.checkIdentity(t),this.checkServant(e);var n=t.clone();return this._servantManager.addServant(e,n,i),this.newProxy(n,i)}},{key:"addWithUUID",value:function(e){return this.addFacetWithUUID(e,"")}},{key:"addFacetWithUUID",value:function(e,t){return this.addFacet(e,new i(Ice.generateUUID(),""),t)}},{key:"addDefaultServant",value:function(e,t){this.checkServant(e),this.checkForDeactivation(),this._servantManager.addDefaultServant(e,t)}},{key:"remove",value:function(e){return this.removeFacet(e,"")}},{key:"removeFacet",value:function(e,t){return this.checkForDeactivation(),this.checkIdentity(e),this._servantManager.removeServant(e,t)}},{key:"removeAllFacets",value:function(e){return this.checkForDeactivation(),this.checkIdentity(e),this._servantManager.removeAllFacets(e)}},{key:"removeDefaultServant",value:function(e){return this.checkForDeactivation(),this._servantManager.removeDefaultServant(e)}},{key:"find",value:function(e){return this.findFacet(e,"")}},{key:"findFacet",value:function(e,t){return this.checkForDeactivation(),this.checkIdentity(e),this._servantManager.findServant(e,t)}},{key:"findAllFacets",value:function(e){return this.checkForDeactivation(),this.checkIdentity(e),this._servantManager.findAllFacets(e)}},{key:"findByProxy",value:function(e){this.checkForDeactivation();var t=e._getReference();return this.findFacet(t.getIdentity(),t.getFacet())}},{key:"findDefaultServant",value:function(e){return this.checkForDeactivation(),this._servantManager.findDefaultServant(e)}},{key:"addServantLocator",value:function(e,t){this.checkForDeactivation(),this._servantManager.addServantLocator(e,t)}},{key:"removeServantLocator",value:function(e){return this.checkForDeactivation(),this._servantManager.removeServantLocator(e)}},{key:"findServantLocator",value:function(e){return this.checkForDeactivation(),this._servantManager.findServantLocator(e)}},{key:"createProxy",value:function(e){return this.checkForDeactivation(),this.checkIdentity(e),this.newProxy(e,"")}},{key:"createDirectProxy",value:function(e){return this.createProxy(e)}},{key:"createIndirectProxy",value:function(e){throw new Ice.FeatureNotSupportedException("createIndirectProxy not supported")}},{key:"setLocator",value:function(e){throw new Ice.FeatureNotSupportedException("setLocator not supported")}},{key:"getEndpoints",value:function(){return[]}},{key:"refreshPublishedEndpoints",value:function(){var e=this;return this.checkForDeactivation(),this.computePublishedEndpoints().then((function(t){e._publishedEndpoints=t}))}},{key:"getPublishedEndpoints",value:function(){return a.clone(this._publishedEndpoints)}},{key:"setPublishedEndpoints",value:function(e){if(this.checkForDeactivation(),null!==this._routerInfo)throw new Error("can't set published endpoints on object adapter associated with a router");this._publishedEndpoints=a.clone(e)}},{key:"getServantManager",value:function(){return this._servantManager}},{key:"setAdapterOnConnection",value:function(e){this.checkForDeactivation(),e.setAdapterAndServantManager(this,this._servantManager)}},{key:"messageSizeMax",value:function(){return this._messageSizeMax}},{key:"newProxy",value:function(e,t){return this._instance.proxyFactory().referenceToProxy(this._instance.referenceFactory().create(e,t,this._reference,this._publishedEndpoints))}},{key:"checkForDeactivation",value:function(){if(this._state>=5){var e=new Ice.ObjectAdapterDeactivatedException;throw e.name=this.getName(),e}}},{key:"checkIdentity",value:function(e){if(void 0===e.name||null===e.name||0===e.name.length)throw new Ice.IllegalIdentityException(e);void 0!==e.category&&null!==e.category||(e.category="")}},{key:"checkServant",value:function(e){if(void 0===e||null===e)throw new Ice.IllegalServantException("cannot add null servant to Object Adapter")}},{key:"computePublishedEndpoints",value:function(){var e,t=this;if(null!==this._routerInfo)e=this._routerInfo.getServerEndpoints().then((function(e){var t=[];return e.forEach((function(e){-1===t.findIndex((function(t){return e.equals(t)}))&&t.push(e)})),t}));else{var i,n=[],r=this._instance.initializationData().properties.getProperty(this._name+".PublishedEndpoints"),a=0;while(a<r.length){if(i=s.findFirstNotOf(r," \t\n\r",a),-1===i){if(""!=r)throw new Ice.EndpointParseException("invalid empty object adapter endpoint");break}a=i;while(1){if(a=r.indexOf(":",a),-1==a){a=r.length;break}var o=!1,c=i;while(1){if(c=r.indexOf('"',c),-1==c||a<c)break;if(c=r.indexOf('"',++c),-1==c)break;if(a<c){o=!0;break}++c}if(!o)break;++a}var u=r.substring(i,a),l=this._instance.endpointFactoryManager().create(u,!1);if(null===l)throw new Ice.EndpointParseException("invalid object adapter endpoint `"+r+"'");n.push(l)}e=Ice.Promise.resolve(n)}return e.then((function(e){if(t._instance.traceLevels().network>=1&&e.length>0){var i=[];i.push("published endpoints for object adapter `"),i.push(t._name),i.push("':\n");var n=!0;e.forEach((function(e){n||i.push(":"),i.push(e.toString()),n=!1})),t._instance.initializationData().logger.trace(t._instance.traceLevels().networkCat,i.toString())}return e}))}},{key:"filterProperties",value:function(e){for(var t=!0,i=this._name+".",r=0;r<n.clPropNames.length;++r)if(0===i.indexOf(n.clPropNames[r]+".")){t=!1;break}var s,a=!0,o=this._instance.initializationData().properties.getPropertiesForPrefix(i),u=g(o.keys());try{for(u.s();!(s=u.n()).done;){for(var l=s.value,d=!1,h=0;h<c.length;++h)if(l===i+c[h]){a=!1,d=!0;break}!d&&t&&e.push(l)}}catch(f){u.e(f)}finally{u.f()}return a}},{key:"setState",value:function(e){var t=this;if(this._state!==e){this._state=e;var i=[];(e<5?[e]:[1,5]).forEach((function(e){t._statePromises[e]&&(i=i.concat(t._statePromises[e]),delete t._statePromises[e])})),i.length>0&&o.setImmediate((function(){return i.forEach((function(e){return e.resolve()}))}))}}},{key:"waitState",value:function(e,t){this._state<5&&(1===e&&1!==this._state||5===e)?this._statePromises[e]?this._statePromises[e].push(t):this._statePromises[e]=[t]:t.resolve()}}]),u}();Ice.ObjectAdapterI=u}(),function(){var e=Ice.ObjectAdapterI,t=Ice.Promise,i=function(){"use strict";function i(e,n){h(this,i),this._instance=e,this._communicator=n,this._adapters=[],this._adapterNamesInUse=[],this._shutdownPromise=new t}return f(i,[{key:"shutdown",value:function(){var e=this;return null===this._instance||(this._instance=null,this._communicator=null,t.all(this._adapters.map((function(e){return e.deactivate()}))).then((function(){return e._shutdownPromise.resolve()}))),this._shutdownPromise}},{key:"waitForShutdown",value:function(){var e=this;return this._shutdownPromise.then((function(){return t.all(e._adapters.map((function(e){return e.waitForDeactivate()})))}))}},{key:"isShutdown",value:function(){return null===this._instance}},{key:"destroy",value:function(){var e=this;return this.waitForShutdown().then((function(){return t.all(e._adapters.map((function(e){return e.destroy()})))}))}},{key:"createObjectAdapter",value:function(t,i,n){if(null===this._instance)throw new Ice.ObjectAdapterDeactivatedException;var r=null;try{if(0===t.length)r=new e(this._instance,this._communicator,this,Ice.generateUUID(),null,!0,n);else{if(-1!==this._adapterNamesInUse.indexOf(t))throw new Ice.AlreadyRegisteredException("object adapter",t);r=new e(this._instance,this._communicator,this,t,i,!1,n),this._adapterNamesInUse.push(t)}this._adapters.push(r)}catch(s){n.reject(s)}}},{key:"removeObjectAdapter",value:function(e){if(null!==this._instance){var t=this._adapters.indexOf(e);-1!==t&&this._adapters.splice(t,1),t=this._adapterNamesInUse.indexOf(e.getName()),-1!==t&&this._adapterNamesInUse.splice(t,1)}}}]),i}();Ice.ObjectAdapterFactory=i}(),function(){Ice.ToStringMode=p.defineEnum([["Unicode",0],["ASCII",1],["Compat",2]])}(),function(){Ice.LogMessageType=p.defineEnum([["PrintMessage",0],["TraceMessage",1],["WarningMessage",2],["ErrorMessage",3]]),p.defineSequence(Ice,"LogMessageTypeSeqHelper","Ice.LogMessageType._helper",!1),Ice.LogMessage=function(){"use strict";function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ice.LogMessageType.PrintMessage,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ice.Long(0,0),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";h(this,e),this.type=t,this.timestamp=i,this.traceCategory=n,this.message=r}return f(e,[{key:"_write",value:function(e){Ice.LogMessageType._write(e,this.type),e.writeLong(this.timestamp),e.writeString(this.traceCategory),e.writeString(this.message)}},{key:"_read",value:function(e){this.type=Ice.LogMessageType._read(e),this.timestamp=e.readLong(),this.traceCategory=e.readString(),this.message=e.readString()}}],[{key:"minWireSize",get:function(){return 11}}]),e}(),p.defineStruct(Ice.LogMessage,!0,!0),p.defineSequence(Ice,"LogMessageSeqHelper","Ice.LogMessage",!1);Ice.RemoteLogger=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.Object),Ice.RemoteLoggerPrx=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.ObjectPrx),p.defineOperations(Ice.RemoteLogger,Ice.RemoteLoggerPrx,["::Ice::Object","::Ice::RemoteLogger"],1,{init:[,,,,,[[7],["Ice.LogMessageSeqHelper"]],,,,],log:[,,,,,[[Ice.LogMessage]],,,,]}),Ice.RemoteLoggerAlreadyAttachedException=function(e){"use strict";u(i,e);var t=v(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(this,i),t.call(this,e)}return f(i,[{key:"_mostDerivedType",value:function(){return Ice.RemoteLoggerAlreadyAttachedException}}],[{key:"_parent",get:function(){return Ice.UserException}},{key:"_id",get:function(){return"::Ice::RemoteLoggerAlreadyAttachedException"}}]),i}(Ice.UserException);Ice.LoggerAdmin=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.Object),Ice.LoggerAdminPrx=function(e){"use strict";u(i,e);var t=v(i);function i(){return h(this,i),t.apply(this,arguments)}return f(i)}(Ice.ObjectPrx),p.defineOperations(Ice.LoggerAdmin,Ice.LoggerAdminPrx,["::Ice::LoggerAdmin","::Ice::Object"],0,{attachRemoteLogger:[,,,,,[["Ice.RemoteLoggerPrx"],["Ice.LogMessageTypeSeqHelper"],["Ice.StringSeqHelper"],[3]],,[Ice.RemoteLoggerAlreadyAttachedException],,],detachRemoteLogger:[,,,,[1],[["Ice.RemoteLoggerPrx"]],,,,],getLog:[,,,,["Ice.LogMessageSeqHelper"],[["Ice.LogMessageTypeSeqHelper"],["Ice.StringSeqHelper"],[3]],[[7]],,,]})}(),function(){var e=Ice.WSEndpoint,t=function(){"use strict";function t(e,i){h(this,t),this._instance=e,this._delegate=i}return f(t,[{key:"type",value:function(){return this._instance.type()}},{key:"protocol",value:function(){return this._instance.protocol()}},{key:"create",value:function(t,i){var n=new e(this._instance,this._delegate.create(t,i));return n.initWithOptions(t),n}},{key:"read",value:function(t){var i=new e(this._instance,this._delegate.read(t));return i.initWithStream(t),i}},{key:"destroy",value:function(){this._delegate.destroy(),this._instance=null}}]),t}();Ice.WSEndpointFactory=t}(),function(){p.defineDictionary(Ice,"SliceChecksumDict","SliceChecksumDictHelper","Ice.StringHelper","Ice.StringHelper",!1,void 0,void 0)}(),function(){var e=Ice.Protocol;Ice.InitializationData=function(){"use strict";function e(){h(this,e),this.properties=null,this.logger=null,this.valueFactoryManager=null}return f(e,[{key:"clone",value:function(){var e=new Ice.InitializationData;return e.properties=this.properties,e.logger=this.logger,e.valueFactoryManager=this.valueFactoryManager,e}}]),e}(),Ice.initialize=function(e,t){var i=null,n=null;if(e instanceof Array)i=e;else if(e instanceof Ice.InitializationData)n=e;else if(void 0!==e&&null!==e)throw new Ice.InitializationException("invalid argument to initialize");if(void 0!==t&&null!==t){if(!(t instanceof Ice.InitializationData&&null===n))throw new Ice.InitializationException("invalid argument to initialize");n=t}n=null===n?new Ice.InitializationData:n.clone(),n.properties=Ice.createProperties(i,n.properties);var r=new Ice.Communicator(n);return r.finishSetup(null),r},Ice.createProperties=function(e,t){return new Ice.Properties(e,t)},Ice.currentProtocol=function(){return e.currentProtocol.clone()},Ice.currentEncoding=function(){return e.currentEncoding.clone()},Ice.stringVersion=function(){return"3.7.3"},Ice.intVersion=function(){return 30703}}(),function(){var e=Ice.TcpEndpointI,t=function(){"use strict";function t(e){h(this,t),this._instance=e}return f(t,[{key:"type",value:function(){return this._instance.type()}},{key:"protocol",value:function(){return this._instance.protocol()}},{key:"create",value:function(t,i){var n=new e(this._instance);return n.initWithOptions(t,i),n}},{key:"read",value:function(t){var i=new e(this._instance);return i.initWithStream(t),i}},{key:"destroy",value:function(){this._instance=null}},{key:"clone",value:function(e){return new t(e)}}]),t}();Ice.TcpEndpointFactory=t}(),function(){var e=Ice.AsyncResultBase,t=Ice.Debug,i=Ice.DefaultsAndOverrides,n=Ice.EndpointFactoryManager,r=Ice.ImplicitContextI,s=Ice.LocatorManager,a=Ice.ObjectAdapterFactory,o=Ice.ValueFactoryManagerI,c=Ice.OutgoingConnectionFactory,u=Ice.Properties,l=Ice.ProxyFactory,d=Ice.RetryQueue,g=Ice.RouterManager,p=Ice.Timer,v=Ice.TraceLevels,m=Ice.ReferenceFactory,y=Ice.RequestHandlerFactory,_=Ice.ACMConfig,S=function(){"use strict";function S(e){h(this,S),this._state=0,this._initData=e,this._traceLevels=null,this._defaultsAndOverrides=null,this._messageSizeMax=0,this._batchAutoFlushSize=0,this._clientACM=null,this._toStringMode=Ice.ToStringMode.Unicode,this._implicitContext=null,this._routerManager=null,this._locatorManager=null,this._referenceFactory=null,this._requestHandlerFactory=null,this._proxyFactory=null,this._outgoingConnectionFactory=null,this._objectAdapterFactory=null,this._retryQueue=null,this._endpointHostResolver=null,this._endpointFactoryManager=null,this._objectFactoryMap=null}return f(S,[{key:"initializationData",value:function(){return this._initData}},{key:"traceLevels",value:function(){return t.assert(null!==this._traceLevels),this._traceLevels}},{key:"defaultsAndOverrides",value:function(){return t.assert(null!==this._defaultsAndOverrides),this._defaultsAndOverrides}},{key:"routerManager",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._routerManager),this._routerManager}},{key:"locatorManager",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._locatorManager),this._locatorManager}},{key:"referenceFactory",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._referenceFactory),this._referenceFactory}},{key:"requestHandlerFactory",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._requestHandlerFactory),this._requestHandlerFactory}},{key:"proxyFactory",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._proxyFactory),this._proxyFactory}},{key:"outgoingConnectionFactory",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._outgoingConnectionFactory),this._outgoingConnectionFactory}},{key:"objectAdapterFactory",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._objectAdapterFactory),this._objectAdapterFactory}},{key:"retryQueue",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._retryQueue),this._retryQueue}},{key:"timer",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._timer),this._timer}},{key:"endpointFactoryManager",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._endpointFactoryManager),this._endpointFactoryManager}},{key:"messageSizeMax",value:function(){return this._messageSizeMax}},{key:"batchAutoFlushSize",value:function(){return this._batchAutoFlushSize}},{key:"clientACM",value:function(){return this._clientACM}},{key:"toStringMode",value:function(){return this._toStringMode}},{key:"getImplicitContext",value:function(){return this._implicitContext}},{key:"setDefaultLocator",value:function(e){if(2==this._state)throw new Ice.CommunicatorDestroyedException;this._referenceFactory=this._referenceFactory.setDefaultLocator(e)}},{key:"setDefaultRouter",value:function(e){if(2==this._state)throw new Ice.CommunicatorDestroyedException;this._referenceFactory=this._referenceFactory.setDefaultRouter(e)}},{key:"setLogger",value:function(e){this._initData.logger=e}},{key:"finishSetup",value:function(e,t){try{null===this._initData.properties&&(this._initData.properties=u.createProperties()),void 0===Ice._oneOfDone&&(Ice._printStackTraces=this._initData.properties.getPropertyAsIntWithDefault("Ice.PrintStackTraces",0)>0,Ice._oneOfDone=!0),null===this._initData.logger&&(this._initData.logger=Ice.getProcessLogger()),this._traceLevels=new v(this._initData.properties),this._defaultsAndOverrides=new i(this._initData.properties,this._initData.logger);var h=this._initData.properties.getPropertyAsIntWithDefault("Ice.MessageSizeMax",1024);this._messageSizeMax=h<1||h>2147483647/1024?2147483647:1024*h,0===this._initData.properties.getProperty("Ice.BatchAutoFlushSize").length&&this._initData.properties.getProperty("Ice.BatchAutoFlush").length>0?this._initData.properties.getPropertyAsInt("Ice.BatchAutoFlush")>0&&(this._batchAutoFlushSize=this._messageSizeMax):(h=this._initData.properties.getPropertyAsIntWithDefault("Ice.BatchAutoFlushSize",1024),this._batchAutoFlushSize=h<1?h:h>2147483647/1024?2147483647:1024*h),this._clientACM=new _(this._initData.properties,this._initData.logger,"Ice.ACM.Client",new _(this._initData.properties,this._initData.logger,"Ice.ACM",new _));var f=this._initData.properties.getPropertyWithDefault("Ice.ToStringMode","Unicode");if("ASCII"===f)this._toStringMode=Ice.ToStringMode.ASCII;else if("Compat"===f)this._toStringMode=Ice.ToStringMode.Compat;else if("Unicode"!==f)throw new Ice.InitializationException("The value for Ice.ToStringMode must be Unicode, ASCII or Compat");this._implicitContext=r.create(this._initData.properties.getProperty("Ice.ImplicitContext")),this._routerManager=new g,this._locatorManager=new s(this._initData.properties),this._referenceFactory=new m(this,e),this._requestHandlerFactory=new y(this,e),this._proxyFactory=new l(this),this._endpointFactoryManager=new n(this);var S=new Ice.ProtocolInstance(this,Ice.TCPEndpointType,"tcp",!1),I=new Ice.TcpEndpointFactory(S);this._endpointFactoryManager.add(I);var w=new Ice.ProtocolInstance(this,Ice.WSEndpointType,"ws",!1),k=new Ice.WSEndpointFactory(w,I.clone(w));this._endpointFactoryManager.add(k);var C=new Ice.ProtocolInstance(this,Ice.SSLEndpointType,"ssl",!0),b=new Ice.TcpEndpointFactory(C);this._endpointFactoryManager.add(b);var E=new Ice.ProtocolInstance(this,Ice.WSSEndpointType,"wss",!0),T=new Ice.WSEndpointFactory(E,b.clone(E));this._endpointFactoryManager.add(T),this._outgoingConnectionFactory=new c(e,this),null===this._initData.valueFactoryManager&&(this._initData.valueFactoryManager=new o),this._objectAdapterFactory=new a(this,e),this._retryQueue=new d(this),this._timer=new p(this._initData.logger);var x=Ice.RouterPrx.uncheckedCast(this._proxyFactory.propertyToProxy("Ice.Default.Router"));null!==x&&(this._referenceFactory=this._referenceFactory.setDefaultRouter(x));var P=Ice.LocatorPrx.uncheckedCast(this._proxyFactory.propertyToProxy("Ice.Default.Locator"));null!==P&&(this._referenceFactory=this._referenceFactory.setDefaultLocator(P)),null!==t&&t.resolve(e)}catch(R){if(null===t)throw R instanceof Ice.LocalException&&this.destroy(),R;R instanceof Ice.LocalException?this.destroy().finally((function(){return t.reject(R)})):t.reject(R)}}},{key:"destroy",value:function(){var t=this,i=new e(null,"destroy",null,this,null);return 1==this._state?(this._destroyPromises||(this._destroyPromises=[]),this._destroyPromises.push(i),i):(this._state=1,Ice.Promise.try((function(){if(t._objectAdapterFactory)return t._objectAdapterFactory.shutdown()})).then((function(){if(null!==t._outgoingConnectionFactory&&t._outgoingConnectionFactory.destroy(),null!==t._objectAdapterFactory)return t._objectAdapterFactory.destroy()})).then((function(){if(null!==t._outgoingConnectionFactory)return t._outgoingConnectionFactory.waitUntilFinished()})).then((function(){if(t._retryQueue&&t._retryQueue.destroy(),t._timer&&t._timer.destroy(),null!==t._objectFactoryMap&&(t._objectFactoryMap.forEach((function(e){return e.destroy()})),t._objectFactoryMap.clear()),t._routerManager&&t._routerManager.destroy(),t._locatorManager&&t._locatorManager.destroy(),t._endpointFactoryManager&&t._endpointFactoryManager.destroy(),t._initData.properties.getPropertyAsInt("Ice.Warn.UnusedProperties")>0){var e=t._initData.properties.getUnusedProperties();if(e.length>0){var n=[];n.push("The following properties were set but never read:"),e.forEach((function(e){return n.push("\n ",e)})),t._initData.logger.warning(n.join(""))}}t._objectAdapterFactory=null,t._outgoingConnectionFactory=null,t._retryQueue=null,t._timer=null,t._referenceFactory=null,t._requestHandlerFactory=null,t._proxyFactory=null,t._routerManager=null,t._locatorManager=null,t._endpointFactoryManager=null,t._state=2,t._destroyPromises&&t._destroyPromises.forEach((function(e){return e.resolve()})),i.resolve()})).catch((function(e){t._destroyPromises&&t._destroyPromises.forEach((function(t){return t.reject(e)})),i.reject(e)})),i)}},{key:"addObjectFactory",value:function(e,t){this._initData.valueFactoryManager.add((function(t){return e.create(t)}),t),null===this._objectFactoryMap&&(this._objectFactoryMap=new Map),this._objectFactoryMap.set(t,e)}},{key:"findObjectFactory",value:function(e){var t=null;return null!==this._objectFactoryMap&&(t=this._objectFactoryMap.get(e)),void 0!==t?t:null}}]),S}();Ice.Instance=S}(),function(){var e=Ice.Instance,t=Ice.Debug,i=function(){"use strict";function i(t){h(this,i),this._instance=new e(t)}return f(i,[{key:"finishSetup",value:function(e){this._instance.finishSetup(this,e)}},{key:"destroy",value:function(){return this._instance.destroy()}},{key:"shutdown",value:function(){try{return this._instance.objectAdapterFactory().shutdown()}catch(e){return t.assert(e instanceof Ice.CommunicatorDestroyedException),Ice.Promise.resolve()}}},{key:"waitForShutdown",value:function(){try{return this._instance.objectAdapterFactory().waitForShutdown()}catch(e){return t.assert(e instanceof Ice.CommunicatorDestroyedException),Ice.Promise.resolve()}}},{key:"isShutdown",value:function(){try{return this._instance.objectAdapterFactory().isShutdown()}catch(e){if(!(e instanceof Ice.CommunicatorDestroyedException))throw e;return!0}}},{key:"stringToProxy",value:function(e){return this._instance.proxyFactory().stringToProxy(e)}},{key:"proxyToString",value:function(e){return this._instance.proxyFactory().proxyToString(e)}},{key:"propertyToProxy",value:function(e){return this._instance.proxyFactory().propertyToProxy(e)}},{key:"proxyToProperty",value:function(e,t){return this._instance.proxyFactory().proxyToProperty(e,t)}},{key:"stringToIdentity",value:function(e){return Ice.stringToIdentity(e)}},{key:"identityToString",value:function(e){return Ice.identityToString(e,this._instance.toStringMode())}},{key:"createObjectAdapter",value:function(e){var t=new Ice.AsyncResultBase(this,"createObjectAdapter",this,null,null);return this._instance.objectAdapterFactory().createObjectAdapter(e,null,t),t}},{key:"createObjectAdapterWithEndpoints",value:function(e,t){0===e.length&&(e=Ice.generateUUID()),this.getProperties().setProperty(e+".Endpoints",t);var i=new Ice.AsyncResultBase(this,"createObjectAdapterWithEndpoints",this,null,null);return this._instance.objectAdapterFactory().createObjectAdapter(e,null,i),i}},{key:"createObjectAdapterWithRouter",value:function(e,t){var i=this;0===e.length&&(e=Ice.generateUUID());var n=new Ice.AsyncResultBase(this,"createObjectAdapterWithRouter",this,null,null);return this.proxyToProperty(t,e+".Router").forEach((function(e,t){i.getProperties().setProperty(t,e)})),this._instance.objectAdapterFactory().createObjectAdapter(e,t,n),n}},{key:"addObjectFactory",value:function(e,t){this._instance.addObjectFactory(e,t)}},{key:"findObjectFactory",value:function(e){return this._instance.findObjectFactory(e)}},{key:"getValueFactoryManager",value:function(){return this._instance.initializationData().valueFactoryManager}},{key:"getImplicitContext",value:function(){return this._instance.getImplicitContext()}},{key:"getProperties",value:function(){return this._instance.initializationData().properties}},{key:"getLogger",value:function(){return this._instance.initializationData().logger}},{key:"getDefaultRouter",value:function(){return this._instance.referenceFactory().getDefaultRouter()}},{key:"setDefaultRouter",value:function(e){this._instance.setDefaultRouter(e)}},{key:"getDefaultLocator",value:function(){return this._instance.referenceFactory().getDefaultLocator()}},{key:"setDefaultLocator",value:function(e){this._instance.setDefaultLocator(e)}},{key:"flushBatchRequests",value:function(){return this._instance.outgoingConnectionFactory().flushAsyncBatchRequests()}},{key:"instance",get:function(){return this._instance}}]),i}();Ice.Communicator=i}(),i.Ice=Ice,i.IceMX=IceMX,i.IceSSL=IceSSL,i.ice=l})()}).call(this,i("c8ba"),i("0de9")["default"])},b17c:function(e,t,i){var n=i("4a4b"),r=i("6f8f");function s(t,i,a){return r()?(e.exports=s=Reflect.construct.bind(),e.exports.__esModule=!0,e.exports["default"]=e.exports):(e.exports=s=function(e,t,i){var r=[null];r.push.apply(r,t);var s=Function.bind.apply(e,r),a=new s;return i&&n(a,i.prototype),a},e.exports.__esModule=!0,e.exports["default"]=e.exports),s.apply(null,arguments)}e.exports=s,e.exports.__esModule=!0,e.exports["default"]=e.exports},b829:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return r})),i.d(t,"a",(function(){}));var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("text",{staticClass:e._$s(0,"sc","uni-icons"),class:e._$s(0,"c",["uniui-"+e.type,e.customPrefix,e.customPrefix?e.type:""]),style:e._$s(0,"s",{color:e.color,"font-size":e.iconSize}),attrs:{_i:0},on:{click:e._onClick}})},r=[]},c135:function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports["default"]=e.exports},c240:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports["default"]=e.exports},c5f7:function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.__esModule=!0,e.exports["default"]=e.exports},c8ba:function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(n){"object"===typeof window&&(i=window)}e.exports=i},c973:function(e,t){function i(e,t,i,n,r,s,a){try{var o=e[s](a),c=o.value}catch(u){return void i(u)}o.done?t(c):Promise.resolve(c).then(n,r)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,s){var a=e.apply(t,n);function o(e){i(a,r,s,o,c,"next",e)}function c(e){i(a,r,s,o,c,"throw",e)}o(void 0)}))}},e.exports.__esModule=!0,e.exports["default"]=e.exports},c9a0:function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.$=a,t.clearLogClick=function(){a("output").value=""},t.client=void 0,t.getNowFormatDate=function(){var e=new Date,t=e.getMonth()+1,i=e.getDate();t>=1&&t<=9&&(t="0"+t);i>=0&&i<=9&&(i="0"+i);var n=e.getFullYear()+"/"+t+"/"+i+" "+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds();return n},t.handleChange=function(e){var t=0;switch(e){case 1:t=1;break;case 2:t=2;break;default:break}r.handleMode=t},t.isRegisted=function(){alert("\u5df2\u6ce8\u518c\uff1a "+r.isRegisted)},t.mylog=s,t.onForceLoginClick=function(){r.forceLogin().then((function(e){s("\u5f3a\u5236\u767b\u5f55\u8005\u6210\u529f")})).catch((function(e){s("\u5f3a\u5236\u767b\u5f55\u8005\u5931\u8d25\uff1a"+JSON.stringify(e))}))},t.onbindPhoneHandleClick=function(){var e=a("txtLeftPhone").value,t=a("txtRightPhone").value;r.bindPhoneHandle(e,t).then((function(e){s("\u7ed1\u5b9a\u5de6\u53f3\u8bdd\u67c4\u6210\u529f")})).catch((function(e){s("\u7ed1\u5b9a\u5de6\u53f3\u8bdd\u67c4\u5931\u8d25 \uff1a"+JSON.stringify(e))}))},t.regist=function(){var e=a("txtServerIP").value,t=a("txtServerPort").value,i=a("txtbusinesPort").value,n=a("txtUsername").value,s=a("txtPassword").value,o=a("cmbUserType").value,c={ip:e,port:t,businesPort:i,userName:n,password:s,userType:o,resourceUrl:"",businessResourceUrl:""};r.regist(c)},t.unRegist=function(){r.unRegist()};var n=i("386d"),r=n.XYClient.DispatcherClient.getInstance();function s(t){e("log",t," at util/dispatch.js:121")}function a(e){return document.getElementById?document.getElementById(e):document.all(e)}t.client=r,r.enableLog=!0,r.registStateChange.on((function(e){var t,i=e.state;switch(i){case 1:t="registed";break;case 2:t="unregisted";break;case 3:t="connect error";break;case 4:t="password error";break;case 5:t="user not exist";break;case 6:t="server error";break;case 7:t="other error";break;case 8:t="repeat login";break;case 9:t="type error";break;case 10:t="\u88ab\u5f3a\u5236\u4e0b\u7ebf";break;default:break}s("onRegitStateChange: "+t)})),r.serverConnectStateChanged.on((function(e){var t;switch(e){case 1:t="connected";break;case 0:t="disconect";break;default:break}s("serverConectStateChanged state: "+t)}))}).call(this,i("0de9")["default"])},d602:function(e,t,i){"use strict";i.r(t);var n=i("8009"),r=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=r.a},d7d9:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return r})),i.d(t,"a",(function(){}));var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("view",{staticClass:e._$s(0,"sc","uni-forms-item"),class:e._$s(0,"c",["is-direction-"+e.localLabelPos,e.border?"uni-forms-item--border":"",e.border&&e.isFirstBorder?"is-first-border":""]),attrs:{_i:0}},[e._t("label",[i("view",{staticClass:e._$s(2,"sc","uni-forms-item__label"),class:e._$s(2,"c",{"no-label":!e.label&&!e.required}),style:e._$s(2,"s",{width:e.localLabelWidth,justifyContent:e.localLabelAlign}),attrs:{_i:2}},[e._$s(3,"i",e.required)?i("text",{staticClass:e._$s(3,"sc","is-required"),attrs:{_i:3}}):e._e(),i("text",[e._v(e._$s(4,"t0-0",e._s(e.label)))])])],{_i:1}),i("view",{staticClass:e._$s(5,"sc","uni-forms-item__content"),attrs:{_i:5}},[e._t("default",null,{_i:6}),i("view",{staticClass:e._$s(7,"sc","uni-forms-item__error"),class:e._$s(7,"c",{"msg--active":e.msg}),attrs:{_i:7}},[i("text",[e._v(e._$s(8,"t0-0",e._s(e.msg)))])])],2)],2)},r=[]},e2b9:function(e,t,i){"use strict";i.r(t);var n=i("e853");for(var r in n)["default"].indexOf(r)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(r);var s=i("f0c5"),a=Object(s["a"])(n["default"],void 0,void 0,!1,null,null,null,!1,void 0,void 0);t["default"]=a.exports},e455:function(e,t,i){"use strict";i.r(t);var n=i("6d76"),r=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=r.a},e50d:function(e,t,i){var n=i("7037")["default"];e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports["default"]=e.exports},e853:function(e,t,i){"use strict";i.r(t);var n=i("8ae5"),r=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=r.a},ed6d:function(e,t,i){var n=i("4a4b");e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)},e.exports.__esModule=!0,e.exports["default"]=e.exports},ed96:function(e,t,i){"use strict";i.r(t);var n=i("8e98"),r=i("d602");for(var s in r)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(s);var a=i("f0c5"),o=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=o.exports},edb9:function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={data:function(){return{keepAlive:null}},onLoad:function(){this.keepAlive=uni.requireNativePlugin("Ba-KeepAliveSuit"),this.onKeep()},methods:{onKeep:function(){keepAlive.onKeep({title:"\u6d4b\u8bd5",content:"\u5e38\u9a7b\u901a\u77e5\u63cf\u8ff0"},(function(t){e("log",t," at pages/index/index.vue:38"),uni.showToast({title:t.msg,icon:"none",duration:3e3})}))}}};t.default=i}).call(this,i("0de9")["default"])},f001:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return r})),i.d(t,"a",(function(){}));var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("view",{staticClass:e._$s(0,"sc","container"),attrs:{_i:0}},[i("form",{staticClass:e._$s(1,"sc","padding-wrap"),attrs:{_i:1}},[i("view",{staticClass:e._$s(2,"sc","uni-form-item uni-column"),attrs:{_i:2}},[i("view",{staticClass:e._$s(3,"sc","title"),attrs:{_i:3}}),i("view",[i("input",{directives:[{name:"model",rawName:"v-model",value:e.form.longidute,expression:"form.longidute"}],staticClass:e._$s(5,"sc","uni-input"),attrs:{_i:5},domProps:{value:e._$s(5,"v-model",e.form.longidute)},on:{input:function(t){t.target.composing||e.$set(e.form,"longidute",t.target.value)}}})])]),i("view",{staticClass:e._$s(6,"sc","uni-form-item uni-column"),attrs:{_i:6}},[i("view",{staticClass:e._$s(7,"sc","title"),attrs:{_i:7}}),i("view",[i("input",{directives:[{name:"model",rawName:"v-model",value:e.form.latidute,expression:"form.latidute"}],staticClass:e._$s(9,"sc","uni-input"),attrs:{_i:9},domProps:{value:e._$s(9,"v-model",e.form.latidute)},on:{input:function(t){t.target.composing||e.$set(e.form,"latidute",t.target.value)}}})])]),i("view",{staticClass:e._$s(10,"sc","uni-form-item uni-column"),attrs:{_i:10}},[i("view",{staticClass:e._$s(11,"sc","title"),attrs:{_i:11}}),i("view",[i("textarea",{directives:[{name:"model",rawName:"v-model",value:e.form.msg,expression:"form.msg"}],staticClass:e._$s(13,"sc","uni-input"),attrs:{_i:13},domProps:{value:e._$s(13,"v-model",e.form.msg)},on:{input:function(t){t.target.composing||e.$set(e.form,"msg",t.target.value)}}})])]),i("view",[i("button",{})])])])},r=[]},f0c5:function(e,t,i){"use strict";function n(e,t,i,n,r,s,a,o,c,u){var l,d="function"===typeof e?e.options:e;if(c){d.components||(d.components={});var h=Object.prototype.hasOwnProperty;for(var f in c)h.call(c,f)&&!h.call(d.components,f)&&(d.components[f]=c[f])}if(u&&("function"===typeof u.beforeCreate&&(u.beforeCreate=[u.beforeCreate]),(u.beforeCreate||(u.beforeCreate=[])).unshift((function(){this[u.__module]=this})),(d.mixins||(d.mixins=[])).push(u)),t&&(d.render=t,d.staticRenderFns=i,d._compiled=!0),n&&(d.functional=!0),s&&(d._scopeId="data-v-"+s),a?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},d._ssrRegister=l):r&&(l=o?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(d.functional){d._injectStyles=l;var g=d.render;d.render=function(e,t){return l.call(t),g(e,t)}}else{var p=d.beforeCreate;d.beforeCreate=p?[].concat(p,l):[l]}return{exports:e,options:d}}i.d(t,"a",(function(){return n}))},f0d8:function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return s})),i.d(t,"a",(function(){return n}));var n={uniSection:i("ed96").default,uniForms:i("184c").default,uniFormsItem:i("2fcd").default,uniEasyinput:i("4da6").default},r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("view",{staticClass:e._$s(0,"sc","container"),attrs:{_i:0}},[i("uni-section",{attrs:{title:"GIS\u5b9a\u4f4d",type:"line",_i:1}},[i("uni-forms",{ref:"form",staticClass:e._$s(2,"sc","padding-wrap"),attrs:{modelValue:e.form,rules:e.rules,_i:2}},[i("uni-forms-item",{attrs:{label:"\u7ecf\u5ea6\uff1a",name:"longidute",required:!0,_i:3}},[i("uni-easyinput",{attrs:{_i:4},model:{value:e._$s(4,"v-model",e.form.longidute),callback:function(t){e.$set(e.form,"longidute",t)},expression:"form.longidute"}})],1),i("uni-forms-item",{attrs:{label:"\u7ef4\u5ea6\uff1a",name:"latidute",required:!0,_i:5}},[i("uni-easyinput",{attrs:{_i:6},model:{value:e._$s(6,"v-model",e.form.latidute),callback:function(t){e.$set(e.form,"latidute",t)},expression:"form.latidute"}})],1),i("uni-forms-item",{attrs:{label:"msg\uff1a",_i:7}},[i("uni-easyinput",{attrs:{type:"textarea",_i:8},model:{value:e._$s(8,"v-model",e.form.msg),callback:function(t){e.$set(e.form,"msg",t)},expression:"form.msg"}})],1),i("view",[i("button",{attrs:{_i:10},on:{click:e.submit}})])],1)],1)],1)},s=[]},fb7b:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={data:function(){return{form:{longidute:"",latidute:"",msg:""}}},onLoad:function(){},methods:{}}}},[["7bd1","app-config"]]]);