McuClient.js 402.6 KB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.MCUClientEngine=t():e.MCUClientEngine=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,i){r.apply(this,[e,t,i].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){e.exports=n(29)},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t){n(this,e),this.sdkInfo=t||"",this.id=this.initId()}return r(e,[{key:"initId",value:function(){var e=this.sdkInfo.constructor.name.toLowerCase();return"string"===e?this.sdkInfo:"object"===e?this.sdkInfo.mid||"":""}},{key:"log",value:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];this._log(e.LOG,n)}},{key:"warn",value:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];this._log(e.WARN,n)}},{key:"error",value:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];this._log(e.ERROR,n)}},{key:"data",value:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];this._log(e.DATA,n)}},{key:"_log",value:function(t,n){n=JSON.stringify(n);var r=this.id+" -> "+n;if(t>=e.logLevel)switch(t){case e.LOG:console.log(r);break;case e.WARN:console.warn(r);break;case e.ERROR:console.error(r);break;case e.DATA:console.log(r)}}}]),e}();i.LOG=0,i.WARN=1,i.ERROR=2,i.NO=1/0,i.logLevel=i.LOG,i.DATA=5;var o={getLoger:function(e){return new i(e)},setLogLevel:function(e){i.logLevel=e},LOG:i.LOG,WARN:i.WARN,ERROR:i.ERROR,NO:i.NO,DATA:i.DATA};t.default=o;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(i,"Loger","D:/work/mcuClientBranch/McuClient20170228/src/Loger.js"),__REACT_HOT_LOADER__.register(o,"default","D:/work/mcuClientBranch/McuClient20170228/src/Loger.js"))})()},function(e,t){"use strict";function n(){}Object.defineProperty(t,"__esModule",{value:!0}),n.CLASS_JOIN_SUCCESS="join.class.success",n.CLASS_SHOW_ROSTER_NUM="roster_num.message",n.CLASS_INSERT_ROSTER="roster.insert.message",n.CLASS_DELETE_ROSTER="roster.delete.message",n.CLASS_NONENTITY_ROSTER="roster.nonentity.message",n.CLASS_EXIT="class.exit",n.CLASS_UPTATE_STATUS="class.update.status",n.CLASS_STATUS_INFO_CHANGE="class.status.info.change",n.CLASS_UPDATE_TIMER="class.update.timer",n.CLASS_RECORD_START="class.record.start",n.CHAT_RECEIVE="chat.receive",n.VIDEO_UPDATE="video.update",n.VIDEO_BROADCAST="video.broadcast",n.AUDIO_UPDATE="audio.update",n.AUDIO_BROADCAST="audio.broadcast",n.DOC_DELETE="document.delete",n.DOC_UPDATE="document.update",n.WHITEBOARD_ANNOTATION_UPDATE="whiteboard.annotation.update",n.AUDIO_RECEIVE="audio.receive",n.MCU_ERROR="mcuError",n.ERR_CLASS_INIT_PARAM=100,n.ERR_CLASS_INIT_NETWORK=101,n.ERR_CLASS_INIT_PROTOCOL=102,n.ERR_CLASS_INIT_FAILED=103,n.ERR_CLASS_INIT_FAILED_1=104,n.ERR_CLASS_INIT_FAILED_2=105,n.ERR_CLASS_INIT_FAILED_3=106,n.ERR_CLASS_INIT_FAILED_4=107,n.ERR_CLASS_JOIN_NETWORK=200,n.ERR_CLASS_JOIN_PROTOCOL=201,n.ERR_CLASS_JOIN_FAILED=202,n.ERR_CLASS_JOIN_PARAM=203,n.ERR_CLASS_JOIN_FULL=204,n.ERR_CLASS_MD5_WRONG=205,n.ERR_CLASS_PASSWORD_WRONG=206,n.ERR_CLASS_JOIN_CONFILICT=207,n.ERR_GET_CLASS_DETAIL=300,n.ERR_GET_CLASS_PARAML=301,n.ERR_APE_SEND_FAILED_NO_JOIN=500,n.ERR_APE_INTERFACE_PARAM_WRONG=501,n.ERR_DOC_DELETE_FAILED=600,n.ERR_DOC_DELETE_FAILED_PARAM=601,n.ERR_NETWORK=1e4,n.ERR_UNKNOWN=10001,n.ERR_SOCKET_DISCONNECT=2e4,n.ErrorReson={},n.ErrorReson[n.ERR_CLASS_INIT_PARAM]="初始化参数错误",n.ErrorReson[n.ERR_CLASS_INIT_NETWORK]="初始化网络错误",n.ErrorReson[n.ERR_CLASS_INIT_PROTOCOL]="初始化协议错误",n.ErrorReson[n.ERR_CLASS_INIT_FAILED]="初始化验证失败",n.ErrorReson[n.ERR_CLASS_INIT_FAILED_1]="初始化验证失败,课堂号必填",n.ErrorReson[n.ERR_CLASS_INIT_FAILED_2]="初始化验证失败,无效的课堂号",n.ErrorReson[n.ERR_CLASS_INIT_FAILED_3]="初始化验证失败,没有对应的站点",n.ErrorReson[n.ERR_CLASS_INIT_FAILED_4]="初始化验证失败,站点已过期",n.ErrorReson[n.ERR_CLASS_JOIN_NETWORK]="加入会议网络错误",n.ErrorReson[n.ERR_CLASS_JOIN_PROTOCOL]="加入会议化协议错误",n.ErrorReson[n.ERR_CLASS_JOIN_FAILED]="加入会议化异常错误",n.ErrorReson[n.ERR_CLASS_JOIN_PARAM]="加入会议参数错误",n.ErrorReson[n.ERR_CLASS_JOIN_FULL]="人数已满",n.ErrorReson[n.ERR_CLASS_MD5_WRONG]="MD5验证失败",n.ErrorReson[n.ERR_CLASS_PASSWORD_WRONG]="密码错误",n.ErrorReson[n.ERR_CLASS_JOIN_CONFILICT]="已经在其它地方登陆",n.ErrorReson[n.ERR_GET_CLASS_DETAIL]="获取classDetail失败",n.ErrorReson[n.ERR_GET_CLASS_PARAML]="获取ClassParam失败",n.ErrorReson[n.ERR_APE_SEND_FAILED_NO_JOIN]="APE在sdk为初始化或未加入会议之前调用发送数据接口",n.ErrorReson[n.ERR_APE_INTERFACE_PARAM_WRONG]="APE在接口调用时参数错误",n.ErrorReson[n.ERR_DOC_DELETE_FAILED]="删除文档失败",n.ErrorReson[n.ERR_DOC_DELETE_FAILED_PARAM]="删除文档失败,参数错误",n.ErrorReson[n.ERR_NETWORK]="网络错误",n.ErrorReson[n.ERR_UNKNOWN]="未知错误",n.ErrorReson[n.ERR_SOCKET_DISCONNECT]="MCU断开连接,已经离开会议";var r=n;t.default=r;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(n,"MessageTypes","D:/work/mcuClientBranch/McuClient20170228/src/MessageTypes.js"),__REACT_HOT_LOADER__.register(r,"default","D:/work/mcuClientBranch/McuClient20170228/src/MessageTypes.js"))})()},function(e,t){"use strict";function n(e){for(var t in n)if(n[t]===e)return t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.CLASS_STATUS_WAIT=0,n.CLASS_STATUS_STARTED=1,n.CLASS_STATUS_PAUSE=2,n.CLASS_STATUS_CLOSE=3,n.CLASS_STATUS_UPTATE=4,n.CLASS_WAIT_START="class.wait.start",n.CLASS_STARTING="class.started",n.CLASS_PAUSING="class.pause",n.CLASS_PAUSING="class.closed",n.CLASS_PAUSING="class.update",n.CLASS_ACTION_CLOSE_ALL=1,n.CLASS_TYPE_INTERACT=1,n.CLASS_TYPE_LIVE=2,n.NR_NORMAL=1,n.NR_ADMIN=2,n.NR_HOST=4,n.NR_PRESENTER=8,n.NR_ASSISTANT=16,n.NR_INVISIBLE=32,n.host="host",n.presenter="presenter",n.assistant="assistant",n.normal="normal",n.record="record",n.invisible="invisible",n.userTypes={},n.userTypes[n.NR_NORMAL]=n.normal,n.userTypes[n.NR_ADMIN]=n.record,n.userTypes[n.NR_HOST]=n.host,n.userTypes[n.NR_PRESENTER]=n.presenter,n.userTypes[n.NR_ASSISTANT]=n.assistant,n.userTypes[n.NR_INVISIBLE]=n.invisible,n.userTypesToId={},n.userTypesToId[n.normal]=n.NR_NORMAL,n.userTypesToId[n.record]=n.NR_ADMIN,n.userTypesToId[n.host]=n.NR_HOST,n.userTypesToId[n.presenter]=n.NR_PRESENTER,n.userTypesToId[n.assistant]=n.NR_ASSISTANT,n.userTypesToId[n.invisible]=n.NR_INVISIBLE,n.MS_TYPE_DEFAULT=0,n.MS_TYPE_FMS=1,n.USER_HAND_UP=32,n.USER_MIC_OPEN=64,n.USER_CAMERA_OPEN=128,n.MEDIA_ACTION_DEFAULT=0,n.MEDIA_ACTION_OPEN_CAMERA=1,n.MEDIA_ACTION_CLOSE_CAMERA=2,n.MEDIA_ACTION_OPEN_MIC=3,n.MEDIA_ACTION_CLOSE_MIC=4,n.CHANNEL_STATUS_RELEASED=0,n.CHANNEL_STATUS_OPENING=1,n.MEDIA_TYPE_DEFAULT=0,n.MEDIA_TYPE_VIDEO=1,n.MEDIA_TYPE_AUDIO=2,n.RETURN_SUCCESS=0,n.RETURN_FAILED=1,n.INVALIDATE_CHANNEL_ID=-1,n.INVALIDATE_NODE_ID=-1,n.DOC_ACTION_NORMAL=0,n.DOC_ACTION_SWITCH_DOC=1,n.DOC_ACTION_SWITCH_PAGE=2,n.DOC_ACTION_COMMAND=3,n.CONFERENCE_SESSION_ID=11,n.CHAT_SESSION_ID=12,n.GIFT_SESSION_ID=13,n.AUDIO_SESSION_ID=14,n.VIDEO_SESSION_ID=15,n.WEBSHARING_SESSION_ID=16,n.DOCSHARING_SESSION_ID=17,n.WHITEBOARD_SESSION_ID=18,n.MEDIA_SESSION_ID=19,n.SCREENSHARING_SESSION_ID=20,n.POLL_SESSION_ID=21,n.BROADCAST_CHANNEL_ID=0,n.CONFERENCE_CHANNEL_ID=n.CONFERENCE_SESSION_ID,n.CHAT_CHANNEL_ID=n.CHAT_SESSION_ID,n.GIFT_CHANNEL_ID=n.GIFT_SESSION_ID,n.WEBSHARING_CHANNEL_ID=n.WEBSHARING_SESSION_ID,n.DOCSHARING_CHANNEL_ID=n.DOCSHARING_SESSION_ID,n.WHITEBOARD_CHANNEL_ID=n.WHITEBOARD_SESSION_ID,n.MEDIA_CHANNEL_ID=n.MEDIA_SESSION_ID,n.SCREENSHARING_CHANNEL_ID=n.SCREENSHARING_SESSION_ID,n.CONFERENCE_SESSION_NAME="conference app",n.CHAT_SESSION_NAME="chat app",n.GIFT_SESSION_NAME="gift app",n.AUDIO_SESSION_NAME="audio app",n.VIDEO_SESSION_NAME="video app",n.WEBSHARING_SESSION_NAME="web sharing app",n.DOCSHARING_SESSION_NAME="doc sharing app",n.WHITEBOARD_SESSION_NAME="whiteboard app",n.MEDIA_SESSION_NAME="media sharing app",n.SCREENSHARING_SESSION_NAME="screen sharing app",n.CONFERENCE_SESSION_TAG="con-tag",n.CHAT_SESSION_TAG="cha-tag",n.GIFT_SESSION_TAG="gif-tag",n.AUDIO_SESSION_TAG="aud-tag",n.VIDEO_SESSION_TAG="vid-tag",n.WEBSHARING_SESSION_TAG="web-tag",n.DOCSHARING_SESSION_TAG="doc-tag",n.WHITEBOARD_SESSION_TAG="wbd-tag",n.MEDIA_SESSION_TAG="med-tag",n.SCREENSHARING_SESSION_TAG="scr-tag",n.CONFERENCE_OBJ_ROSTER_ID=(n.CONFERENCE_SESSION_ID<<16)+1,n.CONFERENCE_OBJ_ROSTER_NAME="node list",n.CONFERENCE_OBJ_ROSTER_TAG="node list tag",n.CONFERENCE_OBJ_QUEUE_ID=(n.CONFERENCE_SESSION_ID<<16)+2,n.CONFERENCE_OBJ_QUEUE_NAME="mic list",n.CONFERENCE_OBJ_QUEUE_TAG="mic list tag",n.CONFERENCE_OBJ_TABLE_ID=(n.CONFERENCE_SESSION_ID<<16)+3,n.CONFERENCE_OBJ_TABLE_NAME="tabbar list",n.CONFERENCE_OBJ_TABLE_TAG="tabbar list tag",n.CONFERENCE_OBJ_COUNTER_ID=(n.CONFERENCE_SESSION_ID<<16)+4,n.CONFERENCE_OBJ_COUNTER_NAME="id list",n.CONFERENCE_OBJ_COUNTER_TAG="id list tag",n.WEBSHARING_OBJ_TABLE_ID=(n.WEBSHARING_SESSION_ID<<16)+1,n.WEBSHARING_OBJ_TABLE_NAME="web list",n.WEBSHARING_OBJ_TABLE_TAG="web list tag",n.DOCSHARING_OBJ_TABLE_ID=(n.DOCSHARING_SESSION_ID<<16)+1,n.DOCSHARING_OBJ_TABLE_NAME="doc list",n.DOCSHARING_OBJ_TABLE_TAG="doc list tag",n.DOCSHARING_OBJ_TABLE_ID_H5=(n.DOCSHARING_SESSION_ID<<16)+2,n.DOCSHARING_OBJ_TABLE_NAME_H5="doc list h5",n.DOCSHARING_OBJ_TABLE_TAG_H5="doc list tag h5",n.WHITEBOARD_OBJ_TABLE_ID=(n.WHITEBOARD_SESSION_ID<<16)+1,n.WHITEBOARD_OBJ_TABLE_NAME="wbd list",n.WHITEBOARD_OBJ_TABLE_TAG="wbd list tag",n.MEDIA_OBJ_TABLE_ID=(n.MEDIA_SESSION_ID<<16)+1,n.MEDIA_OBJ_TABLE_NAME="med list",n.MEDIA_OBJ_TABLE_TAG="med list tag",n.CHAT_OBJ_TABLE_ID=(n.CHAT_SESSION_ID<<16)+1,n.CHAT_OBJ_TABLE_NAME="chat list",n.CHAT_OBJ_TABLE_TAG="chat list tag",n.AUDIO_OBJ_TABLE_ID=(n.AUDIO_SESSION_ID<<16)+1,n.AUDIO_OBJ_TABLE_NAME="audio channel list",n.AUDIO_OBJ_TABLE_TAG="audio channel list tag",n.VIDEO_OBJ_TABLE_ID=(n.VIDEO_SESSION_ID<<16)+1,n.VIDEO_OBJ_TABLE_NAME="video channel list",n.VIDEO_OBJ_TABLE_TAG="video channel list tag",n.SCREENSHARING_OBJ_TABLE_ID=(n.SCREENSHARING_SESSION_ID<<16)+1,n.SCREEN_OBJ_TABLE_NAME="scr list",n.SCREEN_OBJ_TABLE_TAG="scr list tag",n.POLL_OBJ_TABLE_ID=(n.POLL_SESSION_ID<<16)+1,n.VOTE_OBJ_TABLE_ID=(n.POLL_SESSION_ID<<16)+2,n.RECORD_OBJ_TABLE_ID=(n.POLL_SESSION_ID<<16)+3,n.SHAMLIVE_OBJ_TABLE_ID=(n.POLL_SESSION_ID<<16)+4,n.POLL_OBJ_TABLE_NAME="poll list",n.POLL_OBJ_TABLE_TAG="poll list tag",n.REG_TABLE_INSERT_TAIL=16777215,n.REG_TABLE_DELETE_ALL=16777215,n.CJS_RELEASED=0,n.CJS_JOINNING=1,n.CJS_JOINNED=2,n.WBA_CLOSE=1,n.WBA_CHANGE=2,n.WBA_OPEN=3,n.WBA_DOC_ANNOTATION=4,n.WBA_LASER_PEN=5;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(n,"ApeConsts","D:/work/mcuClientBranch/McuClient20170228/src/apes/ApeConsts.js")})()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(14),a=r(s),u=n(11),l=r(u),f=function(){function e(){i(this,e)}return o(e,null,[{key:"isEmptyObject",value:function(e){for(var t in e)return!1;return!0}},{key:"arrayToJsonString",value:function(e){try{return JSON.stringify(e)}catch(e){console.log("arrayToJsonString error:"+e.message)}return null}},{key:"arrayFromJsonString",value:function(e){try{return JSON.parse(e)}catch(e){console.log("arrayFromJsonString error:"+e.message)}return null}},{key:"creatSoleNumberFromTimestamp",value:function(){var e=(new Date).getTime(),t=e%1e9;return t}},{key:"creatTimestamp",value:function(){var e=parseInt((new Date).getTime()/1e3);return e}},{key:"creatTimestampStr",value:function(){var e=new Date,t=""+e.getFullYear()+"-";return t+=e.getMonth()+1+"-",t+=e.getDate()+"-",t+=e.getHours()+"-",t+=e.getMinutes()+"-",t+=e.getSeconds()}},{key:"creatTimestampYMD",value:function(){var e=new Date,t=""+e.getFullYear(),n=""+(e.getMonth()+1),r=""+e.getDate();return n.length<2&&(n="0"+n),r.length<2&&(r="0"+r),t+n+r}},{key:"objectToBase64",value:function(e){try{var t=JSON.stringify(e),n=l.default.setBytesFromString(t),r=a.default.fromByteArray(n);return r}catch(e){return console.log("objectToBase64 err:"+e.message),""}return""}},{key:"objectFromBase64",value:function(e){try{var t=a.default.toByteArray(e),n=l.default.getStringFromBytes(t),r=JSON.parse(n);return r}catch(e){return console.log("objectFromBase64 err:"+e.message),null}return null}}]),e}(),d=f;t.default=d;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(f,"EngineUtils","D:/work/mcuClientBranch/McuClient20170228/src/EngineUtils.js"),__REACT_HOT_LOADER__.register(d,"default","D:/work/mcuClientBranch/McuClient20170228/src/EngineUtils.js"))})()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),a=r(s),u=n(3),l=r(u),f=n(4),d=r(f),c=a.default.getLoger("GlobalConfig"),h=function(){function e(){i(this,e),this._currentStatus=null}return o(e,null,[{key:"getCurrentStatus",value:function(){return null==this._currentStatus&&(this._currentStatus=this.statusCode_0),this._currentStatus}},{key:"setCurrentStatus",value:function(e){this._currentStatus=e}},{key:"getClassDetail",value:function(){return this.classDetail}},{key:"setClassDetail",value:function(e){this.classDetail=e}},{key:"getClassInfo",value:function(){var e={};return e.siteId=this.siteId,e.classId=this.classId,e.className=this.className,e.h5Module=this.h5Module,e.nodeId=this.nodeId,e.topNodeID=this.topNodeID,e.userRole=this.userRole,e.role=this.role,e.isHost=this.isHost,e.userId=this.userId,e.userName=this.userName,e.password=this.password,e.userType=this.userType,e.passwordRequired=this.passwordRequired,e.md5=this.md5,e.msType=this.msType,e.portal=this.portal,e.mcuDelay=this.mcuDelay,e.MCUServerIP=this.MCUServerIP,e.MCUServerPort=this.MCUServerPort,e.maxVideoChannels=this.maxVideoChannels,e.maxAudioChannels=this.maxAudioChannels,e}},{key:"setClassStatusInfo",value:function(e){if(c.log("setClassStatusInfo"),null==e)return void c.warn("classStatusInfo error,_data:",e);var t=e;this.siteId=t.siteId||this.siteId,this.classId=t.classId||this.classId,this.className=t.className||this.className,this.classType=t.classType||this.classType,this.classStatus=t.classStatus||this.classStatus,this.classStartTime=t.classStartTime||this.classStartTime,this.classStopTime=t.classStopTime||this.classStopTime,this.classTimestamp=t.classTimestamp||this.classTimestamp,this.classBeginTime=t.classBeginTime||this.classBeginTime,this.classEndTime=t.classEndTime||this.classEndTime,this.recordStatus=t.recordStatus||this.recordStatus,this.recordTimestamp=t.recordTimestamp||this.recordTimestamp,this.recordFileName=t.recordFileName||this.recordFileName,this.recordDownloadUrl=t.recordDownloadUrl||this.recordDownloadUrl,this.activeDocId=t.activeDocId||this.activeDocId,this.activeDocCurPage=t.activeDocCurPage||this.activeDocCurPage}},{key:"setDocListPrepare",value:function(e){null!=e&&(this.docListPrepare=e)}},{key:"getDocListPrepare",value:function(){return this.docListPrepare}},{key:"setRecordList",value:function(e){null!=e&&(this.recordList=e)}},{key:"getRecordList",value:function(){return this.recordList}},{key:"setDocList",value:function(e){null!=e&&(this.docList=e)}},{key:"getDocList",value:function(){return this.docList}},{key:"setMsList",value:function(e){null!=e&&(this.msList=e)}},{key:"getMsList",value:function(){return this.msList}},{key:"setMcuList",value:function(e){null!=e&&(this.mcuList=e)}},{key:"getMcuList",value:function(){return this.mcuList}},{key:"setMusicList",value:function(e){null!=e&&(this.musicList=e)}},{key:"getMusicList",value:function(){return this.musicList}},{key:"setMusicListPrepare",value:function(e){null!=e&&(this.musicListPrepare=e)}},{key:"getMusicListPrepare",value:function(){return this.musicListPrepare}},{key:"setRsList",value:function(e){null!=e&&(this.rsList=e)}},{key:"getRsList",value:function(){return this.rsList}},{key:"classStatusInfo",get:function(){var e={};return e.siteId=this.siteId,e.classId=this.classId,e.className=this.className,e.classType=this.classType,e.classStatus=this.classStatus,e.classStartTime=this.classStartTime,e.classStopTime=this.classStopTime,e.classTimestamp=this.classTimestamp,e.classBeginTime=this.classBeginTime,e.classEndTime=this.classEndTime,e.recordStatus=this.recordStatus,e.recordTimestamp=this.recordTimestamp,e.recordFileName=this.recordFileName,e.recordDownloadUrl=this.recordDownloadUrl,e.serverTimestamp=this.serverTimestamp,e.activeDocId=this.activeDocId,e.activeDocCurPage=this.activeDocCurPage,e}},{key:"isHost",get:function(){return this.userRole==l.default.host}},{key:"isAssistant",get:function(){return this.userRole==l.default.assistant}},{key:"isPresenter",get:function(){return this.userRole==l.default.presenter}},{key:"isNormal",get:function(){return this.userRole==l.default.normal}},{key:"isInvisible",get:function(){return this.userRole==l.default.invisible}},{key:"serverTimestamp",get:function(){return d.default.creatTimestamp()}}]),e}();h.statusCode_0={code:0,message:"SDK 未初始化"},h.statusCode_1={code:1,message:"未加入会议"},h.statusCode_2={code:2,message:"已经加入会议"},h.statusCode_3={code:3,message:"已经离开会议"},h.statusCode_4={code:4,message:"未知状态"},h.md5="",h.msType=1,h.mcuDelay=60,h.docDelay=1600,h.portal="112.126.80.182:80",h.MCUServerIP="114.215.195.70",h.MCUServerPort=9003,h.MSServerIP="",h.MSServerPort="",h.RSServerIP="",h.RSServerPort="",h.DOCServerIP="",h.DOCServerPort="",h.RecordServerIP="",h.RecordServerPort="",h.maxVideoChannels=0,h.maxAudioChannels=0,h.hasCamera=!1,h.hasMicrophone=!1,h.deviceType=0,h.userIP="",h.userId=0,h.userName="",h.nodeId=0,h.passwordRequired=!1,h.password="",h.userType=8,h.userRole=l.default.normal,h.role=l.default.NR_NORMAL,h.h5Module=1,h.topNodeID=101,h.siteId="gust",h.className="",h.classId=0,h.classType=l.default.CLASS_TYPE_INTERACT,h.classStatus=l.default.CLASS_STATUS_WAIT,h.classStartTime="",h.classStopTime="",h.classBeginTime="",h.classEndTime="",h.classTimestamp=0,h.recordStatus=!1,h.recordTimestamp=0,h.recordFileName="",h.recordDownloadUrl="",h.recordReplaytickValues={},h.updateClassInfoDelay=30,h.activeDocId=0,h.activeDocCurPage=1,h.classAllParam={},h.classDetail={},h.docListPrepare=[],h.recordList=[],h.docList=[],h.mcuList=[],h.msList=[],h.musicList=[],h.musicListPrepare=[],h.rsList=[];var p=h;t.default=p;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(c,"loger","D:/work/mcuClientBranch/McuClient20170228/src/GlobalConfig.js"),__REACT_HOT_LOADER__.register(h,"GlobalConfig","D:/work/mcuClientBranch/McuClient20170228/src/GlobalConfig.js"),__REACT_HOT_LOADER__.register(p,"default","D:/work/mcuClientBranch/McuClient20170228/src/GlobalConfig.js"))})()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n,r,i,o,s,a,u,l,f){var d=new _.RCSendDataPdu;return d.set("type",e),d.set("subType",t),d.set("initiator",n),d.set("confId",r),d.set("sessionId",i),d.set("channelId",o),d.set("upward",s),d.set("reliability",a),d.set("priority",u),d.set("peer",l),d.set("seg",f),d}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(44),a=r(s),u=n(38),l=r(u),f=n(18),d=r(f),c=n(13),h=r(c),p=a.default.newBuilder({convertFieldsToCamelCase:!0});a.default.loadProto(l.default,p);var _=p.build();_.decode_pdu=function(e){return _.RCSendDataPdu.decode(e)},_.create_join_class_request_pdu=function(e,t,n,r,o,s,a,u,l){return i(d.default.RCPDU_CONNECT_PROVIDER_REQUEST,e,t,n,r,o,!0,s,a,u,l)},_.create_uniform_pdu=function(e,t,n,r,o,s,a,u,l){return i(d.default.RCPDU_UNIFORM_SEND_DATA_REQUEST,e,t,n,r,o,!0,s,a,u,l)},_.create_normal_pdu=function(e,t,n,r,o,s,a,u,l,f){return i(d.default.RCPDU_SEND_DATA_REQUEST,e,t,n,r,o,s,a,u,l,f)},_.id2type=function(e){for(var t in d.default)if(d.default[t]===e)return t},_=o({},_,d.default,h.default);var E=_;t.default=E;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(p,"builder","D:/work/mcuClientBranch/McuClient20170228/src/pdus/index.js"),__REACT_HOT_LOADER__.register(_,"pdu","D:/work/mcuClientBranch/McuClient20170228/src/pdus/index.js"),__REACT_HOT_LOADER__.register(i,"create_pdu","D:/work/mcuClientBranch/McuClient20170228/src/pdus/index.js"),__REACT_HOT_LOADER__.register(E,"default","D:/work/mcuClientBranch/McuClient20170228/src/pdus/index.js"))})()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(6),l=r(u),f=n(8),d=r(f),c=n(17),h=r(c),p=n(1),_=r(p),E=n(2),g=r(E),y=n(3),R=r(y),m=n(12),C=r(m),T=n(13),v=r(T),S=n(5),A=r(S),I=_.default.getLoger("Ape"),b=function(e){function t(e,n,r){i(this,t);var s=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return s._session_id=e,s._channel_id=e,s._session_name=n,s._session_tag=r,s._session_channels={},s._adapter_pdu=new l.default.RCAdapterPdu,s._classInfo=null,s._rCArrayBufferUtil=C.default,s._apeDelayed=!1,s._apeDelayedMsgs=[],s._apeDelayedTimer=0,s.on(l.default.RCPDU_SESSION_JOIN_RESPONSE,s._joinSessionHandler.bind(s)),s.on(l.default.RCPDU_CHANNEL_JOIN_RESPONSE,s._joinChannelHandler.bind(s)),s.on(l.default.RCPDU_REG_ADAPTER,s._pduMessageHandler.bind(s)),s.mcu=h.default,s.mcu.on(g.default.CLASS_JOIN_SUCCESS,s._mcuConferenceJoinSuccessHandler.bind(s)),s.mcu.registerApe(s),s}return s(t,e),a(t,[{key:"regResponsePduHandler",value:function(){}},{key:"_pduMessageHandler",value:function(e){var t=this;return this._apeDelayed?void setTimeout(function(){t._pduRegAdapterHandler(e)},A.default.mcuDelay):void this._pduRegAdapterHandler(e)}},{key:"_pduRegAdapterHandler",value:function(e){var t=l.default.RCAdapterPdu.decode(e),n=t.item,r=n.length;I.log(this._session_name+"数据同步消息.同步条数",r);for(var i=0;i<r;++i){var o=n[i],s=o.type,a=o.itemData;if(l.default.RCPDU_REG_UPDATE_OBJ===s){var u=l.default.RCRegistryUpdateObjPdu.decode(a),f=u.subType,d=u.objId,c=u.userData;switch(I.log("REG OBJECT EVENT ->",l.default.id2type(f)),f){case l.default.RCPDU_REG_ROSTER_INSERT_PDU:for(var h=l.default.RCRegstryRosterInsertItemPdu.decode(c),p=h.items,_=p.length,E=0;E<_;++E){var g=p[E],y=g.item_id,R=l.default.RCNodeInfoRecordPdu.decode(g.item_data);this.rosterInsertHandler(y,R)}break;case l.default.RCPDU_REG_ROSTER_DELETE_PDU:var m=l.default.RCRegistryRosterDeleteItemPdu.decode(c);this.rosterDelHandler(m.nodeId);break;case l.default.RCPDU_REG_ROSTER_UPDATE_PDU:for(var C=l.default.RCRegistryRosterUpdateItemPdu.decode(c),T=C.items,v=T.length,S=0;S<v;++S){var A=T[S],b=A.nodeId,D=l.default.RCNodeInfoRecordPdu.decode(A.nodeData);this.rosterUpdateHandler(b,D)}break;case l.default.RCPDU_REG_TABLE_INSERT_PDU:for(var N=l.default.RCRegistryTableInsertItemPdu.decode(c),P=N.items,O=P.length,w=0;w<O;++w){var U=P[w];this.tableInsertHandler(U.owner,U.itemIdx,U.itemData)}break;case l.default.RCPDU_REG_TABLE_DELETE_PDU:var L=l.default.RCRegistryTableDeleteItemPdu.decode(c);this.tableDeleteHandler(d,L);break;case l.default.RCPDU_REG_TABLE_UPDATE_PDU:var k=l.default.RCRegistryTableUpdateItemPdu.decode(c),x=k.items,M=x.length;I.log("RCRegistryTableUpdateItemPdu "+M),console.log(k);for(var B=0;B<M;++B){var F=x[B];this.tableUpdateHandler(F.owner,F.itemIdx,F.itemData)}break;case l.default.RCPDU_REG_QUEUE_UPDATE_PDU:case l.default.RCPDU_REG_QUEUE_DELETE_PDU:case l.default.RCPDU_REG_QUEUE_INSERT_PDU:I.warn("REG QUEUE ARE IGNORED")}}else if(l.default.RCPDU_REG_RESPONSE_OBJ==s){var H=l.default.RCRegistryResponseObjPdu.decode(a);this.regResponsePduHandler(H)}}}},{key:"rosterInsertHandler",value:function(e,t){I.warn(this._session_name+" rosterInsertHandler 应有子类具体覆盖处理.")}},{key:"rosterUpdateHandler",value:function(e,t){I.warn(this._session_name+" rosterUpdateHandler 应有子类具体覆盖处理.")}},{key:"rosterDelHandler",value:function(e){I.warn(this._session_name+" rosterDelHandler 应有子类具体覆盖处理.")}},{key:"tableInsertHandler",value:function(e,t){I.warn(this._session_name+" tableInsertHandler 应有子类具体覆盖处理.")}},{key:"tableUpdateHandler",value:function(e,t,n){I.warn(this._session_name+" tableUpdateHandler 应有子类具体覆盖处理.")}},{key:"tableDeleteHandler",value:function(e,t){I.warn(this._session_name+" tableDelHandler 应有子类具体覆盖处理.")}},{key:"onJoinChannelHandlerSuccess",value:function(){I.warn(this._session_name+" onJoinChannelHandlerSuccess 应有子类具体覆盖处理.")}},{key:"onJoinSessionHandlerSuccess",value:function(){I.warn(this._session_name+" onJoinSessionHandlerSuccess 应有子类具体覆盖处理.")}},{key:"_joinSessionHandler",value:function(e){I.log(this._session_name," -> 加入Session"),this.onJoinSessionHandlerSuccess()}},{key:"_joinChannelHandler",value:function(e){var t=l.default.RCChannelJoinResponsePdu.decode(e);t.result===l.default.RET_SUCCESS?(I.log(this._session_name," -> 加入Channel成功. ChannelId",t.requestedChannelId),this._session_channels[t.requestedChannelId]=R.default.CJS_JOINNED,this.onJoinChannelHandlerSuccess()):I.log(this._session_name," -> 加入Channel失败.",t)}},{key:"_mcuConferenceJoinSuccessHandler",value:function(e){I.log("创建Ape->","SessionId",this._session_id,"SessionName",this._session_name,"SessionTag",this._session_tag),this._classInfo=A.default.getClassInfo();var t=new l.default.RCSessionJoinRequestPdu;t.id=this._session_id,t.name=this._session_name,t.tag=this._session_tag,t.sessionData=this._adapter_pdu.toArrayBuffer(),this.sendUniform(t,!0);var n=new l.default.RCChannelJoinRequestPdu;n.initiator=this.mcu.classInfo.nodeId,n.channelId=this._session_id,this.send(n)}},{key:"registerKey",value:function(e,t,n,r){var i=new l.default.RCAdapterItemPdu;i.type=l.default.RCPDU_REG_REGISTER_KEY;var o=new l.default.RCRegistryRegisterKeyPdu;o.id=e,o.name=t,o.tag=n,r.length&&(o.userData=r),i.itemData=o.toArrayBuffer(),this._adapter_pdu.item.push(i)}},{key:"registerObj",value:function(e,t,n,r,i,o){var s=new l.default.RCAdapterItemPdu;s.type=l.default.RCPDU_REG_REGISTER_OBJ;var a=new l.default.RCRegistryRegisterObjPdu;a.type=e,a.objId=t,a.name=n,a.tag=r,i&&(a.owner=i),o.length&&(a.userData=o),s.itemData=a.toArrayBuffer(),this._adapter_pdu.item.push(s)}},{key:"send",value:function(e){if(I.log("Ape发送数据NORMAL PDU"),console.log(e),0==A.default.getCurrentStatus().code||1==A.default.getCurrentStatus().code)return void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_SEND_FAILED_NO_JOIN);var t=l.default.create_normal_pdu(e.type,this._classInfo.nodeId,this._classInfo.classId,this._session_id,this._channel_id,!0,!0,v.default.DP_TOP,this._classInfo.topNodeID,v.default.SEG_ONCE);t.data=e.toArrayBuffer(),this.mcu.send(t)}},{key:"sendUniform",value:function(e,t){if(I.log("Ape发送数据UNIFORM PDU"),console.log(e),0==A.default.getCurrentStatus().code||1==A.default.getCurrentStatus().code)return void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_SEND_FAILED_NO_JOIN);var n=l.default.create_uniform_pdu(e.type,this._classInfo.nodeId,this._classInfo.classId,this._session_id,t?R.default.BROADCAST_CHANNEL_ID:this._channel_id,!0,v.default.DP_TOP,t?this._classInfo.topNodeID:e.peer||0,v.default.SEG_ONCE);n.data=e.toArrayBuffer(),this.mcu.send(n)}},{key:"sendChatUniform",value:function(e,t){if(I.log("Ape发送数据UNIFORM PDU"),console.log(e),0==A.default.getCurrentStatus().code||1==A.default.getCurrentStatus().code)return void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_SEND_FAILED_NO_JOIN);var n=l.default.create_uniform_pdu(e.type,this._classInfo.nodeId,this._classInfo.classId,this._session_id,t?R.default.BROADCAST_CHANNEL_ID:this._channel_id,!0,v.default.DP_TOP,0,v.default.SEG_ONCE);n.data=e.toArrayBuffer(),this.mcu.send(n)}}]),t}(d.default),D=b;t.default=D;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(I,"loger","D:/work/mcuClientBranch/McuClient20170228/src/apes/Ape.js"),__REACT_HOT_LOADER__.register(b,"Ape","D:/work/mcuClientBranch/McuClient20170228/src/apes/Ape.js"),__REACT_HOT_LOADER__.register(D,"default","D:/work/mcuClientBranch/McuClient20170228/src/apes/Ape.js"))})()},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){n(this,e),this.MAPS={}}return r(e,[{key:"on",value:function(e,t){if(e&&t){var n=this.MAPS[e];if(!n)return this.MAPS[e]=[t];n.push(t)}}},{key:"off",value:function(e,t){if(e){var n=this.MAPS[e];if(n){if(t)return n.splice(n.indexOf(t),1);n.length=0}}}},{key:"_emit",value:function(e,t){if(e){var n=this.MAPS["*"];n&&n.length&&n.forEach(function(n){n(e,t)});var r=this.MAPS[e];r&&r.length&&r.forEach(function(e){e(t)})}}}]),e}(),o=i;t.default=o;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(i,"Emiter","D:/work/mcuClientBranch/McuClient20170228/src/Emiter.js"),__REACT_HOT_LOADER__.register(o,"default","D:/work/mcuClientBranch/McuClient20170228/src/Emiter.js"))})()},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){(function(e){e.require&&(n(25),n(45));var t={isNotUTF8:function(e,n,r){try{t.getStringFromBytes(e,n,r,!0)}catch(e){return!0}return!1},getCharLength:function(e){return 240==(240&e)?4:224==(224&e)?3:192==(192&e)?2:e==(127&e)?1:0},getCharCode:function(e,n,r){var i=0,o="";if(n=n||0,r=r||t.getCharLength(e[n]),0==r)throw new Error(e[n].toString(2)+" is not a significative byte (offset:"+n+").");if(1===r)return e[n];if(o="00000000".slice(0,r)+1+"00000000".slice(r+1),e[n]&parseInt(o,2))throw Error("Index "+n+": A "+r+" bytes encoded char cannot encode the "+(r+1)+"th rank bit to 1.");for(o="0000".slice(0,r+1)+"11111111".slice(r+1),
i+=(e[n]&parseInt(o,2))<<6*--r;r;){if(128!==(128&e[n+1])||64===(64&e[n+1]))throw Error("Index "+(n+1)+': Next bytes of encoded char must begin with a "10" bit sequence.');i+=(63&e[++n])<<6*--r}return i},getStringFromBytes:function(e,n,r,i){var o,s=[];for(n|=0,r="number"==typeof r?r:e.byteLength||e.length;n<r;n++){if(o=t.getCharLength(e[n]),n+o>r){if(i)throw Error("Index "+n+": Found a "+o+" bytes encoded char declaration but only "+(r-n)+" bytes are available.")}else s.push(String.fromCodePoint(t.getCharCode(e,n,o,i)));n+=o-1}return s.join("")},getBytesForCharCode:function(e){if(e<128)return 1;if(e<2048)return 2;if(e<65536)return 3;if(e<2097152)return 4;throw new Error("CharCode "+e+" cannot be encoded with UTF8.")},setBytesFromCharCode:function(e,n,r,i){if(e|=0,n=n||[],r|=0,i=i||t.getBytesForCharCode(e),1==i)n[r]=e;else for(n[r++]=(parseInt("1111".slice(0,i),2)<<8-i)+(e>>>6*--i);i>0;)n[r++]=e>>>6*--i&63|128;return n},setBytesFromString:function(e,n,r,i,o){e=e||"",n=n||[],r|=0,i="number"==typeof i?i:n.byteLength||1/0;for(var s=0,a=e.length;s<a;s++){var u=t.getBytesForCharCode(e[s].codePointAt(0));if(o&&r+u>i)throw new Error('Not enought bytes to encode the char "'+e[s]+'" at the offset "'+r+'".');t.setBytesFromCharCode(e[s].codePointAt(0),n,r,u,o),r+=u}return n}};e.exports=t}).call(t,n(9)(e))},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){n(this,e)}return r(e,null,[{key:"ab2str",value:function(e){return String.fromCharCode.apply(null,new Uint16Array(e))}},{key:"str2ab",value:function(e){for(var t=new ArrayBuffer(2*e.length),n=new Uint16Array(t),r=0,i=e.length;r<i;r++)n[r]=e.charCodeAt(r);return t}},{key:"strToUint8Array",value:function(e){var t=void 0,n=void 0,r=void 0,i=void 0;t="",r=e.length;var o=[];for(n=0;n<r;n++)i=e.charCodeAt(n),i>=1&&i<=127?o.push(i):i>2047?(o.push(224|i>>12&15),o.push(128|i>>6&63),o.push(128|i>>0&63)):(o.push(192|i>>6&31),o.push(128|i>>0&63));return new Uint8Array(o)}},{key:"uint8ArrayToStr",value:function(e,t){var n=void 0,r=void 0,i=void 0,o=void 0,s=void 0,a=void 0;for(n="",i=e.buffer.byteLength,r=e.offset+t;r<e.limit;)switch(o=e.view[r++],o>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n+=String.fromCharCode(e.view[r-1]);break;case 12:case 13:s=e.view[r++],n+=String.fromCharCode((31&o)<<6|63&s);break;case 14:s=e.view[r++],a=e.view[r++],n+=String.fromCharCode((15&o)<<12|(63&s)<<6|(63&a)<<0)}return n}}]),e}(),o=i;t.default=o;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(i,"ArrayBufferUtil","D:/work/mcuClientBranch/McuClient20170228/src/libs/ArrayBufferUtil.js"),__REACT_HOT_LOADER__.register(o,"default","D:/work/mcuClientBranch/McuClient20170228/src/libs/ArrayBufferUtil.js"))})()},function(e,t){"use strict";function n(){}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.NT_TERMINAL=0,n.NT_MULTIPORT_TERMINAL=1,n.NT_MCU=2,n.DP_TOP=0,n.DP_HIGH=1,n.DP_MEDIUM=2,n.DP_LOW=3,n.SEG_BEGIN=0,n.SEG_END=1,n.SEG_ONCE=2,n.RET_SUCCESS=0,n.RET_USER_REJECTED=1,n.RET_INVALID_CONFERENCE=2,n.RET_INVALID_PASSWORD=3,n.RET_INVALID_CONVENER_PASSWORD=4,n.RET_CHALLENGE_RESPONSE_REQUIRED=5,n.RET_INVALID_CHALLENGE_RESPONSE=6,n.RET_NO_CONNECTION=7,n.RET_FULL_CAPACITY=8;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(n,"PduConsts","D:/work/mcuClientBranch/McuClient20170228/src/pdus/PduConsts.js")})()},function(e,t){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function r(e){return 3*e.length/4-n(e)}function i(e){var t,r,i,o,s,a,u=e.length;s=n(e),a=new f(3*u/4-s),i=s>0?u-4:u;var d=0;for(t=0,r=0;t<i;t+=4,r+=3)o=l[e.charCodeAt(t)]<<18|l[e.charCodeAt(t+1)]<<12|l[e.charCodeAt(t+2)]<<6|l[e.charCodeAt(t+3)],a[d++]=o>>16&255,a[d++]=o>>8&255,a[d++]=255&o;return 2===s?(o=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,a[d++]=255&o):1===s&&(o=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,a[d++]=o>>8&255,a[d++]=255&o),a}function o(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function s(e,t,n){for(var r,i=[],s=t;s<n;s+=3)r=(e[s]<<16)+(e[s+1]<<8)+e[s+2],i.push(o(r));return i.join("")}function a(e){for(var t,n=e.length,r=n%3,i="",o=[],a=16383,l=0,f=n-r;l<f;l+=a)o.push(s(e,l,l+a>f?f:l+a));return 1===r?(t=e[n-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),o.push(i),o.join("")}t.byteLength=r,t.toByteArray=i,t.fromByteArray=a;for(var u=[],l=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,h=d.length;c<h;++c)u[c]=d[c],l[d.charCodeAt(c)]=c;l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(7),l=r(u),f=n(3),d=r(f),c=n(2),h=r(c),p=n(6),_=r(p),E=(n(26),n(11)),g=(r(E),n(1)),y=r(g),R=n(5),m=r(R),C=n(4),T=r(C),v=n(31),S=r(v),A=y.default.getLoger("ConferApe"),I=0,b=function(e){function t(){i(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,d.default.CONFERENCE_SESSION_ID,d.default.CONFERENCE_SESSION_NAME,d.default.CONFERENCE_SESSION_TAG));return e.hostNodeId=-1,e.hostUserId="",e.rosters={},e.timerCounter=new S.default,e.registerKey(e._session_id,e._session_name,e._session_tag,new ArrayBuffer),e.registerObj(_.default.RCPDU_REG_REGISTER_ROSTER,d.default.CONFERENCE_OBJ_ROSTER_ID,d.default.CONFERENCE_OBJ_ROSTER_NAME,d.default.CONFERENCE_OBJ_ROSTER_TAG,0,new ArrayBuffer),e.registerObj(_.default.RCPDU_REG_REGISTER_QUEUE,d.default.CONFERENCE_OBJ_QUEUE_ID,d.default.CONFERENCE_OBJ_QUEUE_NAME,d.default.CONFERENCE_OBJ_QUEUE_TAG,0,new ArrayBuffer),e.registerObj(_.default.RCPDU_REG_REGISTER_TABLE,d.default.CONFERENCE_OBJ_TABLE_ID,d.default.CONFERENCE_OBJ_TABLE_NAME,d.default.CONFERENCE_OBJ_TABLE_TAG,0,new ArrayBuffer),e.registerObj(_.default.RCPDU_REG_REGISTER_COUNTER,d.default.CONFERENCE_OBJ_COUNTER_ID,d.default.CONFERENCE_OBJ_COUNTER_NAME,d.default.CONFERENCE_OBJ_COUNTER_TAG,0,new ArrayBuffer),e.on(_.default.RCPDU_SESSION_JOIN_RESPONSE,e._joinSessionHandler.bind(e)),e.on(_.default.RCPDU_SEND_CONFERENCE_DATA_REQUEST,e.conferMsgComingHandler.bind(e)),e.on(_.default.RCPDU_CONFERENCE_RECORD_REQUEST,e.onSendConferRecordRequestHandler.bind(e)),e}return s(t,e),a(t,[{key:"_joinSessionHandler",value:function(e){var t=this.mcu.mcuClassInfo.self;A.log("_joinSessionHandler nodeInfoRecordPdu="),console.log(t);var n=new _.default.RCNodeInfoUserDataPdu;n.qq="",n.skype="",t.userData=n.toArrayBuffer(),t.deviceType=m.default.deviceType;var r=new _.default.RCRegistryRosterItemPdu;r.nodeId=t.nodeId,r.nodeData=t.toArrayBuffer();var i=new _.default.RCRegistryRosterUpdateItemPdu;i.type=_.default.RCPDU_REG_ROSTER_UPDATE_PDU,i.items.push(r);var o=new _.default.RCRegistryUpdateObjPdu;o.objId=d.default.CONFERENCE_OBJ_ROSTER_ID,o.subType=i.type,o.userData=i.toArrayBuffer();var s=new _.default.RCAdapterItemPdu;s.type=_.default.RCPDU_REG_UPDATE_OBJ,s.itemData=o.toArrayBuffer();var a=new _.default.RCAdapterPdu;a.type=_.default.RCPDU_REG_ADAPTER,a.item.push(s),this.sendUniform(a,!0)}},{key:"sendConferMsg",value:function(e){if(null==this._classInfo||T.default.isEmptyObject(this._classInfo)){if(A.log("不能发送会议消息.McuClient还未初始化数据!"),0==m.default.getCurrentStatus().code||1==m.default.getCurrentStatus().code)return void this._emit(h.default.MCU_ERROR,h.default.ERR_APE_SEND_FAILED_NO_JOIN)}else{A.log("发送会议消息.",e);var t=new _.default.RCConferenceSendDataRequestPdu;t.type=_.default.RCPDU_SEND_CONFERENCE_DATA_REQUEST,t.initiator=this._classInfo.nodeId,t.peer=parseInt(e.to),t.userData=this._rCArrayBufferUtil.strToUint8Array("h5"+e.message),t.isPublic=!0,t.actionType=e.actionType,t.isPublic||0==t.peer?(A.log("发送公聊会议消息."),this.sendChatUniform(t)):(A.log("发送私聊会议消息."),this.send(t))}}},{key:"sendConferRecordMsg",value:function(e){if(!this.mcu.connected)return A.warn(m.default.getCurrentStatus()),{code:d.default.RETURN_FAILED,data:"已经断开连接"};if(A.log("发送录制消息.",e),null==e)return void A.warn("控制录制状的消息发送失败,参数错误",e);m.default.recordStatus=e.recordStatus||!1;var t=new _.default.RCConferenceRecordRequestPdu;t.type=_.default.RCPDU_CONFERENCE_RECORD_REQUEST,t.peer=0,t.isPublic=!0,t.initiator=this._classInfo.nodeId,t.record=m.default.recordStatus,t.classTime=m.default.classTimestamp,t.filename=m.default.recordFileName||m.default.classId+"_"+T.default.creatTimestampYMD()+".rec",this.sendChatUniform(t)}},{key:"startRecord",value:function(){A.log("startRecord","isHost",m.default.isHost,"recordStatus",m.default.recordStatus),m.default.isHost&&(m.default.classStopTime=T.default.creatTimestampStr(),this.sendConferRecordMsg({recordStatus:!0}),this._emit(h.default.CLASS_STATUS_INFO_CHANGE),this._emit(h.default.CLASS_RECORD_START))}},{key:"stopRecord",value:function(){A.log("stopRecord","isHost",m.default.isHost,"recordStatus",m.default.recordStatus),m.default.isHost&&m.default.recordStatus&&(m.default.classStopTime=T.default.creatTimestampStr(),this.sendConferRecordMsg({recordStatus:!1}),this._emit(h.default.CLASS_STATUS_INFO_CHANGE))}},{key:"leaveClass",value:function(){var e=this.mcu.mcuClassInfo.self,t=new _.default.RCNodeInfoUserDataPdu;t.qq="",t.skype="",e.userData=t.toArrayBuffer(),e.deviceType=m.default.deviceType;var n=new _.default.RCRegistryRosterItemPdu;n.nodeId=e.nodeId,n.nodeData=e.toArrayBuffer();var r=new _.default.RCRegistryRosterDeleteItemPdu;r.type=_.default.RCPDU_REG_ROSTER_DELETE_PDU,r.nodeId=m.default.nodeId;var i=new _.default.RCRegistryUpdateObjPdu;i.objId=d.default.CONFERENCE_OBJ_ROSTER_ID,i.subType=r.type,i.userData=r.toArrayBuffer();var o=new _.default.RCAdapterItemPdu;o.type=_.default.RCPDU_REG_UPDATE_OBJ,o.itemData=i.toArrayBuffer();var s=new _.default.RCAdapterPdu;s.type=_.default.RCPDU_REG_ADAPTER,s.item.push(o),this.sendUniform(s,!0)}},{key:"restorClass",value:function(){m.default.classTimestamp=0,m.default.classStatus=d.default.CLASS_STATUS_WAIT,m.default.classStopTime=T.default.creatTimestampStr(),this.stopRecord(),this._emit(h.default.CLASS_STATUS_INFO_CHANGE),this.sendUpdaterClassStatusInfo({actionType:0}),A.log("restorClass")}},{key:"startClass",value:function(e){if(m.default.isHost){var t=T.default.creatTimestampStr();m.default.classStopTime=t;var n=T.default.creatTimestampYMD();m.default.recordFileName=m.default.recordFileName||m.default.siteId+"/"+n+"/"+m.default.classId+"_"+n+".rec",m.default.classStatus==d.default.CLASS_STATUS_WAIT&&(m.default.classStartTime=t),m.default.classStatus=d.default.CLASS_STATUS_STARTED,this.startRecord(),this._emit(h.default.CLASS_STATUS_INFO_CHANGE),this.sendUpdaterClassStatusInfo({actionType:1}),this.startTimerCounter()}else A.warn("没有权限")}},{key:"pauseClass",value:function(e){return m.default.classStatus==d.default.CLASS_STATUS_WAIT?void A.warn("还没有开始,不能点暂停"):(m.default.classStatus=d.default.CLASS_STATUS_PAUSE,m.default.classStopTime=T.default.creatTimestampStr(),this.stopRecord(),this._emit(h.default.CLASS_STATUS_INFO_CHANGE),this.sendUpdaterClassStatusInfo({actionType:2}),void this.stopTimerCounter())}},{key:"closeClass",value:function(e){return m.default.classStatus==d.default.CLASS_STATUS_WAIT?void A.warn("还没有开始,不能点关闭"):(this.stopTimerCounter(),this.restorClass(),void this.sendConferMsg({to:0,message:"所有人退出会议",actionType:d.default.CLASS_ACTION_CLOSE_ALL}))}},{key:"sendUpdaterClassStatusInfo",value:function(e){if(A.log("sendUpdaterClassStatusInfo"),null==e||T.default.isEmptyObject(e))return A.log("sendUpdaterClassStatusInfo,参数错误"),void this._emit(h.default.MCU_ERROR,h.default.ERR_APE_INTERFACE_PARAM_WRONG);I=d.default.CONFERENCE_OBJ_TABLE_ID;var t=this.packPdu(e,I);if(console.log(t),null==t)return A.log("sendUpdaterClassStatusInfo,参数错误"),void this._emit(h.default.MCU_ERROR,h.default.ERR_APE_INTERFACE_PARAM_WRONG);var n=new _.default.RCRegistryTableItemPdu;n.itemIdx=I,n.owner=0,n.registerObjId=d.default.CONFERENCE_OBJ_TABLE_ID,n.itemData=t.toArrayBuffer();var r=new _.default.RCRegistryTableUpdateItemPdu;r.type=_.default.RCPDU_REG_TABLE_UPDATE_PDU,r.items.push(n);var i=new _.default.RCRegistryUpdateObjPdu;i.objId=d.default.CONFERENCE_OBJ_TABLE_ID,i.subType=r.type,i.userData=r.toArrayBuffer();var o=new _.default.RCAdapterItemPdu;o.type=_.default.RCPDU_REG_UPDATE_OBJ,o.itemData=i.toArrayBuffer();var s=new _.default.RCAdapterPdu;s.type=_.default.RCPDU_REG_ADAPTER,s.item.push(o),console.log("会议发送更新数据============"),this.sendUniform(s,!0)}},{key:"onJoinChannelHandlerSuccess",value:function(){A.log("ConferApe.onJoinChannelHandlerSuccess",m.default.classStatus),this.timerCounter.addTimerCallBack(this.timerCounterUptate.bind(this),1),m.default.classStatus==d.default.CLASS_STATUS_STARTED&&(this.startTimerCounter(),this.startRecord())}},{key:"startTimerCounter",value:function(){this.timerCounter.startTimer()}},{key:"stopTimerCounter",value:function(){this.timerCounter.stopTimer()}},{key:"timerCounterUptate",value:function(){return this.mcu.connected||(A.warn("MCU 连接已经断开"),this.stopTimerCounter()),m.default.classStatus!=d.default.CLASS_STATUS_STARTED?void A.warn("当前课堂已经暂停或者未开始,不计时","classStatus-->",m.default.classStatus):(m.default.classTimestamp=m.default.classTimestamp+1,this._emit(h.default.CLASS_UPDATE_TIMER,{classTimestamp:m.default.classTimestamp}),void(m.default.classTimestamp%m.default.updateClassInfoDelay==0&&m.default.isHost&&(this._emit(h.default.CLASS_STATUS_INFO_CHANGE),this.sendUpdaterClassStatusInfo({actionType:1}))))}},{key:"tableUpdateHandler",value:function(e,t,n){try{var r=this.unPackPdu(e,t,n);if(A.log("tableUpdateHandler"),console.log(r),r&&r.classStatusInfo&&m.default.setClassStatusInfo(r.classStatusInfo),this._emit(h.default.CLASS_UPTATE_STATUS,m.default.classStatusInfo),!this.mcu.connected)return void this.stopTimerCounter();m.default.classStatus==d.default.CLASS_STATUS_STARTED?this.startTimerCounter():this.stopTimerCounter()}catch(e){A.warn("ConferApe table update got exception.   itemIdx",t)}}},{key:"conferMsgComingHandler",value:function(e){var t=_.default.RCConferenceSendDataRequestPdu.decode(e),n={};switch(n.fromNodeID=t.initiator,n.toNodeID=t.peer,n.message=this._rCArrayBufferUtil.uint8ArrayToStr(t.userData,2),n.actionType=t.actionType,A.log("conferMsgComingHandler",n),n.actionType){case d.default.CLASS_ACTION_CLOSE_ALL:A.log(n.message),this._emit(h.default.CLASS_EXIT)}}},{key:"onSendConferRecordRequestHandler",value:function(e){A.log("onSendConferRecordRequestHandler");try{var t=_.default.RCConferenceRecordRequestPdu.decode(e);console.log(t)}catch(e){A.warn("onSendConferRecordRequestHandler err",e.message)}}},{key:"rosterInsertHandler",value:function(e,t){m.default.nodeId==e?A.log("自己加入 rosterInsertHandler"):(A.log("有人加入 rosterInsertHandler"),this.rosterUpdateHandler(e,t))}},{key:"rosterUpdateHandler",value:function(e,t){t.role!==d.default.NR_HOST&&t.role!==d.default.NR_PRESENTER||(this.hostNodeId=t.nodeId,this.hostUserId=t.userId),t.role===d.default.NR_NORMAL&&this.hostNodeId===t.nodeId&&(this.hostNodeId=-1,this.hostUserId="");var n=this.rosters[e];this.rosters[e]=t;var r=null;if(!n){try{r=_.default.RCNodeInfoUserDataPdu.decode(t.userData)}catch(e){A.log("RCNodeInfoUserDataPdu decode err",e.message)}var i=t;i.userData=r,A.log("更新人员列表数据 rosterUpdateHandler",{nodeId:e}),this._emit(h.default.CLASS_INSERT_ROSTER,{nodeId:e,nodeData:i}),this.emitRosterChange()}}},{key:"updaterRosterStatus",value:function(e){e&&(A.log("媒体模块发生更新,人员状态需要更新,fromNodeId->",e.fromNodeId),A.log(e.status,e.fromNodeId),e.status==d.default.CHANNEL_STATUS_OPENING&&null==this.rosters[e.fromNodeId]&&(A.log("媒体模块被占用,占有人已经不存在课堂中,释放Channel,_param->",e),this._emit(h.default.CLASS_NONENTITY_ROSTER,{nodeId:e.fromNodeId})))}},{key:"rosterDelHandler",value:function(e){m.default.nodeId==e?(A.log("自己离开 rosterDelHandler"),this._emit(h.default.CLASS_EXIT)):(A.log("有人离开 rosterDelHandler"),delete this.rosters[e],this._emit(h.default.CLASS_DELETE_ROSTER,{nodeId:e}),this.emitRosterChange())}},{key:"emitRosterChange",value:function(){this._emit(h.default.CLASS_SHOW_ROSTER_NUM,Object.keys(this.rosters).length)}},{key:"packPdu",value:function(e,t){if(A.log("会议===packPdu "),null==e||null==t)return this._emit(h.default.MCU_ERROR,h.default.ERR_APE_INTERFACE_PARAM_WRONG),null;var n=new _.default.RCClassStatusInfoPdu;n.nodeId=m.default.nodeId,n.userId=m.default.userId,n.userName=m.default.userName,n.siteId=m.default.siteId,n.classId=m.default.classId,n.className=m.default.className,n.classType=m.default.classType,n.classStatus=m.default.classStatus,n.classStartTime=m.default.classStartTime,n.classStopTime=m.default.classStopTime,n.classTimestamp=m.default.classTimestamp,n.classBeginTime=m.default.classBeginTime,n.classEndTime=m.default.classEndTime,n.recordStatus=m.default.recordStatus,n.recordTimestamp=m.default.recordTimestamp,n.recordFileName=m.default.recordFileName,n.recordDownloadUrl=m.default.recordDownloadUrl,n.serverTimestamp=m.default.serverTimestamp,n.activeDocId=m.default.activeDocId,n.activeDocCurPage=m.default.activeDocCurPage,A.log("classStatusInfo-------------",n);var r=new _.default.RCClassSendDataModelPdu;return r.itemIdx=t,r.from=m.default.nodeId,r.owner=m.default.nodeId,r.classStatusInfo=n,r}},{key:"unPackPdu",value:function(e,t,n){if(A.log("会议===unPackPdu "),null==e||null==t||null==n)return this._emit(h.default.MCU_ERROR,h.default.ERR_APE_INTERFACE_PARAM_WRONG),null;try{var r=_.default.RCClassSendDataModelPdu.decode(n);return r}catch(e){A.log("会议收到数据 unPackPdu Pdu解析错误,itemIdx="+t+"  err:"+e.message)}return null}}]),t}(l.default),D=b;t.default=D;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(A,"loger","D:/work/mcuClientBranch/McuClient20170228/src/apes/ConferApe.js"),__REACT_HOT_LOADER__.register(I,"itemIdx","D:/work/mcuClientBranch/McuClient20170228/src/apes/ConferApe.js"),__REACT_HOT_LOADER__.register(b,"ConferApe","D:/work/mcuClientBranch/McuClient20170228/src/apes/ConferApe.js"),__REACT_HOT_LOADER__.register(D,"default","D:/work/mcuClientBranch/McuClient20170228/src/apes/ConferApe.js"))})()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(3),a=r(s),u=n(1),l=r(u),f=n(2),d=(r(f),n(5)),c=r(d),h=n(4),p=r(h),_=l.default.getLoger("MediaModule"),E=function(){function e(){i(this,e),this.mediaChannels={},this.maxMediaChannel=0,this.MEDIA_OBJ_TABLE_ID=0}return o(e,[{key:"getMediaPlayPath",value:function(e){if(_.log("getMediaPlayPath"),null==e||null==e.siteId||null==e.classId||null==e.userId||null==e.channelId||null==e.timestamp)return _.warn("getMediaPlayPath,参数错误",e),{code:a.default.RETURN_FAILED,data:""};var t="",n="";return"m3u8"==e.type?(n=""==c.default.RSServerPort||null==c.default.RSServerPort?"":":"+c.default.RSServerPort,t="http://"+c.default.RSServerIP+n+"/live/"+e.siteId+"_"+e.classId+"_"+e.userId+"_"+e.channelId+"_"+e.timestamp+"/index.m3u8"):(n=""==c.default.MSServerPort||null==c.default.MSServerPort?"":":"+c.default.MSServerPort,t="rtmp://"+c.default.MSServerIP+n+"/live/"+e.siteId+"_"+e.classId+"_"+e.userId+"_"+e.channelId+"_"+e.timestamp),{code:a.default.RETURN_SUCCESS,data:"",playUrl:t}}},{key:"getMediaPublishPath",value:function(e){_.log("getMediaPublishPath");var t=this.getFreeMediaChannel();if(0==t)return{code:a.default.RETURN_FAILED,data:"不能再打开更多的设备"};var n="live";e&&"flash"==e.type&&(n="flash");var r=""==c.default.MSServerPort||null==c.default.MSServerPort?"":":"+c.default.MSServerPort,i=p.default.creatTimestamp(),o="rtmp://"+c.default.MSServerIP+r+"/"+n+"/"+c.default.siteId+"_"+c.default.classId+"_"+c.default.userId+"_"+t+"_"+i;return{code:a.default.RETURN_SUCCESS,data:"",siteId:c.default.siteId,classId:c.default.classId,userId:c.default.userId,channelId:t,timestamp:i,publishUrl:o}}},{key:"getFreeMediaChannel",value:function(){var e=0;for(var t in this.mediaChannels){var n=this.mediaChannels[t];if(n&&n.status==a.default.CHANNEL_STATUS_RELEASED)return n.channelId;e++}return _.log("getFreeMediaChannel","maxMediaChannel",this.maxMediaChannel,"counter:",e),console.log(this.mediaChannels),e<this.maxMediaChannel?this.MEDIA_OBJ_TABLE_ID+e:0}},{key:"getOpeningMediaChannel",value:function(e){if(null==e||0==e)return 0;for(var t in this.mediaChannels){var n=this.mediaChannels[t];if(n&&n.status==a.default.CHANNEL_STATUS_OPENING&&n.fromNodeId==e)return n.channelId}return 0}},{key:"checkChannelIsOpening",value:function(e){if(null==e)return _.warn("checkChannelIsOpening error,channel=",e),!0;var t=this.mediaChannels[e];return null!=t&&t.status!=a.default.CHANNEL_STATUS_RELEASED}}]),e}(),g=E;t.default=g;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(_,"loger","D:/work/mcuClientBranch/McuClient20170228/src/apes/MediaModule.js"),__REACT_HOT_LOADER__.register(E,"MediaModule","D:/work/mcuClientBranch/McuClient20170228/src/apes/MediaModule.js"),__REACT_HOT_LOADER__.register(g,"default","D:/work/mcuClientBranch/McuClient20170228/src/apes/MediaModule.js"))})()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(8),l=r(u),f=n(2),d=r(f),c=n(1),h=r(c),p=n(37),_=r(p),E=n(6),g=r(E),y=n(18),R=r(y),m=n(13),C=r(m),T=n(3),v=r(T),S=n(15),A=(r(S),n(12)),I=r(A),b=n(14),D=r(b),N=n(5),P=r(N),O=n(4),w=r(O),U=h.default.getLoger("MCU"),L=function(e){function t(){i(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e._apes={},e._everSocket=_.default,e._everSocket.on(_.default.OPEN,e._everSocketOpenHandler.bind(e)),e._everSocket.on(_.default.MESSAGE,e._everSocketMsgReceivedHandler.bind(e)),e._everSocket.on(_.default.CLOSED,e._everSocketCloseHandler.bind(e)),e}return s(t,e),a(t,[{key:"registerApe",value:function(e){this._apes[e._session_id]=e}},{key:"_everSocketOpenHandler",value:function(){this._sendJoinClassRequest()}},{key:"_everSocketCloseHandler",value:function(){P.default.setCurrentStatus(P.default.statusCode_3),this._emit(d.default.MCU_ERROR,d.default.ERR_SOCKET_DISCONNECT)}},{key:"_sendJoinClassRequest",value:function(){U.log("MCU-发送加入会议请求."),console.log(this.classInfo);var e=new g.default.RCConferenceDescriptorPdu;e.id=this.classInfo.classId,e.name=this.classInfo.className||"",e.mode=0,e.capacity=1;var t=new g.default.RCConferenceJoinRequestPdu;t.type=2,t.initiator=this.classInfo.nodeId,t.nodeType=C.default.NT_TERMINAL,t.classDescription=e;var n=g.default.create_join_class_request_pdu(t.type,this.classInfo.nodeId,this.classInfo.classId,0,v.default.BROADCAST_CHANNEL_ID,!0,C.default.DP_TOP,this.classInfo.topNodeID,C.default.SEG_ONCE);n.set("site",this.classInfo.siteId),n.set("userId",this.classInfo.userId),n.set("userName",D.default.fromByteArray(I.default.strToUint8Array(this.classInfo.userName))),n.set("userRole",this.classInfo.userRole),n.set("deviceType",""+P.default.deviceType),n.set("data",t.toArrayBuffer()),this._everSocket.send(n.toArrayBuffer())}},{key:"_everSocketMsgReceivedHandler",value:function(e){var t=g.default.decode_pdu(e),n=t.get("type"),r=t.get("data");switch(U.log("MCU-FirstLayer封装消息","type",g.default.id2type(t.type),t.type,"sessionId",(0,v.default)(t.sessionId),t.sessionId),n){case R.default.RCPDU_CONNECT_PROVIDER_RESPONSE:var i=g.default.RCConferenceJoinResponsePdu.decode(r),o=i.result;switch(U.warn("RCPDU_CONNECT_PROVIDER_RESPONSE  ->pduResultCode:"+o),o){case C.default.RET_SUCCESS:this._updateMCUConfInfoDescription(i.classDescription),this._emit(d.default.CLASS_JOIN_SUCCESS,this.classInfo);break;case C.default.RET_FULL_CAPACITY:this._emit(d.default.MCU_ERROR,d.default.ERR_CLASS_JOIN_FULL);break;default:U.arn("JoinConfPdu-未知类型-等待处理.",o)}break;case R.default.RCPDU_SEND_DATA_REQUEST:var s=this._apes[t.sessionId],a=(0,v.default)(t.sessionId);if(s){var u=g.default.id2type(t.subType);U.log("MCU-SecondLayer封装消息","sessionId",a,t.sessionId,"subtype",u,t.subType),s._emit(t.subType,t.data)}else U.warn(a+"尚未注册");break;default:U.warn("PDU-未知类型-等待处理.",n)}}},{key:"_updateMCUConfInfoDescription",value:function(e){U.log("_updateMCUConfInfoDescription."),console.log(e)}},{key:"send",value:function(e){this.connected?(U.log("MCU-发送会议数据...."),this._everSocket.send(e.toArrayBuffer())):(U.log("MCU-发送会议数据失败,MCU底层通道不可用"),this._emit(d.default.MCU_ERROR,d.default.ERR_SOCKET_DISCONNECT))}},{key:"leaveMCU",value:function(){U.log("leaveMCU"),P.default.setCurrentStatus(P.default.statusCode_3),this._everSocket.end()}},{key:"joinMCU",value:function(e){U.log("开始建立EverSocket通道."),console.log(e),e.classId=parseInt(e.classId),this.classInfo=e,this.classInfo.nodeId=w.default.creatSoleNumberFromTimestamp(),P.default.nodeId=this.classInfo.nodeId;var t=new g.default.RCNodeInfoRecordPdu;t.name=this.classInfo.userName,t.nodeId=this.classInfo.nodeId,t.userId=this.classInfo.userId,t.role=v.default.userTypesToId[this.classInfo.userRole]||1,t.level=0;var n={};n._conference_id=this.classInfo.classId,n._top_node_id=this.classInfo.topNodeID,this.mcuClassInfo={},this.mcuClassInfo.self=t,this.mcuClassInfo.info=n,this.classInfo.mcuClassInfo=this.mcuClassInfo,this._everSocket.begin(this.classInfo.MCUServerIP,this.classInfo.MCUServerPort)}},{key:"connected",get:function(){return!(!this._everSocket||!this._everSocket.connected)}}]),t}(l.default),k=new L;t.default=k;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(U,"loger","D:/work/mcuClientBranch/McuClient20170228/src/mcu.js"),__REACT_HOT_LOADER__.register(L,"MCU","D:/work/mcuClientBranch/McuClient20170228/src/mcu.js"),__REACT_HOT_LOADER__.register(k,"default","D:/work/mcuClientBranch/McuClient20170228/src/mcu.js"))})()},function(e,t){"use strict";function n(e){}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.RCPDU_CONNECT_PROVIDER_REQUEST=0,n.RCPDU_CONNECT_PROVIDER_RESPONSE=1,n.RCPDU_UNIFORM_SEND_DATA_REQUEST=125,n.RCPDU_SEND_DATA_REQUEST=120,n.RCPDU_CONFERENCE_JOIN_REQUEST=2,n.RCPDU_CONFERENCE_JOIN_RESPONSE=3,n.RCPDU_CONFERENCE_INVITE_REQUEST=10,n.RCPDU_CONFERENCE_INVITE_RESPONSE=11,n.RCPDU_CONFERENCE_LOCK_REQUEST=20,n.RCPDU_CONFERENCE_LOCK_RESPONSE=21,n.RCPDU_CONFERENCE_LOCK_INDICATION=22,n.RCPDU_CONFERENCE_UNLOCK_REQUEST=30,n.RCPDU_CONFERENCE_UNLOCK_RESPONSE=31,n.RCPDU_CONFERENCE_UNLOCK_INDICATION=32,n.RCPDU_CONFERENCE_LEAVE_REQUEST=39,n.RCPDU_CONFERENCE_TERMINATE_REQUEST=40,n.RCPDU_CONFERENCE_TERMINATE_RESPONSE=41,n.RCPDU_CONFERENCE_TERMINATE_INDICATION=42,n.RCPDU_CONFERENCE_EJECT_USER_REQUEST=50,n.RCPDU_CONFERENCE_EJECT_USER_RESPONSE=51,n.RCPDU_CONFERENCE_EJECT_USER_INDICATION=52,n.RCPDU_ROSTER_UPDATE_INDICATION=60,n.RCPDU_REGISTRY_UPDATE_REQUEST=70,n.RCPDU_REGISTRY_UPDATE_RESPONSE=71,n.RCPDU_REGISTRY_UPDATE_INDICATION=72,n.RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE=80,n.RCPDU_SESSION_JOIN_REQUEST=90,n.RCPDU_SESSION_JOIN_RESPONSE=91,n.RCPDU_CHANNEL_GRAB_REQUEST=100,n.RCPDU_CHANNEL_GRAB_RESPONSE=101,n.RCPDU_CHANNEL_GRAB_INDICATION=102,n.RCPDU_CHANNEL_JOIN_REQUEST=103,n.RCPDU_CHANNEL_JOIN_RESPONSE=104,n.RCPDU_CHANNEL_LEAVE_REQUEST=105,n.RCPDU_CHANNEL_RELEASE_REQUEST=106,n.RCPDU_CHANNEL_RELEASE_INDICATION=107,n.RCPDU_SEND_DATA_INDICATION=121,n.RCPDU_UNIFORM_SEND_DATA_INDICATION=126,n.RCPDU_TOKEN_GRAB_REQUEST=130,n.RCPDU_TOKEN_GRAB_CONFIRM=131,n.RCPDU_TOKEN_INHIBIT_REQUEST=132,n.RCPDU_TOKEN_INHIBIT_CONFIRM=133,n.RCPDU_TOKEN_GIVE_REQUEST=134,n.RCPDU_TOKEN_GIVE_INDICATION=135,n.RCPDU_TOKEN_GIVE_RESPONSE=136,n.RCPDU_TOKEN_GIVE_CONFIRM=137,n.RCPDU_TOKEN_PLEASE_REQUEST=138,n.RCPDU_TOKEN_PLEASE_INDICATION=139,n.RCPDU_TOKEN_RELEASE_REQUEST=140,n.RCPDU_TOKEN_RELEASE_CONFIRM=141,n.RCPDU_TOKEN_TEST_REQUEST=142,n.RCPDU_TOKEN_TEST_CONFIRM=143,n.RCPDU_REG_REGISTER_KEY=200,n.RCPDU_REG_UNREGISTER_KEY=201,n.RCPDU_REG_REGISTER_ROSTER=202,n.RCPDU_REG_REGISTER_TOKEN=203,n.RCPDU_REG_REGISTER_PARAMETER=204,n.RCPDU_REG_REGISTER_COUNTER=205,n.RCPDU_REG_REGISTER_TABLE=206,n.RCPDU_REG_REGISTER_CACHE=207,n.RCPDU_REG_REGISTER_OBJ=208,n.RCPDU_REG_UNREGISTER_OBJ=209,n.RCPDU_REG_UPDATE_OBJ=210,n.RCPDU_REG_ADAPTER=211,n.RCPDU_REG_CLEANUP_NODE=212,n.RCPDU_REG_REGISTER_QUEUE=213,n.RCPDU_REG_TABLE_INSERT_PDU=230,n.RCPDU_REG_TABLE_DELETE_PDU=231,n.RCPDU_REG_TABLE_UPDATE_PDU=232,n.RCPDU_REG_ROSTER_INSERT_PDU=240,n.RCPDU_REG_ROSTER_DELETE_PDU=241,n.RCPDU_REG_ROSTER_UPDATE_PDU=242,n.RCPDU_REG_PARAMETER_UPDATE_PDU=250,n.RCPDU_REG_QUEUE_INSERT_PDU=255,n.RCPDU_REG_QUEUE_DELETE_PDU=256,n.RCPDU_REG_QUEUE_UPDATE_PDU=257,n.RCPDU_CONFERENCE_SEND_DATA_REQUEST=259,n.RCPDU_VIDEO_SEND_DATA_REQUEST=260,n.RCPDU_AUDIO_SEND_DATA_REQUEST=261,n.RCPDU_GIFT_SEND_DATA_REQUEST=262,n.RCPDU_CHAT_SEND_DATA_REQUEST=263,n.RCPDU_VOTING_POLL_RECORD=265,n.RCPDU_CONFERENCE_RECORD_REQUEST=270,n.RCPDU_REG_REQUEST_OBJ=290,n.RCPDU_REG_RESPONSE_OBJ=291,n.RCPDU_REG_COUNTER_REQUEST_PDU=292,n.RCPDU_REG_COUNTER_RESPONSE_PDU=293,n.RCPDU_INDEX_ADAPTER=300,n.RCPDU_INDEX_SERVER_USERS=301,n.RCPDU_INDEX_CONFERENCE_USER_JOINED=302,n.RCPDU_INDEX_CONFERENCE_USER_EXITED=303,n.RCPDU_INDEX_CONFERENCE_USERS=304,n.RCPDU_SEND_CONFERENCE_DATA_REQUEST=500,n.RCPDU_SEND_VIDEO_DATA_REQUEST=501,n.RCPDU_SEND_AUDIO_DATA_REQUEST=502,n.RCPDU_SEND_GIFT_DATA_REQUEST=503,n.RCPDU_SEND_CHAT_DATA_REQUEST=504;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(n,"RCPduPackage","D:/work/mcuClientBranch/McuClient20170228/src/pdus/PduType.js")})()},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(f===setTimeout)return setTimeout(e,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function o(e){if(d===clearTimeout)return clearTimeout(e);
if((d===r||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function s(){_&&h&&(_=!1,h.length?p=h.concat(p):E=-1,p.length&&a())}function a(){if(!_){var e=i(s);_=!0;for(var t=p.length;t;){for(h=p,p=[];++E<t;)h&&h[E].run();E=-1,t=p.length}h=null,_=!1,o(e)}}function u(e,t){this.fun=e,this.array=t}function l(){}var f,d,c=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:n}catch(e){f=n}try{d="function"==typeof clearTimeout?clearTimeout:r}catch(e){d=r}}();var h,p=[],_=!1,E=-1;c.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new u(e,t)),1!==p.length||_||i(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=l,c.addListener=l,c.once=l,c.off=l,c.removeListener=l,c.removeAllListeners=l,c.emit=l,c.binding=function(e){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(e){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){var r,i,o;(function(e){!function(s,a){n(10).amd?(i=[n(24)],r=a,o="function"==typeof r?r.apply(t,i):r,!(void 0!==o&&(e.exports=o))):"object"==typeof e&&e&&e.exports?e.exports=function(){var e;try{e=n(24)}catch(e){}return a(e)}():(s.dcodeIO=s.dcodeIO||{}).ByteBuffer=a(s.dcodeIO.Long)}(this,function(e){"use strict";function t(e){var t=0;return function(){return t<e.length?e.charCodeAt(t++):null}}function n(){var e=[],t=[];return function(){return 0===arguments.length?t.join("")+u.apply(String,e):(e.length+arguments.length>1024&&(t.push(u.apply(String,e)),e.length=0),void Array.prototype.push.apply(e,arguments))}}function r(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,l=u>>1,f=-7,d=n?i-1:0,c=n?-1:1,h=e[t+d];for(d+=c,o=h&(1<<-f)-1,h>>=-f,f+=a;f>0;o=256*o+e[t+d],d+=c,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+e[t+d],d+=c,f-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:(h?-1:1)*(1/0);s+=Math.pow(2,r),o-=l}return(h?-1:1)*s*Math.pow(2,o-r)}function i(e,t,n,r,i,o){var s,a,u,l=8*o-i-1,f=(1<<l)-1,d=f>>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),t+=s+d>=1?c/u:c*Math.pow(2,1-d),t*u>=2&&(s++,u/=2),s+d>=f?(a=0,s=f):s+d>=1?(a=(t*u-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+h]=255&a,h+=p,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;e[n+h]=255&s,h+=p,s/=256,l-=8);e[n+h-p]|=128*_}var o=function(e,t,n){if("undefined"==typeof e&&(e=o.DEFAULT_CAPACITY),"undefined"==typeof t&&(t=o.DEFAULT_ENDIAN),"undefined"==typeof n&&(n=o.DEFAULT_NOASSERT),!n){if(e|=0,e<0)throw RangeError("Illegal capacity");t=!!t,n=!!n}this.buffer=0===e?a:new ArrayBuffer(e),this.view=0===e?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=e,this.littleEndian=t,this.noAssert=n};o.VERSION="5.0.1",o.LITTLE_ENDIAN=!0,o.BIG_ENDIAN=!1,o.DEFAULT_CAPACITY=16,o.DEFAULT_ENDIAN=o.BIG_ENDIAN,o.DEFAULT_NOASSERT=!1,o.Long=e||null;var s=o.prototype;s.__isByteBuffer__,Object.defineProperty(s,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var a=new ArrayBuffer(0),u=String.fromCharCode;o.accessor=function(){return Uint8Array},o.allocate=function(e,t,n){return new o(e,t,n)},o.concat=function(e,t,n,r){"boolean"!=typeof t&&"string"==typeof t||(r=n,n=t,t=void 0);for(var i,s=0,a=0,u=e.length;a<u;++a)o.isByteBuffer(e[a])||(e[a]=o.wrap(e[a],t)),i=e[a].limit-e[a].offset,i>0&&(s+=i);if(0===s)return new o(0,n,r);var l,f=new o(s,n,r);for(a=0;a<u;)l=e[a++],i=l.limit-l.offset,i<=0||(f.view.set(l.view.subarray(l.offset,l.limit),f.offset),f.offset+=i);return f.limit=f.offset,f.offset=0,f},o.isByteBuffer=function(e){return(e&&e.__isByteBuffer__)===!0},o.type=function(){return ArrayBuffer},o.wrap=function(e,t,n,r){if("string"!=typeof t&&(r=n,n=t,t=void 0),"string"==typeof e)switch("undefined"==typeof t&&(t="utf8"),t){case"base64":return o.fromBase64(e,n);case"hex":return o.fromHex(e,n);case"binary":return o.fromBinary(e,n);case"utf8":return o.fromUTF8(e,n);case"debug":return o.fromDebug(e,n);default:throw Error("Unsupported encoding: "+t)}if(null===e||"object"!=typeof e)throw TypeError("Illegal buffer");var i;if(o.isByteBuffer(e))return i=s.clone.call(e),i.markedOffset=-1,i;if(e instanceof Uint8Array)i=new o(0,n,r),e.length>0&&(i.buffer=e.buffer,i.offset=e.byteOffset,i.limit=e.byteOffset+e.byteLength,i.view=new Uint8Array(e.buffer));else if(e instanceof ArrayBuffer)i=new o(0,n,r),e.byteLength>0&&(i.buffer=e,i.offset=0,i.limit=e.byteLength,i.view=e.byteLength>0?new Uint8Array(e):null);else{if("[object Array]"!==Object.prototype.toString.call(e))throw TypeError("Illegal buffer");i=new o(e.length,n,r),i.limit=e.length;for(var a=0;a<e.length;++a)i.view[a]=e[a]}return i},s.writeBitSet=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if(!(e instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r,i=t,o=e.length,s=o>>3,a=0;for(t+=this.writeVarint32(o,t);s--;)r=1&!!e[a++]|(1&!!e[a++])<<1|(1&!!e[a++])<<2|(1&!!e[a++])<<3|(1&!!e[a++])<<4|(1&!!e[a++])<<5|(1&!!e[a++])<<6|(1&!!e[a++])<<7,this.writeByte(r,t++);if(a<o){var u=0;for(r=0;a<o;)r|=(1&!!e[a++])<<u++;this.writeByte(r,t++)}return n?(this.offset=t,this):t-i},s.readBitSet=function(e){var t="undefined"==typeof e;t&&(e=this.offset);var n,r=this.readVarint32(e),i=r.value,o=i>>3,s=0,a=[];for(e+=r.length;o--;)n=this.readByte(e++),a[s++]=!!(1&n),a[s++]=!!(2&n),a[s++]=!!(4&n),a[s++]=!!(8&n),a[s++]=!!(16&n),a[s++]=!!(32&n),a[s++]=!!(64&n),a[s++]=!!(128&n);if(s<i){var u=0;for(n=this.readByte(e++);s<i;)a[s++]=!!(n>>u++&1)}return t&&(this.offset=e),a},s.readBytes=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+"+e+") <= "+this.buffer.byteLength)}var r=this.slice(t,t+e);return n&&(this.offset+=e),r},s.writeBytes=s.append,s.writeInt8=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=1,this.view[t]=e,n&&(this.offset+=1),this},s.writeByte=s.writeInt8,s.readInt8=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=this.view[e];return 128===(128&n)&&(n=-(255-n+1)),t&&(this.offset+=1),n},s.readByte=s.readInt8,s.writeUint8=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=1,this.view[t]=e,n&&(this.offset+=1),this},s.writeUInt8=s.writeUint8,s.readUint8=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=this.view[e];return t&&(this.offset+=1),n},s.readUInt8=s.readUint8,s.writeInt16=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),n&&(this.offset+=2),this},s.writeShort=s.writeInt16,s.readInt16=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e],n|=this.view[e+1]<<8):(n=this.view[e]<<8,n|=this.view[e+1]),32768===(32768&n)&&(n=-(65535-n+1)),t&&(this.offset+=2),n},s.readShort=s.readInt16,s.writeUint16=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),n&&(this.offset+=2),this},s.writeUInt16=s.writeUint16,s.readUint16=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e],n|=this.view[e+1]<<8):(n=this.view[e]<<8,n|=this.view[e+1]),t&&(this.offset+=2),n},s.readUInt16=s.readUint16,s.writeInt32=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),n&&(this.offset+=4),this},s.writeInt=s.writeInt32,s.readInt32=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0),n|=0,t&&(this.offset+=4),n},s.readInt=s.readInt32,s.writeUint32=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),n&&(this.offset+=4),this},s.writeUInt32=s.writeUint32,s.readUint32=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0),t&&(this.offset+=4),n},s.readUInt32=s.readUint32,e&&(s.writeInt64=function(t,n){var r="undefined"==typeof n;if(r&&(n=this.offset),!this.noAssert){if("number"==typeof t)t=e.fromNumber(t);else if("string"==typeof t)t=e.fromString(t);else if(!(t&&t instanceof e))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof t?t=e.fromNumber(t):"string"==typeof t&&(t=e.fromString(t)),n+=8;var i=this.buffer.byteLength;n>i&&this.resize((i*=2)>n?i:n),n-=8;var o=t.low,s=t.high;return this.littleEndian?(this.view[n+3]=o>>>24&255,this.view[n+2]=o>>>16&255,this.view[n+1]=o>>>8&255,this.view[n]=255&o,n+=4,this.view[n+3]=s>>>24&255,this.view[n+2]=s>>>16&255,this.view[n+1]=s>>>8&255,this.view[n]=255&s):(this.view[n]=s>>>24&255,this.view[n+1]=s>>>16&255,this.view[n+2]=s>>>8&255,this.view[n+3]=255&s,n+=4,this.view[n]=o>>>24&255,this.view[n+1]=o>>>16&255,this.view[n+2]=o>>>8&255,this.view[n+3]=255&o),r&&(this.offset+=8),this},s.writeLong=s.writeInt64,s.readInt64=function(t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=0,i=0;this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0,t+=4,i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0):(i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0,t+=4,r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0);var o=new e(r,i,!1);return n&&(this.offset+=8),o},s.readLong=s.readInt64,s.writeUint64=function(t,n){var r="undefined"==typeof n;if(r&&(n=this.offset),!this.noAssert){if("number"==typeof t)t=e.fromNumber(t);else if("string"==typeof t)t=e.fromString(t);else if(!(t&&t instanceof e))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof t?t=e.fromNumber(t):"string"==typeof t&&(t=e.fromString(t)),n+=8;var i=this.buffer.byteLength;n>i&&this.resize((i*=2)>n?i:n),n-=8;var o=t.low,s=t.high;return this.littleEndian?(this.view[n+3]=o>>>24&255,this.view[n+2]=o>>>16&255,this.view[n+1]=o>>>8&255,this.view[n]=255&o,n+=4,this.view[n+3]=s>>>24&255,this.view[n+2]=s>>>16&255,this.view[n+1]=s>>>8&255,this.view[n]=255&s):(this.view[n]=s>>>24&255,this.view[n+1]=s>>>16&255,this.view[n+2]=s>>>8&255,this.view[n+3]=255&s,n+=4,this.view[n]=o>>>24&255,this.view[n+1]=o>>>16&255,this.view[n+2]=o>>>8&255,this.view[n+3]=255&o),r&&(this.offset+=8),this},s.writeUInt64=s.writeUint64,s.readUint64=function(t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=0,i=0;this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0,t+=4,i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0):(i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0,t+=4,r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0);var o=new e(r,i,!0);return n&&(this.offset+=8),o},s.readUInt64=s.readUint64),s.writeFloat32=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=4,i(this.view,e,t,this.littleEndian,23,4),n&&(this.offset+=4),this},s.writeFloat=s.writeFloat32,s.readFloat32=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=r(this.view,e,this.littleEndian,23,4);return t&&(this.offset+=4),n},s.readFloat=s.readFloat32,s.writeFloat64=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=8;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=8,i(this.view,e,t,this.littleEndian,52,8),n&&(this.offset+=8),this},s.writeDouble=s.writeFloat64,s.readFloat64=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=r(this.view,e,this.littleEndian,52,8);return t&&(this.offset+=8),n},s.readDouble=s.readFloat64,o.MAX_VARINT32_BYTES=5,o.calculateVarint32=function(e){return e>>>=0,e<128?1:e<16384?2:e<1<<21?3:e<1<<28?4:5},o.zigZagEncode32=function(e){return((e|=0)<<1^e>>31)>>>0},o.zigZagDecode32=function(e){return e>>>1^-(1&e)|0},s.writeVarint32=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r,i=o.calculateVarint32(e);t+=i;var s=this.buffer.byteLength;for(t>s&&this.resize((s*=2)>t?s:t),t-=i,e>>>=0;e>=128;)r=127&e|128,this.view[t++]=r,e>>>=7;return this.view[t++]=e,n?(this.offset=t,this):i},s.writeVarint32ZigZag=function(e,t){return this.writeVarint32(o.zigZagEncode32(e),t)},s.readVarint32=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n,r=0,i=0;do{if(!this.noAssert&&e>this.limit){var o=Error("Truncated");throw o.truncated=!0,o}n=this.view[e++],r<5&&(i|=(127&n)<<7*r),++r}while(0!==(128&n));return i|=0,t?(this.offset=e,i):{value:i,length:r}},s.readVarint32ZigZag=function(e){var t=this.readVarint32(e);return"object"==typeof t?t.value=o.zigZagDecode32(t.value):t=o.zigZagDecode32(t),t},e&&(o.MAX_VARINT64_BYTES=10,o.calculateVarint64=function(t){"number"==typeof t?t=e.fromNumber(t):"string"==typeof t&&(t=e.fromString(t));var n=t.toInt()>>>0,r=t.shiftRightUnsigned(28).toInt()>>>0,i=t.shiftRightUnsigned(56).toInt()>>>0;return 0==i?0==r?n<16384?n<128?1:2:n<1<<21?3:4:r<16384?r<128?5:6:r<1<<21?7:8:i<128?9:10},o.zigZagEncode64=function(t){return"number"==typeof t?t=e.fromNumber(t,!1):"string"==typeof t?t=e.fromString(t,!1):t.unsigned!==!1&&(t=t.toSigned()),t.shiftLeft(1).xor(t.shiftRight(63)).toUnsigned()},o.zigZagDecode64=function(t){return"number"==typeof t?t=e.fromNumber(t,!1):"string"==typeof t?t=e.fromString(t,!1):t.unsigned!==!1&&(t=t.toSigned()),t.shiftRightUnsigned(1).xor(t.and(e.ONE).toSigned().negate()).toSigned()},s.writeVarint64=function(t,n){var r="undefined"==typeof n;if(r&&(n=this.offset),!this.noAssert){if("number"==typeof t)t=e.fromNumber(t);else if("string"==typeof t)t=e.fromString(t);else if(!(t&&t instanceof e))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof t?t=e.fromNumber(t,!1):"string"==typeof t?t=e.fromString(t,!1):t.unsigned!==!1&&(t=t.toSigned());var i=o.calculateVarint64(t),s=t.toInt()>>>0,a=t.shiftRightUnsigned(28).toInt()>>>0,u=t.shiftRightUnsigned(56).toInt()>>>0;n+=i;var l=this.buffer.byteLength;switch(n>l&&this.resize((l*=2)>n?l:n),n-=i,i){case 10:this.view[n+9]=u>>>7&1;case 9:this.view[n+8]=9!==i?128|u:127&u;case 8:this.view[n+7]=8!==i?a>>>21|128:a>>>21&127;case 7:this.view[n+6]=7!==i?a>>>14|128:a>>>14&127;case 6:this.view[n+5]=6!==i?a>>>7|128:a>>>7&127;case 5:this.view[n+4]=5!==i?128|a:127&a;case 4:this.view[n+3]=4!==i?s>>>21|128:s>>>21&127;case 3:this.view[n+2]=3!==i?s>>>14|128:s>>>14&127;case 2:this.view[n+1]=2!==i?s>>>7|128:s>>>7&127;case 1:this.view[n]=1!==i?128|s:127&s}return r?(this.offset+=i,this):i},s.writeVarint64ZigZag=function(e,t){return this.writeVarint64(o.zigZagEncode64(e),t)},s.readVarint64=function(t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=t,i=0,o=0,s=0,a=0;if(a=this.view[t++],i=127&a,128&a&&(a=this.view[t++],i|=(127&a)<<7,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[t++],i|=(127&a)<<14,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[t++],i|=(127&a)<<21,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[t++],o=127&a,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[t++],o|=(127&a)<<7,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[t++],o|=(127&a)<<14,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[t++],o|=(127&a)<<21,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[t++],s=127&a,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[t++],s|=(127&a)<<7,128&a||this.noAssert&&"undefined"==typeof a))))))))))throw Error("Buffer overrun");var u=e.fromBits(i|o<<28,o>>>4|s<<24,!1);return n?(this.offset=t,u):{value:u,length:t-r}},s.readVarint64ZigZag=function(t){var n=this.readVarint64(t);return n&&n.value instanceof e?n.value=o.zigZagDecode64(n.value):n=o.zigZagDecode64(n),n}),s.writeCString=function(e,n){var r="undefined"==typeof n;r&&(n=this.offset);var i,o=e.length;if(!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");for(i=0;i<o;++i)if(0===e.charCodeAt(i))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}o=f.calculateUTF16asUTF8(t(e))[1],n+=o+1;var s=this.buffer.byteLength;return n>s&&this.resize((s*=2)>n?s:n),n-=o+1,f.encodeUTF16toUTF8(t(e),function(e){this.view[n++]=e}.bind(this)),this.view[n++]=0,r?(this.offset=n,this):o},s.readCString=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var r,i=e,o=-1;return f.decodeUTF8toUTF16(function(){if(0===o)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return o=this.view[e++],0===o?null:o}.bind(this),r=n(),!0),t?(this.offset=e,r()):{string:r(),length:e-i}},s.writeIString=function(e,n){var r="undefined"==typeof n;if(r&&(n=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var i,o=n;i=f.calculateUTF16asUTF8(t(e),this.noAssert)[1],n+=4+i;var s=this.buffer.byteLength;if(n>s&&this.resize((s*=2)>n?s:n),n-=4+i,this.littleEndian?(this.view[n+3]=i>>>24&255,this.view[n+2]=i>>>16&255,this.view[n+1]=i>>>8&255,this.view[n]=255&i):(this.view[n]=i>>>24&255,this.view[n+1]=i>>>16&255,this.view[n+2]=i>>>8&255,this.view[n+3]=255&i),n+=4,f.encodeUTF16toUTF8(t(e),function(e){this.view[n++]=e}.bind(this)),n!==o+4+i)throw RangeError("Illegal range: Truncated data, "+n+" == "+(n+4+i));return r?(this.offset=n,this):n-o},s.readIString=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=e,r=this.readUint32(e),i=this.readUTF8String(r,o.METRICS_BYTES,e+=4);return e+=i.length,t?(this.offset=e,i.string):{string:i.string,length:e-n}},o.METRICS_CHARS="c",o.METRICS_BYTES="b",s.writeUTF8String=function(e,n){var r="undefined"==typeof n;if(r&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var i,o=n;i=f.calculateUTF16asUTF8(t(e))[1],n+=i;var s=this.buffer.byteLength;return n>s&&this.resize((s*=2)>n?s:n),n-=i,f.encodeUTF16toUTF8(t(e),function(e){this.view[n++]=e}.bind(this)),r?(this.offset=n,this):n-o},s.writeString=s.writeUTF8String,o.calculateUTF8Chars=function(e){return f.calculateUTF16asUTF8(t(e))[0]},o.calculateUTF8Bytes=function(e){return f.calculateUTF16asUTF8(t(e))[1]},o.calculateString=o.calculateUTF8Bytes,s.readUTF8String=function(e,t,r){"number"==typeof t&&(r=t,t=void 0);var i="undefined"==typeof r;if(i&&(r=this.offset),"undefined"==typeof t&&(t=o.METRICS_CHARS),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal length: "+e+" (not an integer)");if(e|=0,"number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var s,a=0,u=r;if(t===o.METRICS_CHARS){if(s=n(),f.decodeUTF8(function(){return a<e&&r<this.limit?this.view[r++]:null}.bind(this),function(e){++a,f.UTF8toUTF16(e,s)}),a!==e)throw RangeError("Illegal range: Truncated data, "+a+" == "+e);return i?(this.offset=r,s()):{string:s(),length:r-u}}if(t===o.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+"+e+") <= "+this.buffer.byteLength)}var l=r+e;if(f.decodeUTF8toUTF16(function(){return r<l?this.view[r++]:null}.bind(this),s=n(),this.noAssert),r!==l)throw RangeError("Illegal range: Truncated data, "+r+" == "+l);return i?(this.offset=r,s()):{string:s(),length:r-u}}throw TypeError("Unsupported metrics: "+t)},s.readString=s.readUTF8String,s.writeVString=function(e,n){var r="undefined"==typeof n;if(r&&(n=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var i,s,a=n;i=f.calculateUTF16asUTF8(t(e),this.noAssert)[1],s=o.calculateVarint32(i),n+=s+i;var u=this.buffer.byteLength;if(n>u&&this.resize((u*=2)>n?u:n),n-=s+i,n+=this.writeVarint32(i,n),f.encodeUTF16toUTF8(t(e),function(e){this.view[n++]=e}.bind(this)),n!==a+i+s)throw RangeError("Illegal range: Truncated data, "+n+" == "+(n+i+s));return r?(this.offset=n,this):n-a},s.readVString=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=e,r=this.readVarint32(e),i=this.readUTF8String(r.value,o.METRICS_BYTES,e+=r.length);return e+=i.length,t?(this.offset=e,i.string):{string:i.string,length:e-n}},s.append=function(e,t,n){"number"!=typeof t&&"string"==typeof t||(n=t,t=void 0);var r="undefined"==typeof n;if(r&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}e instanceof o||(e=o.wrap(e,t));var i=e.limit-e.offset;if(i<=0)return this;n+=i;var s=this.buffer.byteLength;return n>s&&this.resize((s*=2)>n?s:n),n-=i,this.view.set(e.view.subarray(e.offset,e.limit),n),e.offset+=i,r&&(this.offset+=i),this},s.appendTo=function(e,t){return e.append(this,t),this},s.assert=function(e){return this.noAssert=!e,this},s.capacity=function(){return this.buffer.byteLength},s.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},s.clone=function(e){var t=new o(0,this.littleEndian,this.noAssert);return e?(t.buffer=new ArrayBuffer(this.buffer.byteLength),t.view=new Uint8Array(t.buffer)):(t.buffer=this.buffer,t.view=this.view),t.offset=this.offset,t.markedOffset=this.markedOffset,t.limit=this.limit,t},s.compact=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(0===e&&t===this.buffer.byteLength)return this;var n=t-e;if(0===n)return this.buffer=a,this.view=null,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=0,this;var r=new ArrayBuffer(n),i=new Uint8Array(r);return i.set(this.view.subarray(e,t)),this.buffer=r,this.view=i,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=n,this},s.copy=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");
if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(e===t)return new o(0,this.littleEndian,this.noAssert);var n=t-e,r=new o(n,this.littleEndian,this.noAssert);return r.offset=0,r.limit=n,r.markedOffset>=0&&(r.markedOffset-=e),this.copyTo(r,0,e,t),r},s.copyTo=function(e,t,n,r){var i,s;if(!this.noAssert&&!o.isByteBuffer(e))throw TypeError("Illegal target: Not a ByteBuffer");if(t=(s="undefined"==typeof t)?e.offset:0|t,n=(i="undefined"==typeof n)?this.offset:0|n,r="undefined"==typeof r?this.limit:0|r,t<0||t>e.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+t+" <= "+e.buffer.byteLength);if(n<0||r>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var a=r-n;return 0===a?e:(e.ensureCapacity(t+a),e.view.set(this.view.subarray(n,r),t),i&&(this.offset+=a),s&&(e.offset+=a),this)},s.ensureCapacity=function(e){var t=this.buffer.byteLength;return t<e?this.resize((t*=2)>e?t:e):this},s.fill=function(e,t,n){var r="undefined"==typeof t;if(r&&(t=this.offset),"string"==typeof e&&e.length>0&&(e=e.charCodeAt(0)),"undefined"==typeof t&&(t=this.offset),"undefined"==typeof n&&(n=this.limit),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof n||n%1!==0)throw TypeError("Illegal end: Not an integer");if(n>>>=0,t<0||t>n||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}if(t>=n)return this;for(;t<n;)this.view[t++]=e;return r&&(this.offset=t),this},s.flip=function(){return this.limit=this.offset,this.offset=0,this},s.mark=function(e){if(e="undefined"==typeof e?this.offset:e,!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=e,this},s.order=function(e){if(!this.noAssert&&"boolean"!=typeof e)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!e,this},s.LE=function(e){return this.littleEndian="undefined"==typeof e||!!e,this},s.BE=function(e){return this.littleEndian="undefined"!=typeof e&&!e,this},s.prepend=function(e,t,n){"number"!=typeof t&&"string"==typeof t||(n=t,t=void 0);var r="undefined"==typeof n;if(r&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}e instanceof o||(e=o.wrap(e,t));var i=e.limit-e.offset;if(i<=0)return this;var s=i-n;if(s>0){var a=new ArrayBuffer(this.buffer.byteLength+s),u=new Uint8Array(a);u.set(this.view.subarray(n,this.buffer.byteLength),i),this.buffer=a,this.view=u,this.offset+=s,this.markedOffset>=0&&(this.markedOffset+=s),this.limit+=s,n+=s}else{new Uint8Array(this.buffer)}return this.view.set(e.view.subarray(e.offset,e.limit),n-i),e.offset=e.limit,r&&(this.offset-=i),this},s.prependTo=function(e,t){return e.prepend(this,t),this},s.printDebug=function(e){"function"!=typeof e&&(e=console.log.bind(console)),e(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},s.remaining=function(){return this.limit-this.offset},s.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},s.resize=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal capacity: "+e+" (not an integer)");if(e|=0,e<0)throw RangeError("Illegal capacity: 0 <= "+e)}if(this.buffer.byteLength<e){var t=new ArrayBuffer(e),n=new Uint8Array(t);n.set(this.view),this.buffer=t,this.view=n}return this},s.reverse=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}return e===t?this:(Array.prototype.reverse.call(this.view.subarray(e,t)),this)},s.skip=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal length: "+e+" (not an integer)");e|=0}var t=this.offset+e;if(!this.noAssert&&(t<0||t>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+e+" <= "+this.buffer.byteLength);return this.offset=t,this},s.slice=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var n=this.clone();return n.offset=e,n.limit=t,n},s.toBuffer=function(e){var t=this.offset,n=this.limit;if(!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: Not an integer");if(t>>>=0,"number"!=typeof n||n%1!==0)throw TypeError("Illegal limit: Not an integer");if(n>>>=0,t<0||t>n||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}if(!e&&0===t&&n===this.buffer.byteLength)return this.buffer;if(t===n)return a;var r=new ArrayBuffer(n-t);return new Uint8Array(r).set(new Uint8Array(this.buffer).subarray(t,n),0),r},s.toArrayBuffer=s.toBuffer,s.toString=function(e,t,n){if("undefined"==typeof e)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof e&&(e="utf8",t=e,n=t),e){case"utf8":return this.toUTF8(t,n);case"base64":return this.toBase64(t,n);case"hex":return this.toHex(t,n);case"binary":return this.toBinary(t,n);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+e)}};var l=function(){for(var e={},t=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],n=[],r=0,i=t.length;r<i;++r)n[t[r]]=r;return e.encode=function(e,n){for(var r,i;null!==(r=e());)n(t[r>>2&63]),i=(3&r)<<4,null!==(r=e())?(i|=r>>4&15,n(t[63&(i|r>>4&15)]),i=(15&r)<<2,null!==(r=e())?(n(t[63&(i|r>>6&3)]),n(t[63&r])):(n(t[63&i]),n(61))):(n(t[63&i]),n(61),n(61))},e.decode=function(e,t){function r(e){throw Error("Illegal character code: "+e)}for(var i,o,s;null!==(i=e());)if(o=n[i],"undefined"==typeof o&&r(i),null!==(i=e())&&(s=n[i],"undefined"==typeof s&&r(i),t(o<<2>>>0|(48&s)>>4),null!==(i=e()))){if(o=n[i],"undefined"==typeof o){if(61===i)break;r(i)}if(t((15&s)<<4>>>0|(60&o)>>2),null!==(i=e())){if(s=n[i],"undefined"==typeof s){if(61===i)break;r(i)}t((3&o)<<6>>>0|s)}}},e.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)},e}();s.toBase64=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),e|=0,t|=0,e<0||t>this.capacity||e>t)throw RangeError("begin, end");var r;return l.encode(function(){return e<t?this.view[e++]:null}.bind(this),r=n()),r()},o.fromBase64=function(e,n){if("string"!=typeof e)throw TypeError("str");var r=new o(e.length/4*3,n),i=0;return l.decode(t(e),function(e){r.view[i++]=e}),r.limit=i,r},o.btoa=function(e){return o.fromBinary(e).toBase64()},o.atob=function(e){return o.fromBase64(e).toBinary()},s.toBinary=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),e|=0,t|=0,e<0||t>this.capacity()||e>t)throw RangeError("begin, end");if(e===t)return"";for(var n=[],r=[];e<t;)n.push(this.view[e++]),n.length>=1024&&(r.push(String.fromCharCode.apply(String,n)),n=[]);return r.join("")+String.fromCharCode.apply(String,n)},o.fromBinary=function(e,t){if("string"!=typeof e)throw TypeError("str");for(var n,r=0,i=e.length,s=new o(i,t);r<i;){if(n=e.charCodeAt(r),n>255)throw RangeError("illegal char code: "+n);s.view[r++]=n}return s.limit=i,s},s.toDebug=function(e){for(var t,n=-1,r=this.buffer.byteLength,i="",o="",s="";n<r;){if(n!==-1&&(t=this.view[n],i+=t<16?"0"+t.toString(16).toUpperCase():t.toString(16).toUpperCase(),e&&(o+=t>32&&t<127?String.fromCharCode(t):".")),++n,e&&n>0&&n%16===0&&n!==r){for(;i.length<51;)i+=" ";s+=i+o+"\n",i=o=""}i+=n===this.offset&&n===this.limit?n===this.markedOffset?"!":"|":n===this.offset?n===this.markedOffset?"[":"<":n===this.limit?n===this.markedOffset?"]":">":n===this.markedOffset?"'":e||0!==n&&n!==r?" ":""}if(e&&" "!==i){for(;i.length<51;)i+=" ";s+=i+o+"\n"}return e?s:i},o.fromDebug=function(e,t,n){for(var r,i,s=e.length,a=new o((s+1)/3|0,t,n),u=0,l=0,f=!1,d=!1,c=!1,h=!1,p=!1;u<s;){switch(r=e.charAt(u++)){case"!":if(!n){if(d||c||h){p=!0;break}d=c=h=!0}a.offset=a.markedOffset=a.limit=l,f=!1;break;case"|":if(!n){if(d||h){p=!0;break}d=h=!0}a.offset=a.limit=l,f=!1;break;case"[":if(!n){if(d||c){p=!0;break}d=c=!0}a.offset=a.markedOffset=l,f=!1;break;case"<":if(!n){if(d){p=!0;break}d=!0}a.offset=l,f=!1;break;case"]":if(!n){if(h||c){p=!0;break}h=c=!0}a.limit=a.markedOffset=l,f=!1;break;case">":if(!n){if(h){p=!0;break}h=!0}a.limit=l,f=!1;break;case"'":if(!n){if(c){p=!0;break}c=!0}a.markedOffset=l,f=!1;break;case" ":f=!1;break;default:if(!n&&f){p=!0;break}if(i=parseInt(r+e.charAt(u++),16),!n&&(isNaN(i)||i<0||i>255))throw TypeError("Illegal str: Not a debug encoded string");a.view[l++]=i,f=!0}if(p)throw TypeError("Illegal str: Invalid symbol at "+u)}if(!n){if(!d||!h)throw TypeError("Illegal str: Missing offset or limit");if(l<a.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+l+" < "+s)}return a},s.toHex=function(e,t){if(e="undefined"==typeof e?this.offset:e,t="undefined"==typeof t?this.limit:t,!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}for(var n,r=new Array(t-e);e<t;)n=this.view[e++],n<16?r.push("0",n.toString(16)):r.push(n.toString(16));return r.join("")},o.fromHex=function(e,t,n){if(!n){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if(e.length%2!==0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var r,i=e.length,s=new o(i/2|0,t),a=0,u=0;a<i;a+=2){if(r=parseInt(e.substring(a,a+2),16),!n&&(!isFinite(r)||r<0||r>255))throw TypeError("Illegal str: Contains non-hex characters");s.view[u++]=r}return s.limit=u,s};var f=function(){var e={};return e.MAX_CODEPOINT=1114111,e.encodeUTF8=function(e,t){var n=null;for("number"==typeof e&&(n=e,e=function(){return null});null!==n||null!==(n=e());)n<128?t(127&n):n<2048?(t(n>>6&31|192),t(63&n|128)):n<65536?(t(n>>12&15|224),t(n>>6&63|128),t(63&n|128)):(t(n>>18&7|240),t(n>>12&63|128),t(n>>6&63|128),t(63&n|128)),n=null},e.decodeUTF8=function(e,t){for(var n,r,i,o,s=function(e){e=e.slice(0,e.indexOf(null));var t=Error(e.toString());throw t.name="TruncatedError",t.bytes=e,t};null!==(n=e());)if(0===(128&n))t(n);else if(192===(224&n))null===(r=e())&&s([n,r]),t((31&n)<<6|63&r);else if(224===(240&n))(null===(r=e())||null===(i=e()))&&s([n,r,i]),t((15&n)<<12|(63&r)<<6|63&i);else{if(240!==(248&n))throw RangeError("Illegal starting byte: "+n);(null===(r=e())||null===(i=e())||null===(o=e()))&&s([n,r,i,o]),t((7&n)<<18|(63&r)<<12|(63&i)<<6|63&o)}},e.UTF16toUTF8=function(e,t){for(var n,r=null;;){if(null===(n=null!==r?r:e()))break;n>=55296&&n<=57343&&null!==(r=e())&&r>=56320&&r<=57343?(t(1024*(n-55296)+r-56320+65536),r=null):t(n)}null!==r&&t(r)},e.UTF8toUTF16=function(e,t){var n=null;for("number"==typeof e&&(n=e,e=function(){return null});null!==n||null!==(n=e());)n<=65535?t(n):(n-=65536,t((n>>10)+55296),t(n%1024+56320)),n=null},e.encodeUTF16toUTF8=function(t,n){e.UTF16toUTF8(t,function(t){e.encodeUTF8(t,n)})},e.decodeUTF8toUTF16=function(t,n){e.decodeUTF8(t,function(t){e.UTF8toUTF16(t,n)})},e.calculateCodePoint=function(e){return e<128?1:e<2048?2:e<65536?3:4},e.calculateUTF8=function(e){for(var t,n=0;null!==(t=e());)n+=t<128?1:t<2048?2:t<65536?3:4;return n},e.calculateUTF16asUTF8=function(t){var n=0,r=0;return e.UTF16toUTF8(t,function(e){++n,r+=e<128?1:e<2048?2:e<65536?3:4}),[n,r]},e}();return s.toUTF8=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var r;try{f.decodeUTF8toUTF16(function(){return e<t?this.view[e++]:null}.bind(this),r=n())}catch(n){if(e!==t)throw RangeError("Illegal range: Truncated data, "+e+" != "+t)}return r()},o.fromUTF8=function(e,n,r){if(!r&&"string"!=typeof e)throw TypeError("Illegal str: Not a string");var i=new o(f.calculateUTF16asUTF8(t(e),!0)[1],n,r),s=0;return f.encodeUTF16toUTF8(t(e),function(e){i.view[s++]=e}),i.limit=s,i},o})}).call(t,n(9)(e))},function(e,t){var n={utf8:{stringToBytes:function(e){return n.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(n.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=n},function(e,t,n){var r,i;!function(t,n){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,o){"use strict";function s(e,t){t=t||re;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function a(e){var t=!!e&&"length"in e&&e.length,n=Ee.type(e);return"function"!==n&&!Ee.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function u(e,t,n){if(Ee.isFunction(t))return Ee.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return Ee.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ie.test(t))return Ee.filter(t,e,n);t=Ee.filter(t,e)}return Ee.grep(e,function(e){return ue.call(t,e)>-1!==n&&1===e.nodeType})}function l(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function f(e){var t={};return Ee.each(e.match(we)||[],function(e,n){t[n]=!0}),t}function d(e){return e}function c(e){throw e}function h(e,t,n){var r;try{e&&Ee.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&Ee.isFunction(r=e.then)?r.call(e,t,n):t.call(void 0,e)}catch(e){n.call(void 0,e)}}function p(){re.removeEventListener("DOMContentLoaded",p),n.removeEventListener("load",p),Ee.ready()}function _(){this.expando=Ee.expando+_.uid++}function E(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(He,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Fe.test(n)?JSON.parse(n):n)}catch(e){}Be.set(e,t,n)}else n=void 0;return n}function g(e,t,n,r){var i,o=1,s=20,a=r?function(){return r.cur()}:function(){return Ee.css(e,t,"")},u=a(),l=n&&n[3]||(Ee.cssNumber[t]?"":"px"),f=(Ee.cssNumber[t]||"px"!==l&&+u)&&Ge.exec(Ee.css(e,t));if(f&&f[3]!==l){l=l||f[3],n=n||[],f=+u||1;do o=o||".5",f/=o,Ee.style(e,t,f+l);while(o!==(o=a()/u)&&1!==o&&--s)}return n&&(f=+f||+u||0,i=n[1]?f+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=f,r.end=i)),i}function y(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ye[r];return i?i:(t=n.body.appendChild(n.createElement(r)),i=Ee.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ye[r]=i,i)}function R(e,t){for(var n,r,i=[],o=0,s=e.length;o<s;o++)r=e[o],r.style&&(n=r.style.display,t?("none"===n&&(i[o]=Me.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&Ve(r)&&(i[o]=y(r))):"none"!==n&&(i[o]="none",Me.set(r,"display",n)));for(o=0;o<s;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function m(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&Ee.nodeName(e,t)?Ee.merge([e],n):n}function C(e,t){for(var n=0,r=e.length;n<r;n++)Me.set(e[n],"globalEval",!t||Me.get(t[n],"globalEval"))}function T(e,t,n,r,i){for(var o,s,a,u,l,f,d=t.createDocumentFragment(),c=[],h=0,p=e.length;h<p;h++)if(o=e[h],o||0===o)if("object"===Ee.type(o))Ee.merge(c,o.nodeType?[o]:o);else if($e.test(o)){for(s=s||d.appendChild(t.createElement("div")),a=(Qe.exec(o)||["",""])[1].toLowerCase(),u=Ke[a]||Ke._default,s.innerHTML=u[1]+Ee.htmlPrefilter(o)+u[2],f=u[0];f--;)s=s.lastChild;Ee.merge(c,s.childNodes),s=d.firstChild,s.textContent=""}else c.push(t.createTextNode(o));for(d.textContent="",h=0;o=c[h++];)if(r&&Ee.inArray(o,r)>-1)i&&i.push(o);else if(l=Ee.contains(o.ownerDocument,o),s=m(d.appendChild(o),"script"),l&&C(s),n)for(f=0;o=s[f++];)ze.test(o.type||"")&&n.push(o);return d}function v(){return!0}function S(){return!1}function A(){try{return re.activeElement}catch(e){}}function I(e,t,n,r,i,o){var s,a;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(a in t)I(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=S;else if(!i)return e;return 1===o&&(s=i,i=function(e){return Ee().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=Ee.guid++)),e.each(function(){Ee.event.add(this,t,i,r,n)})}function b(e,t){return Ee.nodeName(e,"table")&&Ee.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e:e}function D(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function N(e){var t=ot.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function P(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(Me.hasData(e)&&(o=Me.access(e),s=Me.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)Ee.event.add(t,i,l[i][n])}Be.hasData(e)&&(a=Be.access(e),u=Ee.extend({},a),Be.set(t,u))}}function O(e,t){var n=t.nodeName.toLowerCase();"input"===n&&We.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function w(e,t,n,r){t=se.apply([],t);var i,o,a,u,l,f,d=0,c=e.length,h=c-1,p=t[0],_=Ee.isFunction(p);if(_||c>1&&"string"==typeof p&&!pe.checkClone&&it.test(p))return e.each(function(i){var o=e.eq(i);_&&(t[0]=p.call(this,i,o.html())),w(o,t,n,r)});if(c&&(i=T(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=Ee.map(m(i,"script"),D),u=a.length;d<c;d++)l=i,d!==h&&(l=Ee.clone(l,!0,!0),u&&Ee.merge(a,m(l,"script"))),n.call(e[d],l,d);if(u)for(f=a[a.length-1].ownerDocument,Ee.map(a,N),d=0;d<u;d++)l=a[d],ze.test(l.type||"")&&!Me.access(l,"globalEval")&&Ee.contains(f,l)&&(l.src?Ee._evalUrl&&Ee._evalUrl(l.src):s(l.textContent.replace(st,""),f))}return e}function U(e,t,n){for(var r,i=t?Ee.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||Ee.cleanData(m(r)),r.parentNode&&(n&&Ee.contains(r.ownerDocument,r)&&C(m(r,"script")),r.parentNode.removeChild(r));return e}function L(e,t,n){var r,i,o,s,a=e.style;return n=n||lt(e),n&&(s=n.getPropertyValue(t)||n[t],""!==s||Ee.contains(e.ownerDocument,e)||(s=Ee.style(e,t)),!pe.pixelMarginRight()&&ut.test(s)&&at.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o)),void 0!==s?s+"":s}function k(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function x(e){if(e in pt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=ht.length;n--;)if(e=ht[n]+t,e in pt)return e}function M(e,t,n){var r=Ge.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function B(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;o<4;o+=2)"margin"===n&&(s+=Ee.css(e,n+qe[o],!0,i)),r?("content"===n&&(s-=Ee.css(e,"padding"+qe[o],!0,i)),"margin"!==n&&(s-=Ee.css(e,"border"+qe[o]+"Width",!0,i))):(s+=Ee.css(e,"padding"+qe[o],!0,i),"padding"!==n&&(s+=Ee.css(e,"border"+qe[o]+"Width",!0,i)));return s}function F(e,t,n){var r,i=!0,o=lt(e),s="border-box"===Ee.css(e,"boxSizing",!1,o);if(e.getClientRects().length&&(r=e.getBoundingClientRect()[t]),r<=0||null==r){if(r=L(e,t,o),(r<0||null==r)&&(r=e.style[t]),ut.test(r))return r;i=s&&(pe.boxSizingReliable()||r===e.style[t]),r=parseFloat(r)||0}return r+B(e,t,n||(s?"border":"content"),i,o)+"px"}function H(e,t,n,r,i){return new H.prototype.init(e,t,n,r,i)}function j(){Et&&(n.requestAnimationFrame(j),Ee.fx.tick())}function G(){return n.setTimeout(function(){_t=void 0}),_t=Ee.now()}function q(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=qe[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function V(e,t,n){for(var r,i=(W.tweeners[t]||[]).concat(W.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,t,e))return r}function J(e,t,n){var r,i,o,s,a,u,l,f,d="width"in t||"height"in t,c=this,h={},p=e.style,_=e.nodeType&&Ve(e),E=Me.get(e,"fxshow");n.queue||(s=Ee._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,c.always(function(){c.always(function(){s.unqueued--,Ee.queue(e,"fx").length||s.empty.fire()})}));for(r in t)if(i=t[r],gt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(_?"hide":"show")){if("show"!==i||!E||void 0===E[r])continue;_=!0}h[r]=E&&E[r]||Ee.style(e,r)}if(u=!Ee.isEmptyObject(t),u||!Ee.isEmptyObject(h)){d&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],l=E&&E.display,null==l&&(l=Me.get(e,"display")),f=Ee.css(e,"display"),"none"===f&&(l?f=l:(R([e],!0),l=e.style.display||l,f=Ee.css(e,"display"),R([e]))),("inline"===f||"inline-block"===f&&null!=l)&&"none"===Ee.css(e,"float")&&(u||(c.done(function(){p.display=l}),null==l&&(f=p.display,l="none"===f?"":f)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",c.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),u=!1;for(r in h)u||(E?"hidden"in E&&(_=E.hidden):E=Me.access(e,"fxshow",{display:l}),o&&(E.hidden=!_),_&&R([e],!0),c.done(function(){_||R([e]),Me.remove(e,"fxshow");for(r in h)Ee.style(e,r,h[r])})),u=V(_?E[r]:0,r,c),r in E||(E[r]=u.start,_&&(u.end=u.start,u.start=0))}}function Y(e,t){var n,r,i,o,s;for(n in e)if(r=Ee.camelCase(n),i=t[r],o=e[n],Ee.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),s=Ee.cssHooks[r],s&&"expand"in s){o=s.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function W(e,t,n){var r,i,o=0,s=W.prefilters.length,a=Ee.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=_t||G(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,s=0,u=l.tweens.length;s<u;s++)l.tweens[s].run(o);return a.notifyWith(e,[l,o,n]),o<1&&u?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:Ee.extend({},t),opts:Ee.extend(!0,{specialEasing:{},easing:Ee.easing._default},n),originalProperties:t,originalOptions:n,startTime:_t||G(),duration:n.duration,tweens:[],createTween:function(t,n){var r=Ee.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(a.notifyWith(e,[l,1,0]),a.resolveWith(e,[l,t])):a.rejectWith(e,[l,t]),this}}),f=l.props;for(Y(f,l.opts.specialEasing);o<s;o++)if(r=W.prefilters[o].call(l,e,f,l.opts))return Ee.isFunction(r.stop)&&(Ee._queueHooks(l.elem,l.opts.queue).stop=Ee.proxy(r.stop,r)),r;return Ee.map(f,V,l),Ee.isFunction(l.opts.start)&&l.opts.start.call(e,l),Ee.fx.timer(Ee.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function Q(e){return e.getAttribute&&e.getAttribute("class")||""}function z(e,t,n,r){var i;if(Ee.isArray(t))Ee.each(t,function(t,i){n||Pt.test(e)?r(e,i):z(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==Ee.type(t))r(e,t);else for(i in t)z(e+"["+i+"]",t[i],n,r)}function K(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(we)||[];if(Ee.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function $(e,t,n,r){function i(a){var u;return o[a]=!0,Ee.each(e[a]||[],function(e,a){var l=a(t,n,r);return"string"!=typeof l||s||o[l]?s?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},s=e===Gt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function X(e,t){var n,r,i=Ee.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&Ee.extend(!0,e,r),e}function Z(e,t,n){for(var r,i,o,s,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==u[0]&&u.unshift(o),n[o]}function ee(e,t,n,r){var i,o,s,a,u,l={},f=e.dataTypes.slice();if(f[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];for(o=f.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=f.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(s=l[u+" "+o]||l["* "+o],!s)for(i in l)if(a=i.split(" "),a[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[i]:l[i]!==!0&&(o=a[0],f.unshift(a[1]));break}if(s!==!0)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}function te(e){return Ee.isWindow(e)?e:9===e.nodeType&&e.defaultView}var ne=[],re=n.document,ie=Object.getPrototypeOf,oe=ne.slice,se=ne.concat,ae=ne.push,ue=ne.indexOf,le={},fe=le.toString,de=le.hasOwnProperty,ce=de.toString,he=ce.call(Object),pe={},_e="3.1.0",Ee=function(e,t){return new Ee.fn.init(e,t)},ge=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ye=/^-ms-/,Re=/-([a-z])/g,me=function(e,t){return t.toUpperCase()};Ee.fn=Ee.prototype={jquery:_e,constructor:Ee,length:0,toArray:function(){return oe.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:oe.call(this)},pushStack:function(e){var t=Ee.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return Ee.each(this,e)},map:function(e){return this.pushStack(Ee.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(oe.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ae,sort:ne.sort,splice:ne.splice},Ee.extend=Ee.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||Ee.isFunction(s)||(s={}),a===u&&(s=this,a--);a<u;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(Ee.isPlainObject(r)||(i=Ee.isArray(r)))?(i?(i=!1,o=n&&Ee.isArray(n)?n:[]):o=n&&Ee.isPlainObject(n)?n:{},s[t]=Ee.extend(l,o,r)):void 0!==r&&(s[t]=r));return s},Ee.extend({expando:"jQuery"+(_e+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===Ee.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=Ee.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==fe.call(e))&&(!(t=ie(e))||(n=de.call(t,"constructor")&&t.constructor,"function"==typeof n&&ce.call(n)===he))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?le[fe.call(e)]||"object":typeof e},globalEval:function(e){s(e)},camelCase:function(e){return e.replace(ye,"ms-").replace(Re,me)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(a(e))for(n=e.length;r<n&&t.call(e[r],r,e[r])!==!1;r++);else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ge,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(a(Object(e))?Ee.merge(n,"string"==typeof e?[e]:e):ae.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:ue.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,s=e.length,a=!n;o<s;o++)r=!t(e[o],o),r!==a&&i.push(e[o]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(a(e))for(r=e.length;o<r;o++)i=t(e[o],o,n),null!=i&&s.push(i);else for(o in e)i=t(e[o],o,n),null!=i&&s.push(i);return se.apply([],s)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),Ee.isFunction(e))return r=oe.call(arguments,2),i=function(){return e.apply(t||this,r.concat(oe.call(arguments)))},i.guid=e.guid=e.guid||Ee.guid++,i},now:Date.now,support:pe}),"function"==typeof Symbol&&(Ee.fn[Symbol.iterator]=ne[Symbol.iterator]),Ee.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){le["[object "+t+"]"]=t.toLowerCase()});var Ce=function(e){function t(e,t,n,r){var i,o,s,a,u,l,f,c=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!r&&((t?t.ownerDocument||t:j)!==U&&w(t),t=t||U,k)){if(11!==p&&(u=ge.exec(e)))if(i=u[1]){if(9===p){if(!(s=t.getElementById(i)))return n;if(s.id===i)return n.push(s),n}else if(c&&(s=c.getElementById(i))&&F(t,s)&&s.id===i)return n.push(s),n}else{if(u[2])return X.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&T.getElementsByClassName&&t.getElementsByClassName)return X.apply(n,t.getElementsByClassName(i)),n}if(T.qsa&&!Y[e+" "]&&(!x||!x.test(e))){if(1!==p)c=t,f=e;else if("object"!==t.nodeName.toLowerCase()){for((a=t.getAttribute("id"))?a=a.replace(Ce,Te):t.setAttribute("id",a=H),l=I(e),o=l.length;o--;)l[o]="#"+a+" "+h(l[o]);f=l.join(","),c=ye.test(e)&&d(t.parentNode)||t}if(f)try{return X.apply(n,c.querySelectorAll(f)),n}catch(e){}finally{a===H&&t.removeAttribute("id")}}}return D(e.replace(ae,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>v.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[H]=!0,e}function i(e){var t=U.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)v.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return function(t){return"label"in t&&t.disabled===e||"form"in t&&t.disabled===e||"form"in t&&t.disabled===!1&&(t.isDisabled===e||t.isDisabled!==!e&&("label"in t||!Se(t))!==e)}}function f(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]));
})})}function d(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function c(){}function h(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function p(e,t,n){var r=t.dir,i=t.next,o=i||r,s=n&&"parentNode"===o,a=q++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||s)return e(t,n,i)}:function(t,n,u){var l,f,d,c=[G,a];if(u){for(;t=t[r];)if((1===t.nodeType||s)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||s)if(d=t[H]||(t[H]={}),f=d[t.uniqueID]||(d[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=f[o])&&l[0]===G&&l[1]===a)return c[2]=l[2];if(f[o]=c,c[2]=e(t,n,u))return!0}}}function _(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function E(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}function g(e,t,n,r,i){for(var o,s=[],a=0,u=e.length,l=null!=t;a<u;a++)(o=e[a])&&(n&&!n(o,r,i)||(s.push(o),l&&t.push(a)));return s}function y(e,t,n,i,o,s){return i&&!i[H]&&(i=y(i)),o&&!o[H]&&(o=y(o,s)),r(function(r,s,a,u){var l,f,d,c=[],h=[],p=s.length,_=r||E(t||"*",a.nodeType?[a]:a,[]),y=!e||!r&&t?_:g(_,c,e,a,u),R=n?o||(r?e:p||i)?[]:s:y;if(n&&n(y,R,a,u),i)for(l=g(R,h),i(l,[],a,u),f=l.length;f--;)(d=l[f])&&(R[h[f]]=!(y[h[f]]=d));if(r){if(o||e){if(o){for(l=[],f=R.length;f--;)(d=R[f])&&l.push(y[f]=d);o(null,R=[],l,u)}for(f=R.length;f--;)(d=R[f])&&(l=o?ee(r,d):c[f])>-1&&(r[l]=!(s[l]=d))}}else R=g(R===s?R.splice(p,R.length):R),o?o(null,s,R,u):X.apply(s,R)})}function R(e){for(var t,n,r,i=e.length,o=v.relative[e[0].type],s=o||v.relative[" "],a=o?1:0,u=p(function(e){return e===t},s,!0),l=p(function(e){return ee(t,e)>-1},s,!0),f=[function(e,n,r){var i=!o&&(r||n!==N)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];a<i;a++)if(n=v.relative[e[a].type])f=[p(_(f),n)];else{if(n=v.filter[e[a].type].apply(null,e[a].matches),n[H]){for(r=++a;r<i&&!v.relative[e[r].type];r++);return y(a>1&&_(f),a>1&&h(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),n,a<r&&R(e.slice(a,r)),r<i&&R(e=e.slice(r)),r<i&&h(e))}f.push(n)}return _(f)}function m(e,n){var i=n.length>0,o=e.length>0,s=function(r,s,a,u,l){var f,d,c,h=0,p="0",_=r&&[],E=[],y=N,R=r||o&&v.find.TAG("*",l),m=G+=null==y?1:Math.random()||.1,C=R.length;for(l&&(N=s===U||s||l);p!==C&&null!=(f=R[p]);p++){if(o&&f){for(d=0,s||f.ownerDocument===U||(w(f),a=!k);c=e[d++];)if(c(f,s||U,a)){u.push(f);break}l&&(G=m)}i&&((f=!c&&f)&&h--,r&&_.push(f))}if(h+=p,i&&p!==h){for(d=0;c=n[d++];)c(_,E,s,a);if(r){if(h>0)for(;p--;)_[p]||E[p]||(E[p]=K.call(u));E=g(E)}X.apply(u,E),l&&!r&&E.length>0&&h+n.length>1&&t.uniqueSort(u)}return l&&(G=m,N=y),_};return i?r(s):s}var C,T,v,S,A,I,b,D,N,P,O,w,U,L,k,x,M,B,F,H="sizzle"+1*new Date,j=e.document,G=0,q=0,V=n(),J=n(),Y=n(),W=function(e,t){return e===t&&(O=!0),0},Q={}.hasOwnProperty,z=[],K=z.pop,$=z.push,X=z.push,Z=z.slice,ee=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ie="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",oe=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",se=new RegExp(ne+"+","g"),ae=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ue=new RegExp("^"+ne+"*,"+ne+"*"),le=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),fe=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(oe),ce=new RegExp("^"+re+"$"),he={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,_e=/^h\d$/i,Ee=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,Re=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),me=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Ce=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,Te=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ve=function(){w()},Se=p(function(e){return e.disabled===!0},{dir:"parentNode",next:"legend"});try{X.apply(z=Z.call(j.childNodes),j.childNodes),z[j.childNodes.length].nodeType}catch(e){X={apply:z.length?function(e,t){$.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}T=t.support={},A=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},w=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:j;return r!==U&&9===r.nodeType&&r.documentElement?(U=r,L=U.documentElement,k=!A(U),j!==U&&(n=U.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ve,!1):n.attachEvent&&n.attachEvent("onunload",ve)),T.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),T.getElementsByTagName=i(function(e){return e.appendChild(U.createComment("")),!e.getElementsByTagName("*").length}),T.getElementsByClassName=Ee.test(U.getElementsByClassName),T.getById=i(function(e){return L.appendChild(e).id=H,!U.getElementsByName||!U.getElementsByName(H).length}),T.getById?(v.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&k){var n=t.getElementById(e);return n?[n]:[]}},v.filter.ID=function(e){var t=e.replace(Re,me);return function(e){return e.getAttribute("id")===t}}):(delete v.find.ID,v.filter.ID=function(e){var t=e.replace(Re,me);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),v.find.TAG=T.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):T.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},v.find.CLASS=T.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&k)return t.getElementsByClassName(e)},M=[],x=[],(T.qsa=Ee.test(U.querySelectorAll))&&(i(function(e){L.appendChild(e).innerHTML="<a id='"+H+"'></a><select id='"+H+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&x.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||x.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+H+"-]").length||x.push("~="),e.querySelectorAll(":checked").length||x.push(":checked"),e.querySelectorAll("a#"+H+"+*").length||x.push(".#.+[+~]")}),i(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=U.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&x.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&x.push(":enabled",":disabled"),L.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&x.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),x.push(",.*:")})),(T.matchesSelector=Ee.test(B=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i(function(e){T.disconnectedMatch=B.call(e,"*"),B.call(e,"[s!='']:x"),M.push("!=",oe)}),x=x.length&&new RegExp(x.join("|")),M=M.length&&new RegExp(M.join("|")),t=Ee.test(L.compareDocumentPosition),F=t||Ee.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},W=t?function(e,t){if(e===t)return O=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!T.sortDetached&&t.compareDocumentPosition(e)===n?e===U||e.ownerDocument===j&&F(j,e)?-1:t===U||t.ownerDocument===j&&F(j,t)?1:P?ee(P,e)-ee(P,t):0:4&n?-1:1)}:function(e,t){if(e===t)return O=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],u=[t];if(!i||!o)return e===U?-1:t===U?1:i?-1:o?1:P?ee(P,e)-ee(P,t):0;if(i===o)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?s(a[r],u[r]):a[r]===j?-1:u[r]===j?1:0},U):U},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==U&&w(e),n=n.replace(fe,"='$1']"),T.matchesSelector&&k&&!Y[n+" "]&&(!M||!M.test(n))&&(!x||!x.test(n)))try{var r=B.call(e,n);if(r||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,U,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==U&&w(e),F(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==U&&w(e);var n=v.attrHandle[t.toLowerCase()],r=n&&Q.call(v.attrHandle,t.toLowerCase())?n(e,t,!k):void 0;return void 0!==r?r:T.attributes||!k?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(Ce,Te)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(O=!T.detectDuplicates,P=!T.sortStable&&e.slice(0),e.sort(W),O){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return P=null,e},S=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=S(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=S(t);return n},v=t.selectors={cacheLength:50,createPseudo:r,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Re,me),e[3]=(e[3]||e[4]||e[5]||"").replace(Re,me),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=I(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Re,me).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=V[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&V(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(se," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,f,d,c,h,p,_=o!==s?"nextSibling":"previousSibling",E=t.parentNode,g=a&&t.nodeName.toLowerCase(),y=!u&&!a,R=!1;if(E){if(o){for(;_;){for(c=t;c=c[_];)if(a?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;p=_="only"===e&&!p&&"nextSibling"}return!0}if(p=[s?E.firstChild:E.lastChild],s&&y){for(c=E,d=c[H]||(c[H]={}),f=d[c.uniqueID]||(d[c.uniqueID]={}),l=f[e]||[],h=l[0]===G&&l[1],R=h&&l[2],c=h&&E.childNodes[h];c=++h&&c&&c[_]||(R=h=0)||p.pop();)if(1===c.nodeType&&++R&&c===t){f[e]=[G,h,R];break}}else if(y&&(c=t,d=c[H]||(c[H]={}),f=d[c.uniqueID]||(d[c.uniqueID]={}),l=f[e]||[],h=l[0]===G&&l[1],R=h),R===!1)for(;(c=++h&&c&&c[_]||(R=h=0)||p.pop())&&((a?c.nodeName.toLowerCase()!==g:1!==c.nodeType)||!++R||(y&&(d=c[H]||(c[H]={}),f=d[c.uniqueID]||(d[c.uniqueID]={}),f[e]=[G,R]),c!==t)););return R-=i,R===r||R%r===0&&R/r>=0}}},PSEUDO:function(e,n){var i,o=v.pseudos[e]||v.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[H]?o(n):o.length>1?(i=[e,e,"",n],v.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),s=i.length;s--;)r=ee(e,i[s]),e[r]=!(t[r]=i[s])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=b(e.replace(ae,"$1"));return i[H]?r(function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(Re,me),function(t){return(t.textContent||t.innerText||S(t)).indexOf(e)>-1}}),lang:r(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(Re,me).toLowerCase(),function(t){var n;do if(n=k?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===U.activeElement&&(!U.hasFocus||U.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:l(!1),disabled:l(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!v.pseudos.empty(e)},header:function(e){return _e.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:f(function(){return[0]}),last:f(function(e,t){return[t-1]}),eq:f(function(e,t,n){return[n<0?n+t:n]}),even:f(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:f(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:f(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:f(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},v.pseudos.nth=v.pseudos.eq;for(C in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})v.pseudos[C]=a(C);for(C in{submit:!0,reset:!0})v.pseudos[C]=u(C);return c.prototype=v.filters=v.pseudos,v.setFilters=new c,I=t.tokenize=function(e,n){var r,i,o,s,a,u,l,f=J[e+" "];if(f)return n?0:f.slice(0);for(a=e,u=[],l=v.preFilter;a;){r&&!(i=ue.exec(a))||(i&&(a=a.slice(i[0].length)||a),u.push(o=[])),r=!1,(i=le.exec(a))&&(r=i.shift(),o.push({value:r,type:i[0].replace(ae," ")}),a=a.slice(r.length));for(s in v.filter)!(i=he[s].exec(a))||l[s]&&!(i=l[s](i))||(r=i.shift(),o.push({value:r,type:s,matches:i}),a=a.slice(r.length));if(!r)break}return n?a.length:a?t.error(e):J(e,u).slice(0)},b=t.compile=function(e,t){var n,r=[],i=[],o=Y[e+" "];if(!o){for(t||(t=I(e)),n=t.length;n--;)o=R(t[n]),o[H]?r.push(o):i.push(o);o=Y(e,m(i,r)),o.selector=e}return o},D=t.select=function(e,t,n,r){var i,o,s,a,u,l="function"==typeof e&&e,f=!r&&I(e=l.selector||e);if(n=n||[],1===f.length){if(o=f[0]=f[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&T.getById&&9===t.nodeType&&k&&v.relative[o[1].type]){if(t=(v.find.ID(s.matches[0].replace(Re,me),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=he.needsContext.test(e)?0:o.length;i--&&(s=o[i],!v.relative[a=s.type]);)if((u=v.find[a])&&(r=u(s.matches[0].replace(Re,me),ye.test(o[0].type)&&d(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&h(o),!e)return X.apply(n,r),n;break}}return(l||b(e,f))(r,t,!k,n,!t||ye.test(e)&&d(t.parentNode)||t),n},T.sortStable=H.split("").sort(W).join("")===H,T.detectDuplicates=!!O,w(),T.sortDetached=i(function(e){return 1&e.compareDocumentPosition(U.createElement("fieldset"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),T.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(n);Ee.find=Ce,Ee.expr=Ce.selectors,Ee.expr[":"]=Ee.expr.pseudos,Ee.uniqueSort=Ee.unique=Ce.uniqueSort,Ee.text=Ce.getText,Ee.isXMLDoc=Ce.isXML,Ee.contains=Ce.contains,Ee.escapeSelector=Ce.escape;var Te=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&Ee(e).is(n))break;r.push(e)}return r},ve=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Se=Ee.expr.match.needsContext,Ae=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Ie=/^.[^:#\[\.,]*$/;Ee.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?Ee.find.matchesSelector(r,e)?[r]:[]:Ee.find.matches(e,Ee.grep(t,function(e){return 1===e.nodeType}))},Ee.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(Ee(e).filter(function(){for(t=0;t<r;t++)if(Ee.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)Ee.find(e,i[t],n);return r>1?Ee.uniqueSort(n):n},filter:function(e){return this.pushStack(u(this,e||[],!1))},not:function(e){return this.pushStack(u(this,e||[],!0))},is:function(e){return!!u(this,"string"==typeof e&&Se.test(e)?Ee(e):e||[],!1).length}});var be,De=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Ne=Ee.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||be,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:De.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof Ee?t[0]:t,Ee.merge(this,Ee.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Ae.test(r[1])&&Ee.isPlainObject(t))for(r in t)Ee.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=re.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):Ee.isFunction(e)?void 0!==n.ready?n.ready(e):e(Ee):Ee.makeArray(e,this)};Ne.prototype=Ee.fn,be=Ee(re);var Pe=/^(?:parents|prev(?:Until|All))/,Oe={children:!0,contents:!0,next:!0,prev:!0};Ee.fn.extend({has:function(e){var t=Ee(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(Ee.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],s="string"!=typeof e&&Ee(e);if(!Se.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&Ee.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?Ee.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?ue.call(Ee(e),this[0]):ue.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Ee.uniqueSort(Ee.merge(this.get(),Ee(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Ee.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Te(e,"parentNode")},parentsUntil:function(e,t,n){return Te(e,"parentNode",n)},next:function(e){return l(e,"nextSibling")},prev:function(e){return l(e,"previousSibling")},nextAll:function(e){return Te(e,"nextSibling")},prevAll:function(e){return Te(e,"previousSibling")},nextUntil:function(e,t,n){return Te(e,"nextSibling",n)},prevUntil:function(e,t,n){return Te(e,"previousSibling",n)},siblings:function(e){return ve((e.parentNode||{}).firstChild,e)},children:function(e){return ve(e.firstChild)},contents:function(e){return e.contentDocument||Ee.merge([],e.childNodes)}},function(e,t){Ee.fn[e]=function(n,r){var i=Ee.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=Ee.filter(r,i)),this.length>1&&(Oe[e]||Ee.uniqueSort(i),Pe.test(e)&&i.reverse()),this.pushStack(i)}});var we=/\S+/g;Ee.Callbacks=function(e){e="string"==typeof e?f(e):Ee.extend({},e);var t,n,r,i,o=[],s=[],a=-1,u=function(){for(i=e.once,r=t=!0;s.length;a=-1)for(n=s.shift();++a<o.length;)o[a].apply(n[0],n[1])===!1&&e.stopOnFalse&&(a=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(a=o.length-1,s.push(n)),function t(n){Ee.each(n,function(n,r){Ee.isFunction(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==Ee.type(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return Ee.each(arguments,function(e,t){for(var n;(n=Ee.inArray(t,o,n))>-1;)o.splice(n,1),n<=a&&a--}),this},has:function(e){return e?Ee.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},Ee.extend({Deferred:function(e){var t=[["notify","progress",Ee.Callbacks("memory"),Ee.Callbacks("memory"),2],["resolve","done",Ee.Callbacks("once memory"),Ee.Callbacks("once memory"),0,"resolved"],["reject","fail",Ee.Callbacks("once memory"),Ee.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return Ee.Deferred(function(n){Ee.each(t,function(t,r){var i=Ee.isFunction(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&Ee.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,r,i){function o(e,t,r,i){return function(){var a=this,u=arguments,l=function(){var n,l;if(!(e<s)){if(n=r.apply(a,u),n===t.promise())throw new TypeError("Thenable self-resolution");l=n&&("object"==typeof n||"function"==typeof n)&&n.then,Ee.isFunction(l)?i?l.call(n,o(s,t,d,i),o(s,t,c,i)):(s++,l.call(n,o(s,t,d,i),o(s,t,c,i),o(s,t,d,t.notifyWith))):(r!==d&&(a=void 0,u=[n]),(i||t.resolveWith)(a,u))}},f=i?l:function(){try{l()}catch(n){Ee.Deferred.exceptionHook&&Ee.Deferred.exceptionHook(n,f.stackTrace),e+1>=s&&(r!==c&&(a=void 0,u=[n]),t.rejectWith(a,u))}};e?f():(Ee.Deferred.getStackHook&&(f.stackTrace=Ee.Deferred.getStackHook()),n.setTimeout(f))}}var s=0;return Ee.Deferred(function(n){t[0][3].add(o(0,n,Ee.isFunction(i)?i:d,n.notifyWith)),t[1][3].add(o(0,n,Ee.isFunction(e)?e:d)),t[2][3].add(o(0,n,Ee.isFunction(r)?r:c))}).promise()},promise:function(e){return null!=e?Ee.extend(e,i):i}},o={};return Ee.each(t,function(e,n){var s=n[2],a=n[5];i[n[1]]=s.add,a&&s.add(function(){r=a},t[3-e][2].disable,t[0][2].lock),s.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=s.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=oe.call(arguments),o=Ee.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?oe.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(h(e,o.done(s(n)).resolve,o.reject),"pending"===o.state()||Ee.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)h(i[n],s(n),o.reject);return o.promise()}});var Ue=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;Ee.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&Ue.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},Ee.readyException=function(e){n.setTimeout(function(){throw e})};var Le=Ee.Deferred();Ee.fn.ready=function(e){return Le.then(e).catch(function(e){Ee.readyException(e)}),this},Ee.extend({isReady:!1,readyWait:1,holdReady:function(e){e?Ee.readyWait++:Ee.ready(!0)},ready:function(e){(e===!0?--Ee.readyWait:Ee.isReady)||(Ee.isReady=!0,e!==!0&&--Ee.readyWait>0||Le.resolveWith(re,[Ee]))}}),Ee.ready.then=Le.then,"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll?n.setTimeout(Ee.ready):(re.addEventListener("DOMContentLoaded",p),n.addEventListener("load",p));var ke=function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===Ee.type(n)){i=!0;for(a in n)ke(e,t,a,n[a],!0,o,s)}else if(void 0!==r&&(i=!0,Ee.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(Ee(e),n)})),t))for(;a<u;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},xe=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};_.uid=1,_.prototype={cache:function(e){var t=e[this.expando];return t||(t={},xe(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[Ee.camelCase(t)]=n;else for(r in t)i[Ee.camelCase(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][Ee.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){Ee.isArray(t)?t=t.map(Ee.camelCase):(t=Ee.camelCase(t),t=t in r?[t]:t.match(we)||[]),n=t.length;for(;n--;)delete r[t[n]]}(void 0===t||Ee.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!Ee.isEmptyObject(t)}};var Me=new _,Be=new _,Fe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,He=/[A-Z]/g;Ee.extend({hasData:function(e){return Be.hasData(e)||Me.hasData(e)},data:function(e,t,n){return Be.access(e,t,n)},removeData:function(e,t){Be.remove(e,t)},_data:function(e,t,n){return Me.access(e,t,n)},_removeData:function(e,t){Me.remove(e,t)}}),Ee.fn.extend({data:function(e,t){var n,r,i,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(i=Be.get(o),1===o.nodeType&&!Me.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=Ee.camelCase(r.slice(5)),E(o,r,i[r])));Me.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){Be.set(this,e)}):ke(this,function(t){var n;if(o&&void 0===t){if(n=Be.get(o,e),void 0!==n)return n;if(n=E(o,e),void 0!==n)return n}else this.each(function(){Be.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Be.remove(this,e)})}}),Ee.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Me.get(e,t),n&&(!r||Ee.isArray(n)?r=Me.access(e,t,Ee.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=Ee.queue(e,t),r=n.length,i=n.shift(),o=Ee._queueHooks(e,t),s=function(){Ee.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Me.get(e,n)||Me.access(e,n,{empty:Ee.Callbacks("once memory").add(function(){Me.remove(e,[t+"queue",n])})})}}),Ee.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?Ee.queue(this[0],e):void 0===t?this:this.each(function(){var n=Ee.queue(this,e,t);Ee._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&Ee.dequeue(this,e)})},dequeue:function(e){return this.each(function(){Ee.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=Ee.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)n=Me.get(o[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var je=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ge=new RegExp("^(?:([+-])=|)("+je+")([a-z%]*)$","i"),qe=["Top","Right","Bottom","Left"],Ve=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&Ee.contains(e.ownerDocument,e)&&"none"===Ee.css(e,"display")},Je=function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i},Ye={};Ee.fn.extend({show:function(){return R(this,!0)},hide:function(){return R(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ve(this)?Ee(this).show():Ee(this).hide()})}});var We=/^(?:checkbox|radio)$/i,Qe=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ze=/^$|\/(?:java|ecma)script/i,Ke={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ke.optgroup=Ke.option,Ke.tbody=Ke.tfoot=Ke.colgroup=Ke.caption=Ke.thead,Ke.th=Ke.td;var $e=/<|&#?\w+;/;!function(){var e=re.createDocumentFragment(),t=e.appendChild(re.createElement("div")),n=re.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),pe.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",pe.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Xe=re.documentElement,Ze=/^key/,et=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,tt=/^([^.]*)(?:\.(.+)|)/;Ee.event={global:{},add:function(e,t,n,r,i){var o,s,a,u,l,f,d,c,h,p,_,E=Me.get(e);if(E)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&Ee.find.matchesSelector(Xe,i),n.guid||(n.guid=Ee.guid++),(u=E.events)||(u=E.events={}),(s=E.handle)||(s=E.handle=function(t){return"undefined"!=typeof Ee&&Ee.event.triggered!==t.type?Ee.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(we)||[""],l=t.length;l--;)a=tt.exec(t[l])||[],h=_=a[1],p=(a[2]||"").split(".").sort(),h&&(d=Ee.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,d=Ee.event.special[h]||{},f=Ee.extend({type:h,origType:_,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&Ee.expr.match.needsContext.test(i),namespace:p.join(".")},o),(c=u[h])||(c=u[h]=[],c.delegateCount=0,d.setup&&d.setup.call(e,r,p,s)!==!1||e.addEventListener&&e.addEventListener(h,s)),d.add&&(d.add.call(e,f),f.handler.guid||(f.handler.guid=n.guid)),i?c.splice(c.delegateCount++,0,f):c.push(f),Ee.event.global[h]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,l,f,d,c,h,p,_,E=Me.hasData(e)&&Me.get(e);if(E&&(u=E.events)){for(t=(t||"").match(we)||[""],l=t.length;l--;)if(a=tt.exec(t[l])||[],h=_=a[1],p=(a[2]||"").split(".").sort(),h){for(d=Ee.event.special[h]||{},h=(r?d.delegateType:d.bindType)||h,c=u[h]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=c.length;o--;)f=c[o],!i&&_!==f.origType||n&&n.guid!==f.guid||a&&!a.test(f.namespace)||r&&r!==f.selector&&("**"!==r||!f.selector)||(c.splice(o,1),f.selector&&c.delegateCount--,d.remove&&d.remove.call(e,f));s&&!c.length&&(d.teardown&&d.teardown.call(e,p,E.handle)!==!1||Ee.removeEvent(e,h,E.handle),delete u[h])}else for(h in u)Ee.event.remove(e,h+t[l],n,r,!0);Ee.isEmptyObject(u)&&Me.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,s,a=Ee.event.fix(e),u=new Array(arguments.length),l=(Me.get(this,"events")||{})[a.type]||[],f=Ee.event.special[a.type]||{};
for(u[0]=a,t=1;t<arguments.length;t++)u[t]=arguments[t];if(a.delegateTarget=this,!f.preDispatch||f.preDispatch.call(this,a)!==!1){for(s=Ee.event.handlers.call(this,a,l),t=0;(i=s[t++])&&!a.isPropagationStopped();)for(a.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(o.namespace)||(a.handleObj=o,a.data=o.data,r=((Ee.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u),void 0!==r&&(a.result=r)===!1&&(a.preventDefault(),a.stopPropagation()));return f.postDispatch&&f.postDispatch.call(this,a),a.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n<a;n++)o=t[n],i=o.selector+" ",void 0===r[i]&&(r[i]=o.needsContext?Ee(i,this).index(u)>-1:Ee.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return a<t.length&&s.push({elem:this,handlers:t.slice(a)}),s},addProp:function(e,t){Object.defineProperty(Ee.Event.prototype,e,{enumerable:!0,configurable:!0,get:Ee.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[Ee.expando]?e:new Ee.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==A()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===A()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&Ee.nodeName(this,"input"))return this.click(),!1},_default:function(e){return Ee.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},Ee.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},Ee.Event=function(e,t){return this instanceof Ee.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?v:S,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&Ee.extend(this,t),this.timeStamp=e&&e.timeStamp||Ee.now(),void(this[Ee.expando]=!0)):new Ee.Event(e,t)},Ee.Event.prototype={constructor:Ee.Event,isDefaultPrevented:S,isPropagationStopped:S,isImmediatePropagationStopped:S,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=v,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=v,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=v,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},Ee.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Ze.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&et.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},Ee.event.addProp),Ee.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){Ee.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||Ee.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),Ee.fn.extend({on:function(e,t,n,r){return I(this,e,t,n,r)},one:function(e,t,n,r){return I(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,Ee(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return t!==!1&&"function"!=typeof t||(n=t,t=void 0),n===!1&&(n=S),this.each(function(){Ee.event.remove(this,e,n,t)})}});var nt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,rt=/<script|<style|<link/i,it=/checked\s*(?:[^=]|=\s*.checked.)/i,ot=/^true\/(.*)/,st=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;Ee.extend({htmlPrefilter:function(e){return e.replace(nt,"<$1></$2>")},clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=Ee.contains(e.ownerDocument,e);if(!(pe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Ee.isXMLDoc(e)))for(s=m(a),o=m(e),r=0,i=o.length;r<i;r++)O(o[r],s[r]);if(t)if(n)for(o=o||m(e),s=s||m(a),r=0,i=o.length;r<i;r++)P(o[r],s[r]);else P(e,a);return s=m(a,"script"),s.length>0&&C(s,!u&&m(e,"script")),a},cleanData:function(e){for(var t,n,r,i=Ee.event.special,o=0;void 0!==(n=e[o]);o++)if(xe(n)){if(t=n[Me.expando]){if(t.events)for(r in t.events)i[r]?Ee.event.remove(n,r):Ee.removeEvent(n,r,t.handle);n[Me.expando]=void 0}n[Be.expando]&&(n[Be.expando]=void 0)}}}),Ee.fn.extend({detach:function(e){return U(this,e,!0)},remove:function(e){return U(this,e)},text:function(e){return ke(this,function(e){return void 0===e?Ee.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return w(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=b(this,e);t.appendChild(e)}})},prepend:function(){return w(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=b(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return w(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return w(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Ee.cleanData(m(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return Ee.clone(this,e,t)})},html:function(e){return ke(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!rt.test(e)&&!Ke[(Qe.exec(e)||["",""])[1].toLowerCase()]){e=Ee.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(Ee.cleanData(m(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return w(this,arguments,function(t){var n=this.parentNode;Ee.inArray(this,e)<0&&(Ee.cleanData(m(this)),n&&n.replaceChild(t,this))},e)}}),Ee.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Ee.fn[e]=function(e){for(var n,r=[],i=Ee(e),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),Ee(i[s])[t](n),ae.apply(r,n.get());return this.pushStack(r)}});var at=/^margin/,ut=new RegExp("^("+je+")(?!px)[a-z%]+$","i"),lt=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)};!function(){function e(){if(a){a.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Xe.appendChild(s);var e=n.getComputedStyle(a);t="1%"!==e.top,o="2px"===e.marginLeft,r="4px"===e.width,a.style.marginRight="50%",i="4px"===e.marginRight,Xe.removeChild(s),a=null}}var t,r,i,o,s=re.createElement("div"),a=re.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",pe.clearCloneStyle="content-box"===a.style.backgroundClip,s.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",s.appendChild(a),Ee.extend(pe,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return e(),r},pixelMarginRight:function(){return e(),i},reliableMarginLeft:function(){return e(),o}}))}();var ft=/^(none|table(?!-c[ea]).+)/,dt={position:"absolute",visibility:"hidden",display:"block"},ct={letterSpacing:"0",fontWeight:"400"},ht=["Webkit","Moz","ms"],pt=re.createElement("div").style;Ee.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=L(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=Ee.camelCase(t),u=e.style;return t=Ee.cssProps[a]||(Ee.cssProps[a]=x(a)||a),s=Ee.cssHooks[t]||Ee.cssHooks[a],void 0===n?s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:u[t]:(o=typeof n,"string"===o&&(i=Ge.exec(n))&&i[1]&&(n=g(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(Ee.cssNumber[a]?"":"px")),pe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(u[t]=n)),void 0)}},css:function(e,t,n,r){var i,o,s,a=Ee.camelCase(t);return t=Ee.cssProps[a]||(Ee.cssProps[a]=x(a)||a),s=Ee.cssHooks[t]||Ee.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=L(e,t,r)),"normal"===i&&t in ct&&(i=ct[t]),""===n||n?(o=parseFloat(i),n===!0||isFinite(o)?o||0:i):i}}),Ee.each(["height","width"],function(e,t){Ee.cssHooks[t]={get:function(e,n,r){if(n)return!ft.test(Ee.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?F(e,t,r):Je(e,dt,function(){return F(e,t,r)})},set:function(e,n,r){var i,o=r&&lt(e),s=r&&B(e,t,r,"border-box"===Ee.css(e,"boxSizing",!1,o),o);return s&&(i=Ge.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=Ee.css(e,t)),M(e,n,s)}}}),Ee.cssHooks.marginLeft=k(pe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(L(e,"marginLeft"))||e.getBoundingClientRect().left-Je(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),Ee.each({margin:"",padding:"",border:"Width"},function(e,t){Ee.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+qe[r]+t]=o[r]||o[r-2]||o[0];return i}},at.test(e)||(Ee.cssHooks[e+t].set=M)}),Ee.fn.extend({css:function(e,t){return ke(this,function(e,t,n){var r,i,o={},s=0;if(Ee.isArray(t)){for(r=lt(e),i=t.length;s<i;s++)o[t[s]]=Ee.css(e,t[s],!1,r);return o}return void 0!==n?Ee.style(e,t,n):Ee.css(e,t)},e,t,arguments.length>1)}}),Ee.Tween=H,H.prototype={constructor:H,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||Ee.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(Ee.cssNumber[n]?"":"px")},cur:function(){var e=H.propHooks[this.prop];return e&&e.get?e.get(this):H.propHooks._default.get(this)},run:function(e){var t,n=H.propHooks[this.prop];return this.options.duration?this.pos=t=Ee.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):H.propHooks._default.set(this),this}},H.prototype.init.prototype=H.prototype,H.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=Ee.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){Ee.fx.step[e.prop]?Ee.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[Ee.cssProps[e.prop]]&&!Ee.cssHooks[e.prop]?e.elem[e.prop]=e.now:Ee.style(e.elem,e.prop,e.now+e.unit)}}},H.propHooks.scrollTop=H.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Ee.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},Ee.fx=H.prototype.init,Ee.fx.step={};var _t,Et,gt=/^(?:toggle|show|hide)$/,yt=/queueHooks$/;Ee.Animation=Ee.extend(W,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return g(n.elem,e,Ge.exec(t),n),n}]},tweener:function(e,t){Ee.isFunction(e)?(t=e,e=["*"]):e=e.match(we);for(var n,r=0,i=e.length;r<i;r++)n=e[r],W.tweeners[n]=W.tweeners[n]||[],W.tweeners[n].unshift(t)},prefilters:[J],prefilter:function(e,t){t?W.prefilters.unshift(e):W.prefilters.push(e)}}),Ee.speed=function(e,t,n){var r=e&&"object"==typeof e?Ee.extend({},e):{complete:n||!n&&t||Ee.isFunction(e)&&e,duration:e,easing:n&&t||t&&!Ee.isFunction(t)&&t};return Ee.fx.off||re.hidden?r.duration=0:r.duration="number"==typeof r.duration?r.duration:r.duration in Ee.fx.speeds?Ee.fx.speeds[r.duration]:Ee.fx.speeds._default,null!=r.queue&&r.queue!==!0||(r.queue="fx"),r.old=r.complete,r.complete=function(){Ee.isFunction(r.old)&&r.old.call(this),r.queue&&Ee.dequeue(this,r.queue)},r},Ee.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Ve).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=Ee.isEmptyObject(e),o=Ee.speed(t,n,r),s=function(){var t=W(this,Ee.extend({},e),o);(i||Me.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=Ee.timers,s=Me.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&yt.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||Ee.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=Me.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=Ee.timers,s=r?r.length:0;for(n.finish=!0,Ee.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),Ee.each(["toggle","show","hide"],function(e,t){var n=Ee.fn[t];Ee.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(q(t,!0),e,r,i)}}),Ee.each({slideDown:q("show"),slideUp:q("hide"),slideToggle:q("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Ee.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),Ee.timers=[],Ee.fx.tick=function(){var e,t=0,n=Ee.timers;for(_t=Ee.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||Ee.fx.stop(),_t=void 0},Ee.fx.timer=function(e){Ee.timers.push(e),e()?Ee.fx.start():Ee.timers.pop()},Ee.fx.interval=13,Ee.fx.start=function(){Et||(Et=n.requestAnimationFrame?n.requestAnimationFrame(j):n.setInterval(Ee.fx.tick,Ee.fx.interval))},Ee.fx.stop=function(){n.cancelAnimationFrame?n.cancelAnimationFrame(Et):n.clearInterval(Et),Et=null},Ee.fx.speeds={slow:600,fast:200,_default:400},Ee.fn.delay=function(e,t){return e=Ee.fx?Ee.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,r){var i=n.setTimeout(t,e);r.stop=function(){n.clearTimeout(i)}})},function(){var e=re.createElement("input"),t=re.createElement("select"),n=t.appendChild(re.createElement("option"));e.type="checkbox",pe.checkOn=""!==e.value,pe.optSelected=n.selected,e=re.createElement("input"),e.value="t",e.type="radio",pe.radioValue="t"===e.value}();var Rt,mt=Ee.expr.attrHandle;Ee.fn.extend({attr:function(e,t){return ke(this,Ee.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Ee.removeAttr(this,e)})}}),Ee.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?Ee.prop(e,t,n):(1===o&&Ee.isXMLDoc(e)||(i=Ee.attrHooks[t.toLowerCase()]||(Ee.expr.match.bool.test(t)?Rt:void 0)),void 0!==n?null===n?void Ee.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=Ee.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!pe.radioValue&&"radio"===t&&Ee.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(we);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),Rt={set:function(e,t,n){return t===!1?Ee.removeAttr(e,n):e.setAttribute(n,n),n}},Ee.each(Ee.expr.match.bool.source.match(/\w+/g),function(e,t){var n=mt[t]||Ee.find.attr;mt[t]=function(e,t,r){var i,o,s=t.toLowerCase();return r||(o=mt[s],mt[s]=i,i=null!=n(e,t,r)?s:null,mt[s]=o),i}});var Ct=/^(?:input|select|textarea|button)$/i,Tt=/^(?:a|area)$/i;Ee.fn.extend({prop:function(e,t){return ke(this,Ee.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[Ee.propFix[e]||e]})}}),Ee.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&Ee.isXMLDoc(e)||(t=Ee.propFix[t]||t,i=Ee.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=Ee.find.attr(e,"tabindex");return t?parseInt(t,10):Ct.test(e.nodeName)||Tt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),pe.optSelected||(Ee.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),Ee.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Ee.propFix[this.toLowerCase()]=this});var vt=/[\t\r\n\f]/g;Ee.fn.extend({addClass:function(e){var t,n,r,i,o,s,a,u=0;if(Ee.isFunction(e))return this.each(function(t){Ee(this).addClass(e.call(this,t,Q(this)))});if("string"==typeof e&&e)for(t=e.match(we)||[];n=this[u++];)if(i=Q(n),r=1===n.nodeType&&(" "+i+" ").replace(vt," ")){for(s=0;o=t[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");a=Ee.trim(r),i!==a&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,i,o,s,a,u=0;if(Ee.isFunction(e))return this.each(function(t){Ee(this).removeClass(e.call(this,t,Q(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(we)||[];n=this[u++];)if(i=Q(n),r=1===n.nodeType&&(" "+i+" ").replace(vt," ")){for(s=0;o=t[s++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");a=Ee.trim(r),i!==a&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):Ee.isFunction(e)?this.each(function(n){Ee(this).toggleClass(e.call(this,n,Q(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=Ee(this),o=e.match(we)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=Q(this),t&&Me.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Me.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+Q(n)+" ").replace(vt," ").indexOf(t)>-1)return!0;return!1}});var St=/\r/g,At=/[\x20\t\r\n\f]+/g;Ee.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=Ee.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,Ee(this).val()):e,null==i?i="":"number"==typeof i?i+="":Ee.isArray(i)&&(i=Ee.map(i,function(e){return null==e?"":e+""})),t=Ee.valHooks[this.type]||Ee.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=Ee.valHooks[i.type]||Ee.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(St,""):null==n?"":n)}}}),Ee.extend({valHooks:{option:{get:function(e){var t=Ee.find.attr(e,"value");return null!=t?t:Ee.trim(Ee.text(e)).replace(At," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type,s=o?null:[],a=o?i+1:r.length,u=i<0?a:o?i:0;u<a;u++)if(n=r[u],(n.selected||u===i)&&!n.disabled&&(!n.parentNode.disabled||!Ee.nodeName(n.parentNode,"optgroup"))){if(t=Ee(n).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=Ee.makeArray(t),s=i.length;s--;)r=i[s],(r.selected=Ee.inArray(Ee.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),Ee.each(["radio","checkbox"],function(){Ee.valHooks[this]={set:function(e,t){if(Ee.isArray(t))return e.checked=Ee.inArray(Ee(e).val(),t)>-1}},pe.checkOn||(Ee.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var It=/^(?:focusinfocus|focusoutblur)$/;Ee.extend(Ee.event,{trigger:function(e,t,r,i){var o,s,a,u,l,f,d,c=[r||re],h=de.call(e,"type")?e.type:e,p=de.call(e,"namespace")?e.namespace.split("."):[];if(s=a=r=r||re,3!==r.nodeType&&8!==r.nodeType&&!It.test(h+Ee.event.triggered)&&(h.indexOf(".")>-1&&(p=h.split("."),h=p.shift(),p.sort()),l=h.indexOf(":")<0&&"on"+h,e=e[Ee.expando]?e:new Ee.Event(h,"object"==typeof e&&e),e.isTrigger=i?2:3,e.namespace=p.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:Ee.makeArray(t,[e]),d=Ee.event.special[h]||{},i||!d.trigger||d.trigger.apply(r,t)!==!1)){if(!i&&!d.noBubble&&!Ee.isWindow(r)){for(u=d.delegateType||h,It.test(u+h)||(s=s.parentNode);s;s=s.parentNode)c.push(s),a=s;a===(r.ownerDocument||re)&&c.push(a.defaultView||a.parentWindow||n)}for(o=0;(s=c[o++])&&!e.isPropagationStopped();)e.type=o>1?u:d.bindType||h,f=(Me.get(s,"events")||{})[e.type]&&Me.get(s,"handle"),f&&f.apply(s,t),f=l&&s[l],f&&f.apply&&xe(s)&&(e.result=f.apply(s,t),e.result===!1&&e.preventDefault());return e.type=h,i||e.isDefaultPrevented()||d._default&&d._default.apply(c.pop(),t)!==!1||!xe(r)||l&&Ee.isFunction(r[h])&&!Ee.isWindow(r)&&(a=r[l],a&&(r[l]=null),Ee.event.triggered=h,r[h](),Ee.event.triggered=void 0,a&&(r[l]=a)),e.result}},simulate:function(e,t,n){var r=Ee.extend(new Ee.Event,n,{type:e,isSimulated:!0});Ee.event.trigger(r,null,t)}}),Ee.fn.extend({trigger:function(e,t){return this.each(function(){Ee.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return Ee.event.trigger(e,t,n,!0)}}),Ee.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){Ee.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),Ee.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),pe.focusin="onfocusin"in n,pe.focusin||Ee.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){Ee.event.simulate(t,e.target,Ee.event.fix(e))};Ee.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Me.access(r,t);i||r.addEventListener(e,n,!0),Me.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Me.access(r,t)-1;i?Me.access(r,t,i):(r.removeEventListener(e,n,!0),Me.remove(r,t))}}});var bt=n.location,Dt=Ee.now(),Nt=/\?/;Ee.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||Ee.error("Invalid XML: "+e),t};var Pt=/\[\]$/,Ot=/\r?\n/g,wt=/^(?:submit|button|image|reset|file)$/i,Ut=/^(?:input|select|textarea|keygen)/i;Ee.param=function(e,t){var n,r=[],i=function(e,t){var n=Ee.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Ee.isArray(e)||e.jquery&&!Ee.isPlainObject(e))Ee.each(e,function(){i(this.name,this.value)});else for(n in e)z(n,e[n],t,i);return r.join("&")},Ee.fn.extend({serialize:function(){return Ee.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=Ee.prop(this,"elements");return e?Ee.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!Ee(this).is(":disabled")&&Ut.test(this.nodeName)&&!wt.test(e)&&(this.checked||!We.test(e))}).map(function(e,t){var n=Ee(this).val();return null==n?null:Ee.isArray(n)?Ee.map(n,function(e){return{name:t.name,value:e.replace(Ot,"\r\n")}}):{name:t.name,value:n.replace(Ot,"\r\n")}}).get()}});var Lt=/%20/g,kt=/#.*$/,xt=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Bt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ft=/^(?:GET|HEAD)$/,Ht=/^\/\//,jt={},Gt={},qt="*/".concat("*"),Vt=re.createElement("a");Vt.href=bt.href,Ee.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:Bt.test(bt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":Ee.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?X(X(e,Ee.ajaxSettings),t):X(Ee.ajaxSettings,e)},ajaxPrefilter:K(jt),ajaxTransport:K(Gt),ajax:function(e,t){function r(e,t,r,a){var l,c,h,m,C,T=t;f||(f=!0,u&&n.clearTimeout(u),i=void 0,s=a||"",v.readyState=e>0?4:0,l=e>=200&&e<300||304===e,r&&(m=Z(p,v,r)),m=ee(p,m,v,l),l?(p.ifModified&&(C=v.getResponseHeader("Last-Modified"),C&&(Ee.lastModified[o]=C),C=v.getResponseHeader("etag"),C&&(Ee.etag[o]=C)),204===e||"HEAD"===p.type?T="nocontent":304===e?T="notmodified":(T=m.state,c=m.data,h=m.error,l=!h)):(h=T,!e&&T||(T="error",e<0&&(e=0))),v.status=e,v.statusText=(t||T)+"",l?g.resolveWith(_,[c,T,v]):g.rejectWith(_,[v,T,h]),v.statusCode(R),R=void 0,d&&E.trigger(l?"ajaxSuccess":"ajaxError",[v,p,l?c:h]),y.fireWith(_,[v,T]),d&&(E.trigger("ajaxComplete",[v,p]),--Ee.active||Ee.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,o,s,a,u,l,f,d,c,h,p=Ee.ajaxSetup({},t),_=p.context||p,E=p.context&&(_.nodeType||_.jquery)?Ee(_):Ee.event,g=Ee.Deferred(),y=Ee.Callbacks("once memory"),R=p.statusCode||{},m={},C={},T="canceled",v={readyState:0,getResponseHeader:function(e){var t;if(f){if(!a)for(a={};t=Mt.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return f?s:null},setRequestHeader:function(e,t){return null==f&&(e=C[e.toLowerCase()]=C[e.toLowerCase()]||e,m[e]=t),this},overrideMimeType:function(e){return null==f&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(f)v.always(e[v.status]);else for(t in e)R[t]=[R[t],e[t]];return this},abort:function(e){var t=e||T;return i&&i.abort(t),r(0,t),this}};if(g.promise(v),p.url=((e||p.url||bt.href)+"").replace(Ht,bt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(we)||[""],null==p.crossDomain){l=re.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Vt.protocol+"//"+Vt.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=Ee.param(p.data,p.traditional)),$(jt,p,t,v),f)return v;d=Ee.event&&p.global,d&&0===Ee.active++&&Ee.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Ft.test(p.type),o=p.url.replace(kt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Lt,"+")):(h=p.url.slice(o.length),p.data&&(o+=(Nt.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(o=o.replace(xt,""),h=(Nt.test(o)?"&":"?")+"_="+Dt++ +h),p.url=o+h),p.ifModified&&(Ee.lastModified[o]&&v.setRequestHeader("If-Modified-Since",Ee.lastModified[o]),Ee.etag[o]&&v.setRequestHeader("If-None-Match",Ee.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||t.contentType)&&v.setRequestHeader("Content-Type",p.contentType),v.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+qt+"; q=0.01":""):p.accepts["*"]);for(c in p.headers)v.setRequestHeader(c,p.headers[c]);if(p.beforeSend&&(p.beforeSend.call(_,v,p)===!1||f))return v.abort();if(T="abort",y.add(p.complete),v.done(p.success),v.fail(p.error),i=$(Gt,p,t,v)){if(v.readyState=1,d&&E.trigger("ajaxSend",[v,p]),f)return v;p.async&&p.timeout>0&&(u=n.setTimeout(function(){v.abort("timeout")},p.timeout));try{f=!1,i.send(m,r)}catch(e){if(f)throw e;r(-1,e)}}else r(-1,"No Transport");return v},getJSON:function(e,t,n){return Ee.get(e,t,n,"json")},getScript:function(e,t){return Ee.get(e,void 0,t,"script")}}),Ee.each(["get","post"],function(e,t){Ee[t]=function(e,n,r,i){return Ee.isFunction(n)&&(i=i||r,r=n,n=void 0),Ee.ajax(Ee.extend({url:e,type:t,dataType:i,data:n,success:r},Ee.isPlainObject(e)&&e))}}),Ee._evalUrl=function(e){return Ee.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},Ee.fn.extend({wrapAll:function(e){var t;return this[0]&&(Ee.isFunction(e)&&(e=e.call(this[0])),t=Ee(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return Ee.isFunction(e)?this.each(function(t){Ee(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Ee(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=Ee.isFunction(e);return this.each(function(n){Ee(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){Ee(this).replaceWith(this.childNodes)}),this}}),Ee.expr.pseudos.hidden=function(e){return!Ee.expr.pseudos.visible(e)},Ee.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},Ee.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Jt={0:200,1223:204},Yt=Ee.ajaxSettings.xhr();pe.cors=!!Yt&&"withCredentials"in Yt,pe.ajax=Yt=!!Yt,Ee.ajaxTransport(function(e){var t,r;if(pe.cors||Yt&&!e.crossDomain)return{send:function(i,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(s in i)a.setRequestHeader(s,i[s]);t=function(e){return function(){t&&(t=r=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Jt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),r=a.onerror=t("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),Ee.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),Ee.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return Ee.globalEval(e),e}}}),Ee.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),Ee.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=Ee("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),re.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Wt=[],Qt=/(=)\?(?=&|$)|\?\?/;Ee.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Wt.pop()||Ee.expando+"_"+Dt++;return this[e]=!0,
e}}),Ee.ajaxPrefilter("json jsonp",function(e,t,r){var i,o,s,a=e.jsonp!==!1&&(Qt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=Ee.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Qt,"$1"+i):e.jsonp!==!1&&(e.url+=(Nt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return s||Ee.error(i+" was not called"),s[0]},e.dataTypes[0]="json",o=n[i],n[i]=function(){s=arguments},r.always(function(){void 0===o?Ee(n).removeProp(i):n[i]=o,e[i]&&(e.jsonpCallback=t.jsonpCallback,Wt.push(i)),s&&Ee.isFunction(o)&&o(s[0]),s=o=void 0}),"script"}),pe.createHTMLDocument=function(){var e=re.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),Ee.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var r,i,o;return t||(pe.createHTMLDocument?(t=re.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=re.location.href,t.head.appendChild(r)):t=re),i=Ae.exec(e),o=!n&&[],i?[t.createElement(i[1])]:(i=T([e],t,o),o&&o.length&&Ee(o).remove(),Ee.merge([],i.childNodes))},Ee.fn.load=function(e,t,n){var r,i,o,s=this,a=e.indexOf(" ");return a>-1&&(r=Ee.trim(e.slice(a)),e=e.slice(0,a)),Ee.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),s.length>0&&Ee.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,s.html(r?Ee("<div>").append(Ee.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},Ee.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){Ee.fn[t]=function(e){return this.on(t,e)}}),Ee.expr.pseudos.animated=function(e){return Ee.grep(Ee.timers,function(t){return e===t.elem}).length},Ee.offset={setOffset:function(e,t,n){var r,i,o,s,a,u,l,f=Ee.css(e,"position"),d=Ee(e),c={};"static"===f&&(e.style.position="relative"),a=d.offset(),o=Ee.css(e,"top"),u=Ee.css(e,"left"),l=("absolute"===f||"fixed"===f)&&(o+u).indexOf("auto")>-1,l?(r=d.position(),s=r.top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(u)||0),Ee.isFunction(t)&&(t=t.call(e,n,Ee.extend({},a))),null!=t.top&&(c.top=t.top-a.top+s),null!=t.left&&(c.left=t.left-a.left+i),"using"in t?t.using.call(e,c):d.css(c)}},Ee.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){Ee.offset.setOffset(this,e,t)});var t,n,r,i,o=this[0];if(o)return o.getClientRects().length?(r=o.getBoundingClientRect(),r.width||r.height?(i=o.ownerDocument,n=te(i),t=i.documentElement,{top:r.top+n.pageYOffset-t.clientTop,left:r.left+n.pageXOffset-t.clientLeft}):r):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===Ee.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),Ee.nodeName(e[0],"html")||(r=e.offset()),r={top:r.top+Ee.css(e[0],"borderTopWidth",!0),left:r.left+Ee.css(e[0],"borderLeftWidth",!0)}),{top:t.top-r.top-Ee.css(n,"marginTop",!0),left:t.left-r.left-Ee.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===Ee.css(e,"position");)e=e.offsetParent;return e||Xe})}}),Ee.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;Ee.fn[e]=function(r){return ke(this,function(e,r,i){var o=te(e);return void 0===i?o?o[t]:e[r]:void(o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i)},e,r,arguments.length)}}),Ee.each(["top","left"],function(e,t){Ee.cssHooks[t]=k(pe.pixelPosition,function(e,n){if(n)return n=L(e,t),ut.test(n)?Ee(e).position()[t]+"px":n})}),Ee.each({Height:"height",Width:"width"},function(e,t){Ee.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){Ee.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(i===!0||o===!0?"margin":"border");return ke(this,function(t,n,i){var o;return Ee.isWindow(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?Ee.css(t,n,a):Ee.style(t,n,i,a)},t,s?i:void 0,s)}})}),Ee.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),Ee.parseJSON=JSON.parse,r=[],i=function(){return Ee}.apply(t,r),!(void 0!==i&&(e.exports=i));var zt=n.jQuery,Kt=n.$;return Ee.noConflict=function(e){return n.$===Ee&&(n.$=Kt),e&&n.jQuery===Ee&&(n.jQuery=zt),Ee},o||(n.jQuery=n.$=Ee),Ee})},function(e,t,n){var r,i,o;(function(e){!function(s,a){n(10).amd?(i=[],r=a,o="function"==typeof r?r.apply(t,i):r,!(void 0!==o&&(e.exports=o))):"object"==typeof e&&e&&e.exports?e.exports=a():(s.dcodeIO=s.dcodeIO||{}).Long=a()}(this,function(){"use strict";function e(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function t(e){return(e&&e.__isLong__)===!0}function n(e,t){var n,r,o;return t?(e>>>=0,(o=0<=e&&e<256)&&(r=u[e])?r:(n=i(e,(0|e)<0?-1:0,!0),o&&(u[e]=n),n)):(e|=0,(o=-128<=e&&e<128)&&(r=a[e])?r:(n=i(e,e<0?-1:0,!1),o&&(a[e]=n),n))}function r(e,t){if(isNaN(e)||!isFinite(e))return t?E:_;if(t){if(e<0)return E;if(e>=c)return C}else{if(e<=-h)return T;if(e+1>=h)return m}return e<0?r(-e,t).neg():i(e%d|0,e/d|0,t)}function i(t,n,r){return new e(t,n,r)}function o(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return _;if("number"==typeof t?(n=t,t=!1):t=!!t,n=n||10,n<2||36<n)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return o(e.substring(1),t,n).neg();for(var s=r(l(n,8)),a=_,u=0;u<e.length;u+=8){var f=Math.min(8,e.length-u),d=parseInt(e.substring(u,u+f),n);if(f<8){var c=r(l(n,f));a=a.mul(c).add(r(d))}else a=a.mul(s),a=a.add(r(d))}return a.unsigned=t,a}function s(t){return t instanceof e?t:"number"==typeof t?r(t):"string"==typeof t?o(t):i(t.low,t.high,t.unsigned)}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=t;var a={},u={};e.fromInt=n,e.fromNumber=r,e.fromBits=i;var l=Math.pow;e.fromString=o,e.fromValue=s;var f=1<<24,d=4294967296,c=0x10000000000000000,h=c/2,p=n(f),_=n(0);e.ZERO=_;var E=n(0,!0);e.UZERO=E;var g=n(1);e.ONE=g;var y=n(1,!0);e.UONE=y;var R=n(-1);e.NEG_ONE=R;var m=i(-1,2147483647,!1);e.MAX_VALUE=m;var C=i(-1,-1,!0);e.MAX_UNSIGNED_VALUE=C;var T=i(0,-2147483648,!1);e.MIN_VALUE=T;var v=e.prototype;return v.toInt=function(){return this.unsigned?this.low>>>0:this.low},v.toNumber=function(){return this.unsigned?(this.high>>>0)*d+(this.low>>>0):this.high*d+(this.low>>>0)},v.toString=function(e){if(e=e||10,e<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(T)){var t=r(e),n=this.div(t),i=n.mul(t).sub(this);return n.toString(e)+i.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var o=r(l(e,6),this.unsigned),s=this,a="";;){var u=s.div(o),f=s.sub(u.mul(o)).toInt()>>>0,d=f.toString(e);if(s=u,s.isZero())return d+a;for(;d.length<6;)d="0"+d;a=""+d+a}},v.getHighBits=function(){return this.high},v.getHighBitsUnsigned=function(){return this.high>>>0},v.getLowBits=function(){return this.low},v.getLowBitsUnsigned=function(){return this.low>>>0},v.getNumBitsAbs=function(){if(this.isNegative())return this.eq(T)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},v.isZero=function(){return 0===this.high&&0===this.low},v.isNegative=function(){return!this.unsigned&&this.high<0},v.isPositive=function(){return this.unsigned||this.high>=0},v.isOdd=function(){return 1===(1&this.low)},v.isEven=function(){return 0===(1&this.low)},v.equals=function(e){return t(e)||(e=s(e)),(this.unsigned===e.unsigned||this.high>>>31!==1||e.high>>>31!==1)&&(this.high===e.high&&this.low===e.low)},v.eq=v.equals,v.notEquals=function(e){return!this.eq(e)},v.neq=v.notEquals,v.lessThan=function(e){return this.comp(e)<0},v.lt=v.lessThan,v.lessThanOrEqual=function(e){return this.comp(e)<=0},v.lte=v.lessThanOrEqual,v.greaterThan=function(e){return this.comp(e)>0},v.gt=v.greaterThan,v.greaterThanOrEqual=function(e){return this.comp(e)>=0},v.gte=v.greaterThanOrEqual,v.compare=function(e){if(t(e)||(e=s(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},v.comp=v.compare,v.negate=function(){return!this.unsigned&&this.eq(T)?T:this.not().add(g)},v.neg=v.negate,v.add=function(e){t(e)||(e=s(e));var n=this.high>>>16,r=65535&this.high,o=this.low>>>16,a=65535&this.low,u=e.high>>>16,l=65535&e.high,f=e.low>>>16,d=65535&e.low,c=0,h=0,p=0,_=0;return _+=a+d,p+=_>>>16,_&=65535,p+=o+f,h+=p>>>16,p&=65535,h+=r+l,c+=h>>>16,h&=65535,c+=n+u,c&=65535,i(p<<16|_,c<<16|h,this.unsigned)},v.subtract=function(e){return t(e)||(e=s(e)),this.add(e.neg())},v.sub=v.subtract,v.multiply=function(e){if(this.isZero())return _;if(t(e)||(e=s(e)),e.isZero())return _;if(this.eq(T))return e.isOdd()?T:_;if(e.eq(T))return this.isOdd()?T:_;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(p)&&e.lt(p))return r(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,o=65535&this.high,a=this.low>>>16,u=65535&this.low,l=e.high>>>16,f=65535&e.high,d=e.low>>>16,c=65535&e.low,h=0,E=0,g=0,y=0;return y+=u*c,g+=y>>>16,y&=65535,g+=a*c,E+=g>>>16,g&=65535,g+=u*d,E+=g>>>16,g&=65535,E+=o*c,h+=E>>>16,E&=65535,E+=a*d,h+=E>>>16,E&=65535,E+=u*f,h+=E>>>16,E&=65535,h+=n*c+o*d+a*f+u*l,h&=65535,i(g<<16|y,h<<16|E,this.unsigned)},v.mul=v.multiply,v.divide=function(e){if(t(e)||(e=s(e)),e.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?E:_;var n,i,o;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return E;if(e.gt(this.shru(1)))return y;o=E}else{if(this.eq(T)){if(e.eq(g)||e.eq(R))return T;if(e.eq(T))return g;var a=this.shr(1);return n=a.div(e).shl(1),n.eq(_)?e.isNegative()?g:R:(i=this.sub(e.mul(n)),o=n.add(i.div(e)))}if(e.eq(T))return this.unsigned?E:_;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=_}for(i=this;i.gte(e);){n=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var u=Math.ceil(Math.log(n)/Math.LN2),f=u<=48?1:l(2,u-48),d=r(n),c=d.mul(e);c.isNegative()||c.gt(i);)n-=f,d=r(n,this.unsigned),c=d.mul(e);d.isZero()&&(d=g),o=o.add(d),i=i.sub(c)}return o},v.div=v.divide,v.modulo=function(e){return t(e)||(e=s(e)),this.sub(this.div(e).mul(e))},v.mod=v.modulo,v.not=function(){return i(~this.low,~this.high,this.unsigned)},v.and=function(e){return t(e)||(e=s(e)),i(this.low&e.low,this.high&e.high,this.unsigned)},v.or=function(e){return t(e)||(e=s(e)),i(this.low|e.low,this.high|e.high,this.unsigned)},v.xor=function(e){return t(e)||(e=s(e)),i(this.low^e.low,this.high^e.high,this.unsigned)},v.shiftLeft=function(e){return t(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?i(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):i(0,this.low<<e-32,this.unsigned)},v.shl=v.shiftLeft,v.shiftRight=function(e){return t(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?i(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):i(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},v.shr=v.shiftRight,v.shiftRightUnsigned=function(e){if(t(e)&&(e=e.toInt()),e&=63,0===e)return this;var n=this.high;if(e<32){var r=this.low;return i(r>>>e|n<<32-e,n>>>e,this.unsigned)}return 32===e?i(n,0,this.unsigned):i(n>>>e-32,0,this.unsigned)},v.shru=v.shiftRightUnsigned,v.toSigned=function(){return this.unsigned?i(this.low,this.high,!1):this},v.toUnsigned=function(){return this.unsigned?this:i(this.low,this.high,!0)},v.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},v.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&e,e>>>8&255,e>>>16&255,e>>>24&255]},v.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t]},e})}).call(t,n(9)(e))},function(e,t){String.fromCodePoint||!function(){var e=function(){try{var e={},t=Object.defineProperty,n=t(e,e,e)&&t}catch(e){}return n}(),t=String.fromCharCode,n=Math.floor,r=function(e){var r,i,o=16384,s=[],a=-1,u=arguments.length;if(!u)return"";for(var l="";++a<u;){var f=Number(arguments[a]);if(!isFinite(f)||f<0||f>1114111||n(f)!=f)throw RangeError("Invalid code point: "+f);f<=65535?s.push(f):(f-=65536,r=(f>>10)+55296,i=f%1024+56320,s.push(r,i)),(a+1==u||s.length>o)&&(l+=t.apply(null,s),s.length=0)}return l};e?e(String,"fromCodePoint",{value:r,configurable:!0,writable:!0}):String.fromCodePoint=r}()},function(e,t){(function(){"use strict";function e(e){throw e}function t(e,t){var n=e.split("."),r=T;!(n[0]in r)&&r.execScript&&r.execScript("var "+n[0]);for(var i;n.length&&(i=n.shift());)n.length||t===m?r=r[i]?r[i]:r[i]={}:r[i]=t}function n(t,n){this.index="number"==typeof n?n:0,this.i=0,this.buffer=t instanceof(v?Uint8Array:Array)?t:new(v?Uint8Array:Array)(32768),2*this.buffer.length<=this.index&&e(Error("invalid index")),this.buffer.length<=this.index&&this.f()}function r(e){this.buffer=new(v?Uint16Array:Array)(2*e),this.length=0}function i(e){var t,n,r,i,o,s,a,u,l,f,d=e.length,c=0,h=Number.POSITIVE_INFINITY;for(u=0;u<d;++u)e[u]>c&&(c=e[u]),e[u]<h&&(h=e[u]);for(t=1<<c,n=new(v?Uint32Array:Array)(t),r=1,i=0,o=2;r<=c;){for(u=0;u<d;++u)if(e[u]===r){for(s=0,a=i,l=0;l<r;++l)s=s<<1|1&a,a>>=1;for(f=r<<16|u,l=s;l<t;l+=o)n[l]=f;++i}++r,i<<=1,o<<=1}return[n,c,h]}function o(e,t){this.h=O,this.w=0,this.input=v&&e instanceof Array?new Uint8Array(e):e,this.b=0,t&&(t.lazy&&(this.w=t.lazy),"number"==typeof t.compressionType&&(this.h=t.compressionType),t.outputBuffer&&(this.a=v&&t.outputBuffer instanceof Array?new Uint8Array(t.outputBuffer):t.outputBuffer),"number"==typeof t.outputIndex&&(this.b=t.outputIndex)),this.a||(this.a=new(v?Uint8Array:Array)(32768))}function s(e,t){this.length=e,this.H=t}function a(t,n){function r(t,n){var r,i=t.H,o=[],s=0;r=k[t.length],o[s++]=65535&r,o[s++]=r>>16&255,o[s++]=r>>24;var a;switch(C){case 1===i:a=[0,i-1,0];break;case 2===i:a=[1,i-2,0];break;case 3===i:a=[2,i-3,0];break;case 4===i:a=[3,i-4,0];break;case 6>=i:a=[4,i-5,1];break;case 8>=i:a=[5,i-7,1];break;case 12>=i:a=[6,i-9,2];break;case 16>=i:a=[7,i-13,2];break;case 24>=i:a=[8,i-17,3];break;case 32>=i:a=[9,i-25,3];break;case 48>=i:a=[10,i-33,4];break;case 64>=i:a=[11,i-49,4];break;case 96>=i:a=[12,i-65,5];break;case 128>=i:a=[13,i-97,5];break;case 192>=i:a=[14,i-129,6];break;case 256>=i:a=[15,i-193,6];break;case 384>=i:a=[16,i-257,7];break;case 512>=i:a=[17,i-385,7];break;case 768>=i:a=[18,i-513,8];break;case 1024>=i:a=[19,i-769,8];break;case 1536>=i:a=[20,i-1025,9];break;case 2048>=i:a=[21,i-1537,9];break;case 3072>=i:a=[22,i-2049,10];break;case 4096>=i:a=[23,i-3073,10];break;case 6144>=i:a=[24,i-4097,11];break;case 8192>=i:a=[25,i-6145,11];break;case 12288>=i:a=[26,i-8193,12];break;case 16384>=i:a=[27,i-12289,12];break;case 24576>=i:a=[28,i-16385,13];break;case 32768>=i:a=[29,i-24577,13];break;default:e("invalid distance")}r=a,o[s++]=r[0],o[s++]=r[1],o[s++]=r[2];var u,l;for(u=0,l=o.length;u<l;++u)_[E++]=o[u];y[o[0]]++,R[o[3]]++,g=t.length+n-1,c=null}var i,o,s,a,l,f,d,c,h,p={},_=v?new Uint16Array(2*n.length):[],E=0,g=0,y=new(v?Uint32Array:Array)(286),R=new(v?Uint32Array:Array)(30),T=t.w;if(!v){for(s=0;285>=s;)y[s++]=0;for(s=0;29>=s;)R[s++]=0}for(y[256]=1,i=0,o=n.length;i<o;++i){for(s=l=0,a=3;s<a&&i+s!==o;++s)l=l<<8|n[i+s];if(p[l]===m&&(p[l]=[]),f=p[l],!(0<g--)){for(;0<f.length&&32768<i-f[0];)f.shift();if(i+3>=o){for(c&&r(c,-1),s=0,a=o-i;s<a;++s)h=n[i+s],_[E++]=h,++y[h];break}0<f.length?(d=u(n,i,f),c?c.length<d.length?(h=n[i-1],_[E++]=h,++y[h],r(d,0)):r(c,-1):d.length<T?c=d:r(d,0)):c?r(c,-1):(h=n[i],_[E++]=h,++y[h])}f.push(i)}return _[E++]=256,y[256]++,t.M=y,t.L=R,v?_.subarray(0,E):_}function u(e,t,n){var r,i,o,a,u,l,f=0,d=e.length;a=0,l=n.length;e:for(;a<l;a++){if(r=n[l-a-1],o=3,3<f){for(u=f;3<u;u--)if(e[r+u-1]!==e[t+u-1])continue e;o=f}for(;258>o&&t+o<d&&e[r+o]===e[t+o];)++o;if(o>f&&(i=r,f=o),258===o)break}return new s(f,t-i)}function l(e,t){var n,i,o,s,a,u=e.length,l=new r(572),d=new(v?Uint8Array:Array)(u);if(!v)for(s=0;s<u;s++)d[s]=0;for(s=0;s<u;++s)0<e[s]&&l.push(s,e[s]);if(n=Array(l.length/2),i=new(v?Uint32Array:Array)(l.length/2),1===n.length)return d[l.pop().index]=1,d;for(s=0,a=l.length/2;s<a;++s)n[s]=l.pop(),i[s]=n[s].value;for(o=f(i,i.length,t),s=0,a=n.length;s<a;++s)d[n[s].index]=o[s];return d}function f(e,t,n){function r(e){var n=h[e][p[e]];n===t?(r(e+1),r(e+1)):--d[n],++p[e]}var i,o,s,a,u,l=new(v?Uint16Array:Array)(n),f=new(v?Uint8Array:Array)(n),d=new(v?Uint8Array:Array)(t),c=Array(n),h=Array(n),p=Array(n),_=(1<<n)-t,E=1<<n-1;for(l[n-1]=t,o=0;o<n;++o)_<E?f[o]=0:(f[o]=1,_-=E),_<<=1,l[n-2-o]=(l[n-1-o]/2|0)+t;for(l[0]=f[0],c[0]=Array(l[0]),h[0]=Array(l[0]),o=1;o<n;++o)l[o]>2*l[o-1]+f[o]&&(l[o]=2*l[o-1]+f[o]),c[o]=Array(l[o]),h[o]=Array(l[o]);for(i=0;i<t;++i)d[i]=n;for(s=0;s<l[n-1];++s)c[n-1][s]=e[s],h[n-1][s]=s;for(i=0;i<n;++i)p[i]=0;for(1===f[n-1]&&(--d[0],++p[n-1]),o=n-2;0<=o;--o){for(a=i=0,u=p[o+1],s=0;s<l[o];s++)a=c[o+1][u]+c[o+1][u+1],a>e[i]?(c[o][s]=a,h[o][s]=t,u+=2):(c[o][s]=e[i],h[o][s]=i,++i);p[o]=0,1===f[o]&&r(o)}return d}function d(e){var t,n,r,i,o=new(v?Uint16Array:Array)(e.length),s=[],a=[],u=0;for(t=0,n=e.length;t<n;t++)s[e[t]]=(0|s[e[t]])+1;for(t=1,n=16;t<=n;t++)a[t]=u,u+=0|s[t],u<<=1;for(t=0,n=e.length;t<n;t++)for(u=a[e[t]],a[e[t]]+=1,r=o[t]=0,i=e[t];r<i;r++)o[t]=o[t]<<1|1&u,u>>>=1;return o}function c(t,n){switch(this.l=[],this.m=32768,this.e=this.g=this.c=this.q=0,this.input=v?new Uint8Array(t):t,this.s=!1,this.n=M,this.C=!1,!n&&(n={})||(n.index&&(this.c=n.index),n.bufferSize&&(this.m=n.bufferSize),n.bufferType&&(this.n=n.bufferType),n.resize&&(this.C=n.resize)),this.n){case x:this.b=32768,this.a=new(v?Uint8Array:Array)(32768+this.m+258);break;case M:this.b=0,this.a=new(v?Uint8Array:Array)(this.m),this.f=this.K,this.t=this.I,this.o=this.J;break;default:e(Error("invalid inflate mode"))}}function h(t,n){for(var r,i=t.g,o=t.e,s=t.input,a=t.c,u=s.length;o<n;)a>=u&&e(Error("input buffer is broken")),i|=s[a++]<<o,o+=8;return r=i&(1<<n)-1,t.g=i>>>n,t.e=o-n,t.c=a,r}function p(e,t){for(var n,r,i=e.g,o=e.e,s=e.input,a=e.c,u=s.length,l=t[0],f=t[1];o<f&&!(a>=u);)i|=s[a++]<<o,o+=8;return n=l[i&(1<<f)-1],r=n>>>16,e.g=i>>r,e.e=o-r,e.c=a,65535&n}function _(e){function t(e,t,n){var r,i,o,s=this.z;for(o=0;o<e;)switch(r=p(this,t)){case 16:for(i=3+h(this,2);i--;)n[o++]=s;break;case 17:for(i=3+h(this,3);i--;)n[o++]=0;s=0;break;case 18:for(i=11+h(this,7);i--;)n[o++]=0;s=0;break;default:s=n[o++]=r}return this.z=s,n}var n,r,o,s,a=h(e,5)+257,u=h(e,5)+1,l=h(e,4)+4,f=new(v?Uint8Array:Array)(G.length);for(s=0;s<l;++s)f[G[s]]=h(e,3);if(!v)for(s=l,l=f.length;s<l;++s)f[G[s]]=0;n=i(f),r=new(v?Uint8Array:Array)(a),o=new(v?Uint8Array:Array)(u),e.z=0,e.o(i(t.call(e,a,n,r)),i(t.call(e,u,n,o)))}function E(e){if("string"==typeof e){var t,n,r=e.split("");for(t=0,n=r.length;t<n;t++)r[t]=(255&r[t].charCodeAt(0))>>>0;e=r}for(var i,o=1,s=0,a=e.length,u=0;0<a;){i=1024<a?1024:a,a-=i;do o+=e[u++],s+=o;while(--i);o%=65521,s%=65521}return(s<<16|o)>>>0}function g(t,n){var r,i;switch(this.input=t,this.c=0,!n&&(n={})||(n.index&&(this.c=n.index),n.verify&&(this.N=n.verify)),r=t[this.c++],i=t[this.c++],15&r){case re:this.method=re;break;default:e(Error("unsupported compression method"))}0!==((r<<8)+i)%31&&e(Error("invalid fcheck flag:"+((r<<8)+i)%31)),32&i&&e(Error("fdict flag is not supported")),this.B=new c(t,{index:this.c,bufferSize:n.bufferSize,bufferType:n.bufferType,resize:n.resize})}function y(e,t){this.input=e,this.a=new(v?Uint8Array:Array)(32768),this.h=ie.k;var n,r={};!t&&(t={})||"number"!=typeof t.compressionType||(this.h=t.compressionType);for(n in t)r[n]=t[n];r.outputBuffer=this.a,this.A=new o(this.input,r)}function R(e,n){var r,i,o,s;if(Object.keys)r=Object.keys(n);else for(i in r=[],o=0,n)r[o++]=i;for(o=0,s=r.length;o<s;++o)i=r[o],t(e+"."+i,n[i])}var m=void 0,C=!0,T=this,v="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;n.prototype.f=function(){var e,t=this.buffer,n=t.length,r=new(v?Uint8Array:Array)(n<<1);if(v)r.set(t);else for(e=0;e<n;++e)r[e]=t[e];return this.buffer=r},n.prototype.d=function(e,t,n){var r,i=this.buffer,o=this.index,s=this.i,a=i[o];if(n&&1<t&&(e=8<t?(N[255&e]<<24|N[e>>>8&255]<<16|N[e>>>16&255]<<8|N[e>>>24&255])>>32-t:N[e]>>8-t),8>t+s)a=a<<t|e,s+=t;else for(r=0;r<t;++r)a=a<<1|e>>t-r-1&1,8===++s&&(s=0,i[o++]=N[a],a=0,o===i.length&&(i=this.f()));i[o]=a,this.buffer=i,this.i=s,this.index=o},n.prototype.finish=function(){var e,t=this.buffer,n=this.index;return 0<this.i&&(t[n]<<=8-this.i,t[n]=N[t[n]],n++),v?e=t.subarray(0,n):(t.length=n,e=t),e};var S,A=new(v?Uint8Array:Array)(256);for(S=0;256>S;++S){for(var I=S,b=I,D=7,I=I>>>1;I;I>>>=1)b<<=1,b|=1&I,--D;A[S]=(b<<D&255)>>>0}var N=A;r.prototype.getParent=function(e){return 2*((e-2)/4|0)},r.prototype.push=function(e,t){var n,r,i,o=this.buffer;for(n=this.length,o[this.length++]=t,o[this.length++]=e;0<n&&(r=this.getParent(n),o[n]>o[r]);)i=o[n],o[n]=o[r],o[r]=i,i=o[n+1],o[n+1]=o[r+1],o[r+1]=i,n=r;return this.length},r.prototype.pop=function(){var e,t,n,r,i,o=this.buffer;for(t=o[0],e=o[1],this.length-=2,o[0]=o[this.length],o[1]=o[this.length+1],i=0;(r=2*i+2,!(r>=this.length))&&(r+2<this.length&&o[r+2]>o[r]&&(r+=2),o[r]>o[i]);)n=o[i],o[i]=o[r],o[r]=n,n=o[i+1],o[i+1]=o[r+1],o[r+1]=n,i=r;return{index:e,value:t,length:this.length}};var P,O=2,w={NONE:0,r:1,k:O,O:3},U=[];for(P=0;288>P;P++)switch(C){case 143>=P:U.push([P+48,8]);break;case 255>=P:U.push([P-144+400,9]);break;case 279>=P:U.push([P-256+0,7]);break;case 287>=P:U.push([P-280+192,8]);break;default:e("invalid literal: "+P)}o.prototype.j=function(){var t,r,i,o,s=this.input;switch(this.h){case 0:for(i=0,o=s.length;i<o;){r=v?s.subarray(i,i+65535):s.slice(i,i+65535),i+=r.length;var u=r,f=i===o,c=m,h=m,p=m,_=m,E=m,g=this.a,y=this.b;if(v){for(g=new Uint8Array(this.a.buffer);g.length<=y+u.length+5;)g=new Uint8Array(g.length<<1);g.set(this.a)}if(c=f?1:0,g[y++]=0|c,h=u.length,p=~h+65536&65535,g[y++]=255&h,g[y++]=h>>>8&255,g[y++]=255&p,g[y++]=p>>>8&255,v)g.set(u,y),y+=u.length,g=g.subarray(0,y);else{for(_=0,E=u.length;_<E;++_)g[y++]=u[_];g.length=y}this.b=y,this.a=g}break;case 1:var R=new n(v?new Uint8Array(this.a.buffer):this.a,this.b);R.d(1,1,C),R.d(1,2,C);var T,S,A,I=a(this,s);for(T=0,S=I.length;T<S;T++)if(A=I[T],n.prototype.d.apply(R,U[A]),256<A)R.d(I[++T],I[++T],C),R.d(I[++T],5),R.d(I[++T],I[++T],C);else if(256===A)break;this.a=R.finish(),this.b=this.a.length;break;case O:var b,D,N,P,w,L,k,x,M,B,F,H,j,G,q,V=new n(v?new Uint8Array(this.a.buffer):this.a,this.b),J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=Array(19);for(b=O,V.d(1,1,C),V.d(b,2,C),D=a(this,s),L=l(this.M,15),k=d(L),x=l(this.L,7),M=d(x),N=286;257<N&&0===L[N-1];N--);for(P=30;1<P&&0===x[P-1];P--);var W,Q,z,K,$,X,Z=N,ee=P,te=new(v?Uint32Array:Array)(Z+ee),ne=new(v?Uint32Array:Array)(316),re=new(v?Uint8Array:Array)(19);for(W=Q=0;W<Z;W++)te[Q++]=L[W];for(W=0;W<ee;W++)te[Q++]=x[W];if(!v)for(W=0,K=re.length;W<K;++W)re[W]=0;for(W=$=0,K=te.length;W<K;W+=Q){for(Q=1;W+Q<K&&te[W+Q]===te[W];++Q);if(z=Q,0===te[W])if(3>z)for(;0<z--;)ne[$++]=0,re[0]++;else for(;0<z;)X=138>z?z:138,X>z-3&&X<z&&(X=z-3),10>=X?(ne[$++]=17,ne[$++]=X-3,re[17]++):(ne[$++]=18,ne[$++]=X-11,re[18]++),z-=X;else if(ne[$++]=te[W],re[te[W]]++,z--,3>z)for(;0<z--;)ne[$++]=te[W],re[te[W]]++;else for(;0<z;)X=6>z?z:6,X>z-3&&X<z&&(X=z-3),ne[$++]=16,ne[$++]=X-3,re[16]++,z-=X}for(t=v?ne.subarray(0,$):ne.slice(0,$),B=l(re,7),G=0;19>G;G++)Y[G]=B[J[G]];for(w=19;4<w&&0===Y[w-1];w--);for(F=d(B),V.d(N-257,5,C),V.d(P-1,5,C),V.d(w-4,4,C),G=0;G<w;G++)V.d(Y[G],3,C);for(G=0,q=t.length;G<q;G++)if(H=t[G],V.d(F[H],B[H],C),16<=H){switch(G++,H){case 16:j=2;break;case 17:j=3;break;case 18:j=7;break;default:e("invalid code: "+H)}V.d(t[G],j,C)}var ie,oe,se,ae,ue,le,fe,de,ce=[k,L],he=[M,x];for(ue=ce[0],le=ce[1],fe=he[0],de=he[1],ie=0,oe=D.length;ie<oe;++ie)if(se=D[ie],V.d(ue[se],le[se],C),256<se)V.d(D[++ie],D[++ie],C),ae=D[++ie],V.d(fe[ae],de[ae],C),V.d(D[++ie],D[++ie],C);else if(256===se)break;this.a=V.finish(),this.b=this.a.length;break;default:e("invalid compression type")}return this.a};var L=function(){function t(t){switch(C){case 3===t:return[257,t-3,0];case 4===t:return[258,t-4,0];case 5===t:return[259,t-5,0];case 6===t:return[260,t-6,0];case 7===t:return[261,t-7,0];case 8===t:return[262,t-8,0];case 9===t:return[263,t-9,0];case 10===t:return[264,t-10,0];case 12>=t:return[265,t-11,1];case 14>=t:return[266,t-13,1];case 16>=t:return[267,t-15,1];case 18>=t:return[268,t-17,1];case 22>=t:return[269,t-19,2];case 26>=t:return[270,t-23,2];case 30>=t:return[271,t-27,2];case 34>=t:return[272,t-31,2];case 42>=t:return[273,t-35,3];case 50>=t:return[274,t-43,3];case 58>=t:return[275,t-51,3];case 66>=t:return[276,t-59,3];case 82>=t:return[277,t-67,4];case 98>=t:return[278,t-83,4];case 114>=t:return[279,t-99,4];case 130>=t:return[280,t-115,4];case 162>=t:return[281,t-131,5];case 194>=t:return[282,t-163,5];case 226>=t:return[283,t-195,5];case 257>=t:return[284,t-227,5];case 258===t:return[285,t-258,0];default:e("invalid length: "+t)}}var n,r,i=[];for(n=3;258>=n;n++)r=t(n),i[n]=r[2]<<24|r[1]<<16|r[0];return i}(),k=v?new Uint32Array(L):L,x=0,M=1,B={F:x,D:M};c.prototype.p=function(){for(;!this.s;){var t=h(this,3);switch(1&t&&(this.s=C),t>>>=1){case 0:var n=this.input,r=this.c,i=this.a,o=this.b,s=n.length,a=m,u=m,l=i.length,f=m;switch(this.e=this.g=0,r+1>=s&&e(Error("invalid uncompressed block header: LEN")),a=n[r++]|n[r++]<<8,r+1>=s&&e(Error("invalid uncompressed block header: NLEN")),u=n[r++]|n[r++]<<8,a===~u&&e(Error("invalid uncompressed block header: length verify")),r+a>n.length&&e(Error("input buffer is broken")),this.n){case x:for(;o+a>i.length;){if(f=l-o,a-=f,v)i.set(n.subarray(r,r+f),o),o+=f,r+=f;else for(;f--;)i[o++]=n[r++];this.b=o,i=this.f(),o=this.b}break;case M:for(;o+a>i.length;)i=this.f({v:2});break;default:e(Error("invalid inflate mode"))}if(v)i.set(n.subarray(r,r+a),o),o+=a,r+=a;else for(;a--;)i[o++]=n[r++];this.c=r,this.b=o,this.a=i;break;case 1:this.o(ee,ne);break;case 2:_(this);break;default:e(Error("unknown BTYPE: "+t))}}return this.t()};var F,H,j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],G=v?new Uint16Array(j):j,q=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],V=v?new Uint16Array(q):q,J=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],Y=v?new Uint8Array(J):J,W=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Q=v?new Uint16Array(W):W,z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],K=v?new Uint8Array(z):z,$=new(v?Uint8Array:Array)(288);for(F=0,H=$.length;F<H;++F)$[F]=143>=F?8:255>=F?9:279>=F?7:8;var X,Z,ee=i($),te=new(v?Uint8Array:Array)(30);for(X=0,Z=te.length;X<Z;++X)te[X]=5;var ne=i(te);c.prototype.o=function(e,t){var n=this.a,r=this.b;this.u=e;for(var i,o,s,a,u=n.length-258;256!==(i=p(this,e));)if(256>i)r>=u&&(this.b=r,n=this.f(),r=this.b),n[r++]=i;else for(o=i-257,a=V[o],0<Y[o]&&(a+=h(this,Y[o])),i=p(this,t),s=Q[i],0<K[i]&&(s+=h(this,K[i])),r>=u&&(this.b=r,n=this.f(),r=this.b);a--;)n[r]=n[r++-s];for(;8<=this.e;)this.e-=8,this.c--;this.b=r},c.prototype.J=function(e,t){var n=this.a,r=this.b;this.u=e;for(var i,o,s,a,u=n.length;256!==(i=p(this,e));)if(256>i)r>=u&&(n=this.f(),u=n.length),n[r++]=i;else for(o=i-257,a=V[o],0<Y[o]&&(a+=h(this,Y[o])),i=p(this,t),s=Q[i],0<K[i]&&(s+=h(this,K[i])),r+a>u&&(n=this.f(),u=n.length);a--;)n[r]=n[r++-s];for(;8<=this.e;)this.e-=8,this.c--;this.b=r},c.prototype.f=function(){var e,t,n=new(v?Uint8Array:Array)(this.b-32768),r=this.b-32768,i=this.a;if(v)n.set(i.subarray(32768,n.length));else for(e=0,t=n.length;e<t;++e)n[e]=i[e+32768];if(this.l.push(n),this.q+=n.length,v)i.set(i.subarray(r,r+32768));else for(e=0;32768>e;++e)i[e]=i[r+e];return this.b=32768,i},c.prototype.K=function(e){var t,n,r,i,o=this.input.length/this.c+1|0,s=this.input,a=this.a;return e&&("number"==typeof e.v&&(o=e.v),"number"==typeof e.G&&(o+=e.G)),2>o?(n=(s.length-this.c)/this.u[2],i=258*(n/2)|0,r=i<a.length?a.length+i:a.length<<1):r=a.length*o,v?(t=new Uint8Array(r),t.set(a)):t=a,this.a=t},c.prototype.t=function(){var e,t,n,r,i,o=0,s=this.a,a=this.l,u=new(v?Uint8Array:Array)(this.q+(this.b-32768));if(0===a.length)return v?this.a.subarray(32768,this.b):this.a.slice(32768,this.b);for(t=0,n=a.length;t<n;++t)for(e=a[t],r=0,i=e.length;r<i;++r)u[o++]=e[r];for(t=32768,n=this.b;t<n;++t)u[o++]=s[t];return this.l=[],this.buffer=u},c.prototype.I=function(){var e,t=this.b;return v?this.C?(e=new Uint8Array(t),e.set(this.a.subarray(0,t))):e=this.a.subarray(0,t):(this.a.length>t&&(this.a.length=t),e=this.a),this.buffer=e},g.prototype.p=function(){var t,n,r=this.input;return t=this.B.p(),this.c=this.B.c,this.N&&(n=(r[this.c++]<<24|r[this.c++]<<16|r[this.c++]<<8|r[this.c++])>>>0,n!==E(t)&&e(Error("invalid adler-32 checksum"))),t};var re=8,ie=w;y.prototype.j=function(){var t,n,r,i,o,s,a,u=0;switch(a=this.a,t=re){case re:n=Math.LOG2E*Math.log(32768)-8;break;default:e(Error("invalid compression method"))}switch(r=n<<4|t,a[u++]=r,t){case re:switch(this.h){case ie.NONE:o=0;break;case ie.r:o=1;break;case ie.k:o=2;break;default:e(Error("unsupported compression type"))}break;default:e(Error("invalid compression method"))}return i=o<<6|0,a[u++]=i|31-(256*r+i)%31,s=E(this.input),this.A.b=u,a=this.A.j(),u=a.length,v&&(a=new Uint8Array(a.buffer),a.length<=u+4&&(this.a=new Uint8Array(a.length+4),this.a.set(a),a=this.a),a=a.subarray(0,u+4)),a[u++]=s>>24&255,a[u++]=s>>16&255,a[u++]=s>>8&255,a[u++]=255&s,a},t("Zlib.Inflate",g),t("Zlib.Inflate.prototype.decompress",g.prototype.p),R("Zlib.Inflate.BufferType",{ADAPTIVE:B.D,BLOCK:B.F}),t("Zlib.Deflate",y),t("Zlib.Deflate.compress",function(e,t){return new y(e,t).j()}),t("Zlib.Deflate.prototype.compress",y.prototype.j),R("Zlib.Deflate.CompressionType",{NONE:ie.NONE,FIXED:ie.r,DYNAMIC:ie.k})}).call(this)},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(8),l=r(u),f=n(30),d=r(f),c=n(17),h=r(c),p=n(2),_=r(p),E=n(1),g=r(E),y=n(15),R=r(y),m=n(33),C=r(m),T=n(35),v=r(T),S=n(32),A=r(S),I=n(34),b=r(I),D=n(36),N=r(D),P=n(4),O=r(P),w=n(5),U=r(w),L=n(3),k=r(L),x=n(14),M=(r(x),n(12)),B=(r(M),n(11));r(B);n(40).polyfill(),n(46),n(42),n(25);var F=g.default.getLoger("MessageEntrance"),H={version:"v.1.0.1",author:"www.3mang.com"},j=void 0,G=void 0,q=void 0,V=void 0,J=void 0,Y=void 0,W=void 0,Q=void 0,z=void 0,K=void 0,$=void 0,X=function(e){
function t(){i(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.sdkInfo=H,F.log(e.sdkInfo),U.default.setCurrentStatus(U.default.statusCode_0),e.on(_.default.MCU_ERROR,e._mcuErrorHandler.bind(e)),j=d.default,j.on("*",function(t,n){return e._emit(t,n)}),j.on(j.SUCCESS,e._sassJoinSuccessHandler.bind(e)),j.on(j.CLASS_INIT_SUCCESS,e._sassInitSuccessHandler.bind(e)),j.on(j.CLASS_GET_CLASS_DETAIL,e._sassGetClassDetailSuccessHandler.bind(e)),j.on(j.CLASS_GET_CLASS_PARAM,e._sassGetClassParamSuccessHandler.bind(e)),j.on(j.CLASS_SAVE_STATUS_INFO_SUCCESS,e._sassSaveClassStatusInfoSuccessHandler.bind(e)),j.on(j.CLASS_SAVE_RECORD_INFO_SUCCESS,e._sassSaveClassRecordInfoSuccessHandler.bind(e)),j.on(j.DELETE_DOCUMENT_SUCCESS,e._sassDeleteDocumentSuccess.bind(e)),G=h.default,G.on("*",function(t,n){return e._emit(t,n)}),G.on(_.default.CLASS_JOIN_SUCCESS,e._mcuJoinClassSuccessHandler.bind(e)),q=new R.default,q.on("*",function(t,n){return e._emit(t,n)}),q.on(_.default.CLASS_EXIT,e._doClassExit.bind(e)),q.on(_.default.CLASS_STATUS_INFO_CHANGE,e._onClassStatusInfoChange.bind(e)),q.on(_.default.CLASS_DELETE_ROSTER,e._onClassDeleteRoster.bind(e)),q.on(_.default.CLASS_NONENTITY_ROSTER,e._onClassNonentityRoster.bind(e)),q.on(_.default.CLASS_RECORD_START,e._onClassRecordStart.bind(e)),V=new C.default,V.on("*",function(t,n){return e._emit(t,n)}),J=new v.default,J.on("*",function(t,n){return e._emit(t,n)}),J.on(_.default.VIDEO_UPDATE,e.videoUpdate.bind(e)),Y=new A.default,Y.on("*",function(t,n){return e._emit(t,n)}),Y.on(_.default.AUDIO_UPDATE,e.audioUpdate.bind(e)),Q=new N.default,Q.on("*",function(t,n){return e._emit(t,n)}),W=new b.default,W.on("*",function(t,n){return e._emit(t,n)}),W.on(_.default.DOC_UPDATE,e.docUpdateHandler.bind(e)),W.on(_.default.DOC_DELETE,e.docDeleteHandler.bind(e)),W.on(b.default.DOC_JOIN_CHANNEL_SUCCESS,e.docJoinChannelSuccess.bind(e)),e.init=e._init,e.joinClass=e._joinClass,e.leaveClass=e._leaveClass,e.getMcuClientStatus=e._getMcuClientStatus,e.getClassStatusInfo=e._getClassStatusInfo,e.sendStartClass=e._sendStartClass,e.sendPauseClass=e._sendPauseClass,e.sendCloseClass=e._sendCloseClass,e.sendChatMsg=e._sendChatMsg,e.getVideoPlayPath=e._getVideoPlayPath,e.getVideoPublishPath=e._getVideoPublishPath,e.publishVideo=e._publishVideo,e.stopPublishVideo=e._stopPublishVideo,e.sendVideoBroadcastMsg=e._sendVideoBroadcastMsg,e.getAudioPlayPath=e._getPlayAudioPath,e.getAudioPublishPath=e._getPublishAudioPath,e.publishAudio=e._publishAudio,e.stopPublishAudio=e._stopPublishAudio,e.sendAudioBroadcastMsg=e.sendAudioCommandMsg,e.sendInsertAnnotaion=e._sendInsertAnnotaion,e.sendDeleteAllAnnotation=e._sendDeleteAllAnnotation,e.sendDeleteCurPageAnnotation=e._sendDeleteCurPageAnnotation,e.sendGotoPrev=e._sendGotoPrev,e.sendDocumentUpload=e._sendDocumentUpload,e.sendDocumentSwitchDoc=e._sendDocumentSwitchDoc,e.sendDocumentSwitchPage=e._sendDocumentSwitchPage,e.sendDocumentDelete=e._sassDeleteDocument,e.sendDocumentCommand=e._sendDocumentCommand,e.getDocImageFullPath=e._getDocImageFullPath,e.getDocPDFFullPath=e._getDocPDFFullPath,e}return s(t,e),a(t,[{key:"_mcuErrorHandler",value:function(e,t){if($){var n=t||"",r={code:e,reson:_.default.ErrorReson[e]+" "+n};F.error("MCU_ERROR",r),$(r)}}},{key:"_getMcuClientStatus",value:function(){return U.default.getCurrentStatus()}},{key:"_getClassDetail",value:function(){return U.default.getClassDetail()}},{key:"_getClassStatusInfo",value:function(){return U.default.classStatusInfo}},{key:"_doClassClose",value:function(e){this._leaveClass()}},{key:"_doClassExit",value:function(){this._leaveClass()}},{key:"_onClassStatusInfoChange",value:function(e){return U.default.getCurrentStatus().code!=U.default.statusCode_2.code?void F.warn("不能保存会议状态",U.default.getCurrentStatus()):void this._sassSaveClassStatusInfo()}},{key:"_onClassRecordStart",value:function(e){return U.default.getCurrentStatus().code!=U.default.statusCode_2.code?void F.warn("不能保存会议状态",U.default.getCurrentStatus()):void(j&&j.saveClassRecordContrlInfo(e))}},{key:"_onClassDeleteRoster",value:function(e){null!=e&&null!=e.nodeId&&U.default.isHost&&(F.log("有人员离开,检查一下离开的人员是否关闭推流"),J&&J.stopPublishVideo(e),Y&&Y.stopPublishAudio(e))}},{key:"_onClassNonentityRoster",value:function(e){if(null==e||null==e.nodeId)return void F.warn("onClassNonentityRoster.参数错误");var t={nodeId:e.nodeId};J&&J.stopPublishVideo(t),Y&&Y.stopPublishAudio(t)}},{key:"_init",value:function(e,t,n){return z=t,$=n,null==e||O.default.isEmptyObject(e)||null==t||null==n?(F.error("init初始化失败,参数错误"),void this._emit(_.default.MCU_ERROR,_.default.ERR_CLASS_INIT_PARAM)):null==e.classId||isNaN(e.classId)||null==e.portal||""==e.portal?(F.error("init初始化失败",e),void this._emit(_.default.MCU_ERROR,_.default.ERR_CLASS_INIT_PARAM)):(F.log("init",e),U.default.classId=parseInt(e.classId),U.default.portal=e.portal,U.default.userRole=e.userRole||k.default.normal,U.default.userId=e.userId||"0",U.default.userName=e.userName||"",void(j&&j.getJoinParams(U.default.getClassInfo())))}},{key:"_joinClass",value:function(e,t){return K=t,null==e||O.default.isEmptyObject(e)||null==t?(this._emit(_.default.MCU_ERROR,_.default.ERR_CLASS_JOIN_PARAM),void F.log("不能进入会议,传递的参数不对.",e)):null==e.userName||""==e.userName?(F.log("不能进入会议,传递的参数不对.名字不能为空"),void this._emit(_.default.MCU_ERROR,_.default.ERR_CLASS_JOIN_PARAM)):(null!=U.default.userName&&""!=U.default.userName||(U.default.userName=e.userName),U.default.password=e.password||"",U.default.hasCamera="boolean"==typeof e.hasCamera&&e.hasCamera,U.default.hasMicrophone="boolean"==typeof e.hasMicrophone&&e.hasMicrophone,void(j&&j.passwordAndMd5Checking(U.default.getClassInfo())))}},{key:"_sassInitSuccessHandler",value:function(e){if(U.default.md5=e.md5||"",U.default.msType=e.msType||1,U.default.siteId=e.siteId||"",U.default.classType=e.meetingType||0,U.default.passwordRequired=e.passwordRequired||!1,F.log("SASS平台获取入会验证信息成功."),U.default.setCurrentStatus(U.default.statusCode_1),z){var t={};t.siteId=U.default.siteId,t.classId=U.default.classId,t.userRole=U.default.userRole,t.userId=U.default.userId,t.userName=U.default.userName,t.classType=U.default.classType,U.default.userRole==k.default.host?t.passwordRequired=!0:t.passwordRequired=U.default.passwordRequired,z(t)}}},{key:"_sassJoinSuccessHandler",value:function(e){j&&j.getClassParam()}},{key:"_sassGetClassDetailSuccessHandler",value:function(e){F.log("获取getClassDetail完成."),U.default.classDetail=e,U.default.className=e.meetingName||"",U.default.classBeginTime=e.beginTime||"",U.default.classEndTime=e.endTime||"",j&&j.getClassParam()}},{key:"_sassGetClassParamSuccessHandler",value:function(e){F.log("获取课堂会议的完整信息完成."),e&&(U.default.mcuDelay=e.mcuDelay||60,U.default.className=e.meetingName||"",U.default.classBeginTime=e.beginTime||"",U.default.classEndTime=e.endTime||"",U.default.maxVideoChannels=e.maxVideoChannels,U.default.maxAudioChannels=e.maxAudioChannels,U.default.setDocListPrepare(e.docListPrepare),U.default.setRecordList(e.recordList),U.default.setDocList(e.docList),U.default.setMsList(e.msList),U.default.setRsList(e.rsList),U.default.setMcuList(e.mcuList),U.default.setMusicList(e.musicList),U.default.setMusicListPrepare(e.musicListPrepare),e.mcuList&&(U.default.MCUServerIP=e.mcuList[0].ip||"",U.default.MCUServerPort=e.mcuList[0].port||""),e.msList&&(U.default.MSServerIP=e.msList[0].ip||"",U.default.MSServerPort=e.msList[0].port||""),e.rsList&&(U.default.RSServerIP=e.rsList[0].ip||"",U.default.RSServerPort=e.rsList[0].port||""),e.docList&&(U.default.DOCServerIP=e.docList[0].ip||"",U.default.DOCServerPort=e.docList[0].port||""),e.recordList&&(U.default.RecordServerIP=e.recordList[0].ip||"",U.default.RecordServerPort=e.recordList[0].port||"")),e.currentInfo?(F.log("同步最后一次保存过的会议状态信息"),U.default.setClassStatusInfo(e.currentInfo),console.log(U.default.classStatusInfo)):F.log("还没有保存过会议状信息"),this._joinMCU()}},{key:"_sassSaveClassStatusInfo",value:function(){U.default.isHost?U.default.getCurrentStatus().code==U.default.statusCode_2.code?j.saveClassStatusInfo({classStatusInfo:U.default.classStatusInfo}):F.error("不能保存会议数据",U.default.getCurrentStatus()):F.log("没有保存会议状态信息的权限  isHost",U.default.isHost)}},{key:"_sassSaveClassStatusInfoSuccessHandler",value:function(e){F.log("保存会议状态信息成功.",e)}},{key:"_sassSaveClassRecordInfoSuccessHandler",value:function(e){F.log("保存会议录制信息成功.",e)}},{key:"_joinMCU",value:function(){F.log("加入底层MCU会议."),G&&G.joinMCU(U.default.getClassInfo())}},{key:"_mcuJoinClassSuccessHandler",value:function(e){if(F.log("MCU 会议成功."),U.default.setCurrentStatus(U.default.statusCode_2),K){var t={};t.DOCServerIP=U.default.DOCServerIP,t.DOCServerPort=U.default.DOCServerPort,t.classId=U.default.classId,t.className=U.default.className,t.h5Module=U.default.h5Module,t.isHost=U.default.isHost,t.maxAudioChannels=U.default.maxAudioChannels,t.maxVideoChannels=U.default.maxVideoChannels,t.mcuDelay=U.default.mcuDelay,t.msType=U.default.msType,t.nodeId=U.default.nodeId,t.password=U.default.password,t.passwordRequired=U.default.passwordRequired,t.role=U.default.role,t.siteId=U.default.siteId,t.topNodeID=U.default.topNodeID,t.userId=U.default.userId,t.userName=U.default.userName,t.userRole=U.default.userRole,t.userType=U.default.userType,t.siteId=U.default.siteId,t.classId=U.default.classId,t.userRole=U.default.userRole,t.userId=U.default.userId,t.passwordRequired=U.default.passwordRequired,t.classType=U.default.classType||k.default.CLASS_TYPE_INTERACT,F.log("加入会议成功"),console.log(t),K(t)}}},{key:"_sassDeleteDocument",value:function(e){return G.connected?null==e||O.default.isEmptyObject(e)?(F.error("sassDeleteDocument失败,参数错误",e),void this._emit(_.default.MCU_ERROR,_.default.ERR_DOC_DELETE_FAILED_PARAM)):null==e.itemIdx||isNaN(e.itemIdx)||null==e.docId||""==e.docId?(F.error("sassDeleteDocument失败",e),void this._emit(_.default.MCU_ERROR,_.default.ERR_DOC_DELETE_FAILED_PARAM)):(F.log("_sassDeleteDocument",e),void(j&&j.sassDeleteDocument(e))):void F.warn(U.default.getCurrentStatus())}},{key:"_sassDeleteDocumentSuccess",value:function(e){F.log("sassDeleteDocumentSuccess",e),this._sendDocumentDelete(e)}},{key:"_sendStartClass",value:function(e){return G.connected?void(q&&q.startClass(e)):void F.warn(U.default.getCurrentStatus())}},{key:"_sendPauseClass",value:function(e){return G.connected?void(q&&q.pauseClass(e)):void F.warn(U.default.getCurrentStatus())}},{key:"_sendCloseClass",value:function(e){return G.connected?void(q&&q.closeClass(e)):void F.warn(U.default.getCurrentStatus())}},{key:"_leaveClass",value:function(){return G.connected?(J&&J.stopPublishVideo(),Y&&Y.stopPublishAudio(),q&&(q.stopRecord(),q.leaveClass()),void(G&&(G.leaveMCU(),U.default.setCurrentStatus(U.default.statusCode_3)))):void F.warn(U.default.getCurrentStatus())}},{key:"_sendChatMsg",value:function(e){return G.connected?null===e||O.default.isEmptyObject(e)?void F.log("sendChatMsg 传递的参数不对",e):void(V&&V.sendChatMsg(e)):void F.warn(U.default.getCurrentStatus())}},{key:"videoUpdate",value:function(e){q&&q.updaterRosterStatus(e)}},{key:"_sendVideoBroadcastMsg",value:function(e){return G.connected?J?J.sendVideoBroadcastMsg(e):void 0:void F.warn(U.default.getCurrentStatus())}},{key:"_getVideoPlayPath",value:function(e){if(J)return J.getPlayVideoPath(e)}},{key:"_getVideoPublishPath",value:function(e){if(J)return J.getPublishVideoPath(e)}},{key:"_publishVideo",value:function(e){return G.connected?J?J.publishVideo(e):void 0:void F.warn(U.default.getCurrentStatus())}},{key:"_stopPublishVideo",value:function(e){return G.connected?J?J.stopPublishVideo(e):void 0:void F.warn(U.default.getCurrentStatus())}},{key:"audioUpdate",value:function(e){q&&q.updaterRosterStatus(e)}},{key:"sendAudioCommandMsg",value:function(e){return G.connected?Y?Y.sendAudioBroadcastMsg(e):void 0:void F.warn(U.default.getCurrentStatus())}},{key:"_getPlayAudioPath",value:function(e){if(Y)return Y.getAudioPlayPath(e)}},{key:"_getPublishAudioPath",value:function(e){if(Y)return Y.getAudioPublishPath(e)}},{key:"_publishAudio",value:function(e){return G.connected?Y?Y.publishAudio(e):void 0:void F.warn(U.default.getCurrentStatus())}},{key:"_stopPublishAudio",value:function(e){return G.connected?Y?Y.stopPublishAudio(e):void 0:void F.warn(U.default.getCurrentStatus())}},{key:"_sendInsertAnnotaion",value:function(e){return G.connected?void(Q&&Q.sendInsetAnnotaion(e)):void F.warn(U.default.getCurrentStatus())}},{key:"_sendDeleteAnnotaion",value:function(e){return G.connected?void(Q&&Q.sendDeleteAnnotaion(e)):void F.warn(U.default.getCurrentStatus())}},{key:"_sendDeleteCurPageAnnotation",value:function(e){return G.connected?void(Q&&Q.sendDeleteCurPageAnnotation(e)):void F.warn(U.default.getCurrentStatus())}},{key:"_sendDeleteAllAnnotation",value:function(e){return G.connected?void(Q&&Q.sendDeleteAllAnnotation(e)):void F.warn(U.default.getCurrentStatus())}},{key:"_sendGotoPrev",value:function(e){Q&&Q.sendGotoPrev(e)}},{key:"_getDocImageFullPath",value:function(e){return W?W.getDocImageFullPath(e):(F.error("文档模块还没有创建,无法获取"),[])}},{key:"_getDocPDFFullPath",value:function(e){return W?W.getDocPDFFullPath(e):(F.error("文档模块还没有创建,无法获取"),[])}},{key:"_sendDocumentUpload",value:function(e){return G.connected?void(W&&W.documentUpload(e)):void F.warn(U.default.getCurrentStatus())}},{key:"_sendDocumentSwitchDoc",value:function(e){return G.connected?void(W&&W.documentSwitchDoc(e)):void F.warn(U.default.getCurrentStatus())}},{key:"_sendDocumentSwitchPage",value:function(e){return G.connected?void(W&&W.documentSwitchPage(e)):void F.warn(U.default.getCurrentStatus())}},{key:"_sendDocumentCommand",value:function(e){return G.connected?void(W&&W.documentCommand(e)):void F.warn(U.default.getCurrentStatus())}},{key:"_sendDocumentDelete",value:function(e){return G.connected?void(W&&W.documentDelete(e)):void F.warn(U.default.getCurrentStatus())}},{key:"_documentDeleteAll",value:function(e){return G.connected?void(W&&W.documentDeleteAll(e)):void F.warn(U.default.getCurrentStatus())}},{key:"docUpdateHandler",value:function(e){return G.connected?(F.log("Doc UpdateId ->"),console.log(e),void(Q&&Q.docUpdateHandler(e))):void F.warn(U.default.getCurrentStatus())}},{key:"docDeleteHandler",value:function(e){Q&&Q.docDeleteHandler(e)}},{key:"docJoinChannelSuccess",value:function(){if(F.log("docJoinChannelSuccess  isHost=",U.default.isHost),console.log(U.default.docListPrepare),F.log("docJoinChannelSuccess  docListPrepare="),U.default.isHost){var e=!0,t=!1,n=void 0;try{for(var r,i=U.default.docListPrepare[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){var o=r.value;if(o){F.log("判断是否需要把提前上传的文档上传到mcu",o);var s={pageNum:o.pdfSize,fileName:o.name,fileType:o.type,relativeUrl:o.relativeLocation,url:o.absoluteLocation,creatUserId:o.createUserID,docId:o.id,md5:o.MD5,visible:!1};this._sendDocumentUpload(s)}}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}}}}]),t}(l.default),Z=X;t.default=Z;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(F,"loger","D:/work/mcuClientBranch/McuClient20170228/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(H,"_sdkInfo","D:/work/mcuClientBranch/McuClient20170228/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(j,"_sass","D:/work/mcuClientBranch/McuClient20170228/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(G,"_mcu","D:/work/mcuClientBranch/McuClient20170228/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(q,"_confer_ape","D:/work/mcuClientBranch/McuClient20170228/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(V,"_chat_ape","D:/work/mcuClientBranch/McuClient20170228/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(J,"_video_ape","D:/work/mcuClientBranch/McuClient20170228/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(Y,"_audio_ape","D:/work/mcuClientBranch/McuClient20170228/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(W,"_doc_ape","D:/work/mcuClientBranch/McuClient20170228/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(Q,"_whiteboard_ape","D:/work/mcuClientBranch/McuClient20170228/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(z,"_initSuccessCallBackFun","D:/work/mcuClientBranch/McuClient20170228/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(K,"_joinClassSuccessCallBackFun","D:/work/mcuClientBranch/McuClient20170228/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register($,"_mcuErrorCallBackFun","D:/work/mcuClientBranch/McuClient20170228/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(X,"MessageEntrance","D:/work/mcuClientBranch/McuClient20170228/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(Z,"default","D:/work/mcuClientBranch/McuClient20170228/src/EngineEntrance.js"))})()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return l}Object.defineProperty(t,"__esModule",{value:!0}),t.MessageTypes=void 0,t.createMcuClient=i;var o=n(28),s=r(o),a=n(2),u=r(a),l=new s.default;t.MessageTypes=u.default;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(l,"MCU_CLIENT","D:/work/mcuClientBranch/McuClient20170228/src/McuClientEngine.js"),__REACT_HOT_LOADER__.register(i,"createMcuClient","D:/work/mcuClientBranch/McuClient20170228/src/McuClientEngine.js"))})()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(8),l=r(u),f=n(1),d=r(f),c=n(2),h=r(c),p=n(5),_=r(p),E=n(43),g=r(E),y=n(3),R=r(y),m=d.default.getLoger("Sass"),C={},T=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return s(t,e),a(t,[{key:"getJoinParams",value:function(e){var n=this,r="http://"+e.portal+"/3m/api/meeting/joinParams.do?meetingNumber="+e.classId+"&userID="+e.userId;m.log("1.初始化init获取课堂校验信息."),console.log(r),console.log(e),fetch(r,{timeout:5e3}).then(function(e){if(e.ok)return e.json();throw m.error("初始化init获取课堂校验信息-网络异常.状态码:"+e.status),n._emit(h.default.MCU_ERROR,h.default.ERR_CLASS_INIT_NETWORK),""}).then(function(e){0===e.code?(m.log("初始化init获取课堂校验信息-完成"),n._emit(t.CLASS_INIT_SUCCESS,e)):1===e.code?n._emit(h.default.MCU_ERROR,h.default.ERR_CLASS_INIT_FAILED_1):2===e.code?n._emit(h.default.MCU_ERROR,h.default.ERR_CLASS_INIT_FAILED_2):3===e.code?n._emit(h.default.MCU_ERROR,h.default.ERR_CLASS_INIT_FAILED_3):4===e.code?n._emit(h.default.MCU_ERROR,h.default.ERR_CLASS_INIT_FAILED_4):n._emit(h.default.MCU_ERROR,h.default.ERR_CLASS_INIT_FAILED,e)}).catch(function(e){m.error("初始化init获取课堂校验信息-异常.状态码:"+e),n._emit(h.default.MCU_ERROR,h.default.ERR_CLASS_INIT_PROTOCOL,e)})}},{key:"passwordAndMd5Checking",value:function(e){return m.log("2.开始Sass校验"),console.log(e),C=e,"true"===C.passwordRequired||C.passwordRequired===!0?void this.sendPWDChecking():void this.sendMD5Checking()}},{key:"sendPWDChecking",value:function(){var e=this,t=0;C.userRole==R.default.host&&(t=1);var n="http://"+C.portal+"/3m/api/meeting/signIn.do?siteId="+C.siteId+"&classId="+C.classId+"&isTeacher="+t+"&password="+C.password;m.log("3.会议密码校验",n),fetch(n,{timeout:5e3}).then(function(t){if(200===t.status)return t.text();throw m.error("会议密码校验-网络异常.状态码:"+t.status),e._emit(h.default.MCU_ERROR,h.default.ERR_CLASS_JOIN_NETWORK),""}).then(function(t){var n=JSON.parse(t);return"false"===n.flag||n.flag===!1?(m.error("会议密码校验-失败."),void e._emit(h.default.MCU_ERROR,h.default.ERR_CLASS_PASSWORD_WRONG)):"true"===n.flag||n.flag===!0?(m.log("会议密码校验-成功."),void e.sendMD5Checking()):(m.error("会议密码校验-协议异常.",n),void e._emit(h.default.MCU_ERROR,h.default.ERR_CLASS_JOIN_PROTOCOL))}).catch(function(t){m.error("会议密码校验-异常.状态码:"+t),e._emit(h.default.MCU_ERROR,h.default.ERR_CLASS_JOIN_FAILED)})}},{key:"sendMD5Checking",value:function(){var e=this,n="http://"+C.portal+"/3m/meeting/md5CheckMeeting.do?siteId="+C.siteId+"&meetingNumber="+C.classId+"&userId="+C.userId+"&userName="+C.userName+"&userType="+C.userType+"&nopassword="+C.passwordRequired+"&md5="+C.md5;m.log("4.MD5校验",n),fetch(n,{timeout:5e3}).then(function(t){if(200===t.status)return t.json();throw m.error("MD5校验-网络异常.状态码:"+t.status),e._emit(h.default.MCU_ERROR,h.default.ERR_CLASS_JOIN_NETWORK),""}).then(function(n){"true"==n.flag||1==n.flag?(m.log("MD5校验完成"),console.log(n),e._emit(t.SUCCESS,n)):(m.log("MD5校验-失败."),e._emit(h.default.MCU_ERROR,h.default.ERR_CLASS_MD5_WRONG))}).catch(function(t){m.error("MD5校验-异常.状态码:"+t),e._emit(h.default.MCU_ERROR,h.default.ERR_CLASS_JOIN_FAILED)})}},{key:"getClassDetail",value:function(){var e=this,n="http://"+C.portal+"/3m/meeting/getClassH5.do?classNumber="+C.classId;m.log("获取Class详情.",n),fetch(n,{timeout:5e3}).then(function(t){if(t.ok)return t.json();throw m.error("获取Class详情-网络异常.状态码:"+t.status),e._emit(h.default.MCU_ERROR,h.default.ERR_GET_CLASS_DETAIL),""}).then(function(n){0===n.errorCode?(m.log("获取Class详情完成"),e._emit(t.CLASS_GET_CLASS_DETAIL,n)):(m.warn("获取Class详情失败."),e._emit(h.default.MCU_ERROR,h.default.ERR_GET_CLASS_DETAIL))}).catch(function(t){m.error("获取Class详情异常.状态码:"+t),e._emit(h.default.MCU_ERROR,h.default.ERR_GET_CLASS_DETAIL)})}},{key:"getClassParam",value:function(){var e=this,n=(new Date).getTime(),r=(0,g.default)(C.classId+""+n),i="http://"+C.portal+"/3m/api/meeting/detail.do?meetingNumber="+C.classId+"&timestamp="+n+"&authId="+r;m.log("5.获取课堂会议的完整信息 "),console.log(i),fetch(i,{timeout:5e3}).then(function(t){if(t.ok)return t.json();throw m.error("获取课堂会议的完整信息-网络异常.状态码:"+t.status),e._emit(h.default.MCU_ERROR,h.default.ERR_GET_CLASS_PARAML),""}).then(function(n){0===n.code?(m.log("获取课堂会议的完整信息完成"),e._emit(t.CLASS_GET_CLASS_PARAM,n)):(m.warn("获取课堂会议的完整信息 失败."),e._emit(h.default.MCU_ERROR,h.default.ERR_GET_CLASS_PARAML))}).catch(function(t){m.error("获取课堂会议的完整信息异常.状态码:"+t),e._emit(h.default.MCU_ERROR,h.default.ERR_GET_CLASS_PARAML)})}},{key:"sassDeleteDocument",value:function(e){var n=this,r=(new Date).getTime(),i=(0,g.default)(e.docId+""+e.classId+r),o="http://"+C.portal+"/3m/api/document/deleteRelation.do?docId="+e.docId+"&classId="+C.classId+"&timestamp="+r+"&authId="+i;m.log("sassDeleteDocument",o),fetch(o,{timeout:5e3}).then(function(e){if(e.ok)return e.json();throw m.error("sassDeleteDocument-网络异常.状态码:"+e.status),n._emit(h.default.MCU_ERROR,h.default.ERR_DOC_DELETE_FAILED),""}).then(function(r){0===r.code?(m.log("sassDeleteDocument 完成"),n._emit(t.DELETE_DOCUMENT_SUCCESS,e)):(m.warn("sassDeleteDocumnt 失败."),n._emit(h.default.MCU_ERROR,h.default.ERR_DOC_DELETE_FAILED))}).catch(function(e){m.error("sassDeleteDocument异常.状态码:"+e),n._emit(h.default.MCU_ERROR,h.default.ERR_DOC_DELETE_FAILED)})}},{key:"saveClassStatusInfo",value:function(e){var n=this,r=(new Date).getTime(),i=(0,g.default)(C.classId+""+r),o=JSON.stringify(e.classStatusInfo),s="http://"+C.portal+"/3m/api/meeting/saveInfo.do";m.log("saveClassStatusInfo",s),fetch(s,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"classId="+C.classId+"&info="+o+"&timestamp="+r+"&authId="+i,timeout:5e3}).then(function(e){if(e.ok)return e.json();throw m.error("saveClassStatusInfo-网络异常.状态码:"+e.status),""}).then(function(r){0===r.code?(m.log("saveClassStatusInfo 完成"),n._emit(t.CLASS_SAVE_STATUS_INFO_SUCCESS,e)):1===r.code?m.log("saveClassStatusInfo 失败 课堂号为空"):2===r.code?m.log("saveClassStatusInfo 失败 无效的课堂号"):3===r.code?m.log("saveClassStatusInfo 失败 验证信息错误"):m.warn("saveClassStatusInfo 失败.",r)}).catch(function(e){m.error("saveClassStatusInfo.状态码:"+e)})}},{key:"saveClassRecordContrlInfo",value:function(e){var n=this;m.log("保存开始录制信息");var r="3mang123A",i=_.default.siteId,o=_.default.classId,s=_.default.userId,a=_.default.userName,u=_.default.className,l=_.default.classBeginTime,f=_.default.classEndTime,d="",c=_.default.recordFileName,h=_.default.recordFileName,p="",E=(_.default.classStatus,_.default.classTimestamp),y=(new Date).getTime(),R=(0,g.default)(r+i+o+y),T="http://"+C.portal+"/3m/recordingMeeting/insertRecordingMeeting.do?siteID="+i+"&meetingID="+o+"&userID="+s+"&userName="+a+"&meetingName="+u+"&startTime="+l+"&endTime="+f+"&playUrl="+d+"&streamName="+c+"&downloadUrl="+p+"&configFile="+h+"&timestamp="+y+"&recordTimestamp="+E+"&authId="+R;m.log("saveClassRecordContrlInfo",T),fetch(T,{timeout:5e3}).then(function(e){if(e.ok)return e.json();throw m.error("保存开始录制信息-网络异常.状态码:"+e.status),""}).then(function(r){0===r.errorCode?(m.log("保存开始录制信息 完成"),n._emit(t.CLASS_SAVE_RECORD_INFO_SUCCESS,e)):m.warn("保存开始录制信息 失败.",r)}).catch(function(e){m.error("保存开始录制信息异常.状态码:"+e)})}}]),t}(l.default);T.prototype.SUCCESS=T.SUCCESS="Sass.success",T.prototype.CLASS_INIT_SUCCESS=T.CLASS_INIT_SUCCESS="sass.class.init.success",T.prototype.CLASS_GET_CLASS_PARAM=T.CLASS_GET_CLASS_PARAM="class.getClassParam.message",T.prototype.CLASS_GET_CLASS_DETAIL=T.CLASS_GET_CLASS_DETAIL="class.getClassDetail.message",T.prototype.DELETE_DOCUMENT_SUCCESS=T.DELETE_DOCUMENT_SUCCESS="class.deleteDocumentSuccess.message",T.prototype.CLASS_SAVE_STATUS_INFO_SUCCESS=T.CLASS_SAVE_STATUS_INFO_SUCCESS="class.saveClassStatusInfoSuccess.message",T.prototype.CLASS_SAVE_RECORD_INFO_SUCCESS=T.CLASS_SAVE_RECORD_INFO_SUCCESS="class.saveClassRecordInfoSuccess.message";var v=new T;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(m,"loger","D:/work/mcuClientBranch/McuClient20170228/src/Sass.js"),__REACT_HOT_LOADER__.register(C,"confInfo","D:/work/mcuClientBranch/McuClient20170228/src/Sass.js"),__REACT_HOT_LOADER__.register(T,"Sass","D:/work/mcuClientBranch/McuClient20170228/src/Sass.js"),__REACT_HOT_LOADER__.register(v,"default","D:/work/mcuClientBranch/McuClient20170228/src/Sass.js"))})()},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){n(this,e),this.timer=0,this.delay=1e3,this.counter=0,this.callBackDelay=1,this.callBackFun=null,this.isStart=!1}return r(e,[{key:"addTimerCallBack",value:function(e,t){this.callBackFun=e,this.callBackDelay=t}},{key:"startTimer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.isStart||(this.isStart=!0,e&&parseInt(e)>0?this.counter=e:this.counter=0,console.log("startTimer",this.counter),this.timerClear(),this.timerStart())}},{key:"stopTimer",value:function(){console.log("stopTimer",this.counter),this.isStart=!1,this.timerClear()}},{key:"updateCounter",value:function(){this.counter++,null!=this.callBackFun&&this.counter%this.callBackDelay==0&&this.callBackFun()}},{key:"timerStart",value:function(){this.timer=setInterval(this.updateCounter.bind(this),this.delay)}},{key:"timerClear",value:function(){clearInterval(this.timer)}}]),e}(),o=i;t.default=o;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(i,"TimerCounter","D:/work/mcuClientBranch/McuClient20170228/src/TimerCounter.js"),__REACT_HOT_LOADER__.register(o,"default","D:/work/mcuClientBranch/McuClient20170228/src/TimerCounter.js"))})()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(7),l=r(u),f=n(3),d=r(f),c=n(6),h=r(c),p=n(1),_=r(p),E=n(2),g=r(E),y=n(5),R=r(y),m=n(4),C=r(m),T=n(16),v=r(T),S=_.default.getLoger("AudioApe"),A=function(e){function t(){i(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,d.default.AUDIO_SESSION_ID,d.default.AUDIO_SESSION_NAME,d.default.AUDIO_SESSION_TAG));return e.mediaModule=new v.default,e.mediaModule.MEDIA_OBJ_TABLE_ID=d.default.AUDIO_OBJ_TABLE_ID,e.mediaModule.mediaChannels={},e.registerKey(e._session_id,e._session_name,e._session_tag,new ArrayBuffer),e.registerObj(h.default.RCPDU_REG_REGISTER_TABLE,d.default.AUDIO_OBJ_TABLE_ID,d.default.AUDIO_OBJ_TABLE_NAME,d.default.AUDIO_OBJ_TABLE_TAG,0,new ArrayBuffer),e.on(h.default.RCPDU_SEND_AUDIO_DATA_REQUEST,e.receiveAudiooCommandHandler.bind(e)),e}return s(t,e),a(t,[{key:"onJoinChannelHandlerSuccess",value:function(){this.mediaModule.maxMediaChannel=R.default.maxAudioChannels}},{key:"getAudioPlayPath",value:function(e){return S.log("getAudioPlayPath"),this.mediaModule.getMediaPlayPath(e)}},{key:"getAudioPublishPath",value:function(e){return S.log("getAudioPublishPath"),this.mediaModule.getMediaPublishPath(e)}},{key:"publishAudio",value:function(e){if(!this.mcu.connected)return S.warn(R.default.getCurrentStatus()),{code:d.default.RETURN_FAILED,data:"已经断开连接"};if(null==e||null==e.channelId||null==e.classId||null==e.userId||""==e.userId||null==e.siteId||null==e.timestamp)return S.warn("publishAudio,参数错误",e),this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG),{code:d.default.RETURN_FAILED,data:"参数错误"};if(0!=this.mediaModule.getOpeningMediaChannel(R.default.nodeId))return S.warn("publishAudio,已经存在一个流,不能再推"),{code:d.default.RETURN_FAILED,data:"已经存在一个流,不能再推"};var t=this.mediaModule.getFreeMediaChannel();if(0==t)return S.warn("publishAudio,没有空闲的channel "),{code:d.default.RETURN_FAILED,data:"不能再打开更多的设备"};if(this.mediaModule.checkChannelIsOpening(e.channelId))return S.warn(e.channelId,"频道已经被占用"),{code:d.default.RETURN_FAILED,data:"频道已经被占用!"};var n={};return n.status=d.default.CHANNEL_STATUS_OPENING,n.fromNodeId=R.default.nodeId,n.channelId=e.channelId,n.timestamp=e.timestamp,n.classId=e.classId,n.siteId=e.siteId,n.toNodeId=0,n.userId=e.userId,n.mediaType=d.default.MEDIA_TYPE_AUDIO,this.sendTableUpdateHandler(n),{code:d.default.RETURN_SUCCESS,data:"推流成功!"}}},{key:"stopPublishAudio",value:function(e){if(S.log("stopPublishAudio"),!this.mcu.connected)return S.warn(R.default.getCurrentStatus()),{code:d.default.RETURN_FAILED,data:"已经断开连接"};var t=void 0;t=e&&parseInt(e.nodeId)>=0?parseInt(e.nodeId):R.default.nodeId;var n=this.mediaModule.getOpeningMediaChannel(t);if(0==n)return S.warn(t,"stopPublishAudio,没有占用channel,不需要关闭"),{code:d.default.RETURN_FAILED,data:"没有占用channel,不需要关闭"};var r={};r.status=d.default.CHANNEL_STATUS_RELEASED,r.fromNodeId=0,r.channelId=n,r.timestamp=0,r.classId=R.default.classId,r.toNodeId=0,r.mediaType=d.default.MEDIA_TYPE_DEFAULT,this.sendTableUpdateHandler(r)}},{key:"sendAudioBroadcastMsg",value:function(e){if(!this.mcu.connected)return S.warn(R.default.getCurrentStatus()),{code:d.default.RETURN_FAILED,data:"已经断开连接"};if(null===this._classInfo||C.default.isEmptyObject(this._classInfo))return S.log("sendAudioBroadcastMsg.McuClient还未初始化数据!"),
0==R.default.getCurrentStatus().code||1==R.default.getCurrentStatus().code?(this._emit(g.default.MCU_ERROR,g.default.ERR_APE_SEND_FAILED_NO_JOIN),{code:d.default.RETURN_FAILED,data:"sendAudioBroadcastMsg.McuClient还未初始化数据"}):{code:d.default.RETURN_FAILED,data:"sendAudioBroadcastMsg.McuClient还未初始化数据"};if(null==e)return S.warn("sendAudioBroadcastMsg,参数错误",e),this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG),{code:d.default.RETURN_FAILED,data:"sendAudioBroadcastMsg,参数错误"};if(S.log("发送Audio消息.",e),null!=e.actionType&&e.actionType==d.default.MEDIA_ACTION_OPEN_CAMERA){var t=this.mediaModule.getFreeMediaChannel();if(0==t)return S.warn("sendAudioBroadcastMsg,不能再打开更多的设备",e),{code:d.default.RETURN_FAILED,data:"不能再打开更多的设备"}}var n=new h.default.RCAudioSendDataRequestPdu;return n.type=h.default.RCPDU_SEND_AUDIO_DATA_REQUEST,n.isPublic=!0,n.fromNodeId=R.default.nodeId,n.toNodeId=parseInt(e.toNodeId)||0,n.actionType=parseInt(e.actionType)||d.default.MEDIA_ACTION_DEFAULT,n.data=this._rCArrayBufferUtil.strToUint8Array("h5"+e.data),n.isPublic||0==n.toNodeId?(S.log("发送公聊消息."),this.sendChatUniform(n)):(S.log("发送私聊消息."),this.send(n)),{code:d.default.RETURN_SUCCESS,data:""}}},{key:"sendTableUpdateHandler",value:function(e){S.log("audio,sendTableUpdateHandler ");var t=this.packPdu(e,e.channelId);if(null==t)return void S.warn("sendTableUpdateHandler error,updateModelPdu=null");var n=new h.default.RCRegistryTableItemPdu;n.itemIdx=e.channelId,n.owner=0,n.itemData=t.toArrayBuffer();var r=new h.default.RCRegistryTableUpdateItemPdu;r.type=h.default.RCPDU_REG_TABLE_UPDATE_PDU,r.items.push(n);var i=new h.default.RCRegistryUpdateObjPdu;i.objId=d.default.AUDIO_OBJ_TABLE_ID,i.subType=r.type,i.userData=r.toArrayBuffer();var o=new h.default.RCAdapterItemPdu;o.type=h.default.RCPDU_REG_UPDATE_OBJ,o.itemData=i.toArrayBuffer();var s=new h.default.RCAdapterPdu;s.type=h.default.RCPDU_REG_ADAPTER,s.item.push(o),S.log("发送更新AUDIO.itemIdx="+n.itemIdx),this.sendUniform(s,!0)}},{key:"receiveAudiooCommandHandler",value:function(e){var t=h.default.RCAudioSendDataRequestPdu.decode(e);return null==t?void S.warn("音频消息处理,收到的消息为null,不做处理"):(t.data=this._rCArrayBufferUtil.uint8ArrayToStr(t.data,2),S.log("音频消息处理 receiveAudiooCommandHandler.",t),void(0!=t.toNodeId&&t.toNodeId!=R.default.nodeId?S.log("音频消息不处理 toNodeId=",t.toNodeId,"my nodeId=",R.default.nodeId):this._emit(g.default.AUDIO_BROADCAST,t)))}},{key:"tableUpdateHandler",value:function(e,t,n){var r=this.unPackPdu(e,t,n);this.mediaModule.mediaChannels[t]=r,this._emit(g.default.AUDIO_UPDATE,r)}},{key:"packPdu",value:function(e,t){if(S.log("packPdu "),null==e||null==t)return this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG),null;var n=new h.default.RCAudioChannelInfoPdu;return n.status=e.status||d.default.CHANNEL_STATUS_RELEASED,n.channelId=t,n.siteId=e.siteId||R.default.siteId,n.classId=parseInt(e.classId)||parseInt(R.default.classId),n.userId=e.userId||"0",n.mediaType=e.mediaType||d.default.MEDIA_TYPE_AUDIO,n.timestamp=e.timestamp||C.default.creatTimestamp(),n.fromNodeId=R.default.nodeId,n.toNodeId=0,console.log("packPdu",n),n}},{key:"unPackPdu",value:function(e,t,n){if(S.log("unPackPdu "),null==e||null==t||null==n)return this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG),null;try{var r=h.default.RCAudioChannelInfoPdu.decode(n);return S.log("unPackPdu",r),r}catch(e){S.log("unPackPdu error,itemIdx="+t+"  err:"+e.message)}return null}}]),t}(l.default),I=A;t.default=I;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(S,"loger","D:/work/mcuClientBranch/McuClient20170228/src/apes/AudioApe.js"),__REACT_HOT_LOADER__.register(A,"AudioApe","D:/work/mcuClientBranch/McuClient20170228/src/apes/AudioApe.js"),__REACT_HOT_LOADER__.register(I,"default","D:/work/mcuClientBranch/McuClient20170228/src/apes/AudioApe.js"))})()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(7),l=r(u),f=n(3),d=r(f),c=n(6),h=r(c),p=n(1),_=r(p),E=n(2),g=r(E),y=n(4),R=r(y),m=_.default.getLoger("ChatApe"),C=function(e){function t(){i(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,d.default.CHAT_SESSION_ID,d.default.CHAT_SESSION_NAME,d.default.CHAT_SESSION_TAG));return e.registerKey(e._session_id,e._session_name,e._session_tag,new ArrayBuffer),e.registerObj(h.default.RCPDU_REG_REGISTER_TABLE,d.default.CHAT_OBJ_TABLE_ID,d.default.CHAT_OBJ_TABLE_NAME,d.default.CHAT_OBJ_TABLE_TAG,0,new ArrayBuffer),e.on(h.default.RCPDU_SEND_CHAT_DATA_REQUEST,e.chatMsgIncomingHandler.bind(e)),e}return s(t,e),a(t,[{key:"sendChatMsg",value:function(e){if(null===this._classInfo||R.default.isEmptyObject(this._classInfo)){if(m.log("不能发送聊天消息.McuClient还未初始化数据!"),0==GlobalConfig.getCurrentStatus().code||1==GlobalConfig.getCurrentStatus().code)return void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_SEND_FAILED_NO_JOIN)}else{m.log("发送聊天消息.",e.to,e.message);var t=new h.default.RCChatSendDataRequestPdu;t.type=h.default.RCPDU_SEND_CHAT_DATA_REQUEST,t.initiator=this._classInfo.nodeId,t.peer=parseInt(e.to),t.userData=this._rCArrayBufferUtil.strToUint8Array("h5"+e.message),t.fromName=this._rCArrayBufferUtil.strToUint8Array("h5"+this._classInfo.userName),t.fromRole=this._classInfo.userRole,t.isPublic=!0,t.isPublic||0==t.peer?(m.log("发送公聊消息."),this.sendChatUniform(t)):(m.log("发送私聊消息."),this.send(t))}}},{key:"chatMsgIncomingHandler",value:function(e){var t=h.default.RCChatSendDataRequestPdu.decode(e),n={};n.fromNodeID=t.initiator,n.toNodeID=t.peer,n.message=this._rCArrayBufferUtil.uint8ArrayToStr(t.userData,2),n.fromName=this._rCArrayBufferUtil.uint8ArrayToStr(t.fromName,2),n.fromRole=t.fromRole,m.log("接收聊天消息.",n),this._emit(g.default.CHAT_RECEIVE,n)}}]),t}(l.default),T=C;t.default=T;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(m,"loger","D:/work/mcuClientBranch/McuClient20170228/src/apes/ChatApe.js"),__REACT_HOT_LOADER__.register(C,"ChatApe","D:/work/mcuClientBranch/McuClient20170228/src/apes/ChatApe.js"),__REACT_HOT_LOADER__.register(T,"default","D:/work/mcuClientBranch/McuClient20170228/src/apes/ChatApe.js"))})()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(7),l=r(u),f=n(3),d=r(f),c=n(6),h=r(c),p=n(1),_=r(p),E=n(2),g=r(E),y=n(5),R=r(y),m=n(4),C=r(m),T=_.default.getLoger("DocApe"),v=0,S=function(e){function t(){i(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,d.default.DOCSHARING_SESSION_ID,d.default.DOCSHARING_SESSION_NAME,d.default.DOCSHARING_SESSION_TAG));return e.docList={},e._apeDelayed=!1,e.registerKey(e._session_id,e._session_name,e._session_tag,new ArrayBuffer),e.registerObj(h.default.RCPDU_REG_REGISTER_TABLE,d.default.DOCSHARING_OBJ_TABLE_ID,d.default.DOCSHARING_OBJ_TABLE_NAME,d.default.DOCSHARING_OBJ_TABLE_TAG,0,new ArrayBuffer),e}return s(t,e),a(t,[{key:"documentUpload",value:function(e){if(null==e||C.default.isEmptyObject(e))return T.log("documentUpload失败,参数错误"),void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG);if(this.checkDocId(e.docId))return void T.warn("documentUpload  文档的docId不无效或已经存在相同的docId,不需要上传");v=C.default.creatSoleNumberFromTimestamp();var t=this.packPdu(e,v);if(null==t)return T.log("documentUpload失败,参数错误"),void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG);var n=new h.default.RCRegistryTableItemPdu;n.itemIdx=v,n.registerObjId=d.default.DOCSHARING_OBJ_TABLE_ID,n.owner=0,n.itemData=t.toArrayBuffer();var r=new h.default.RCRegistryTableInsertItemPdu;r.type=h.default.RCPDU_REG_TABLE_INSERT_PDU,r.items.push(n);var i=new h.default.RCRegistryUpdateObjPdu;i.objId=d.default.DOCSHARING_OBJ_TABLE_ID,i.subType=r.type,i.userData=r.toArrayBuffer();var o=new h.default.RCAdapterItemPdu;o.type=h.default.RCPDU_REG_UPDATE_OBJ,o.itemData=i.toArrayBuffer();var s=new h.default.RCAdapterPdu;s.type=h.default.RCPDU_REG_ADAPTER,s.item.push(o),T.log("文档upload  tableItemPdu.itemIdx="+n.itemIdx),this.sendUniform(s,!0)}},{key:"updaterDoc",value:function(e,t){if(T.log("文档===updaterDoc ",t),null==e||null==t)return this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG),null;T.log("文档===updaterDoc ",e);var n=this.packPdu(e,t),r=new h.default.RCRegistryTableItemPdu;r.itemIdx=t,r.owner=0,r.itemData=n.toArrayBuffer();var i=new h.default.RCRegistryTableUpdateItemPdu;i.type=h.default.RCPDU_REG_TABLE_UPDATE_PDU,i.items.push(r);var o=new h.default.RCRegistryUpdateObjPdu;o.objId=d.default.DOCSHARING_OBJ_TABLE_ID,o.subType=i.type,o.userData=i.toArrayBuffer();var s=new h.default.RCAdapterItemPdu;s.type=h.default.RCPDU_REG_UPDATE_OBJ,s.itemData=o.toArrayBuffer();var a=new h.default.RCAdapterPdu;a.type=h.default.RCPDU_REG_ADAPTER,a.item.push(s),T.log("发送更新文档.itemIdx="+r.itemIdx),this.sendUniform(a,!0)}},{key:"getDocImageFullPath",value:function(e){if(null==e||null==e.relativeUrl||""==e.relativeUrl)return T.warn("获取文档完整地址,传递的参数不对.",e),[];var t=""==R.default.DOCServerPort||null==R.default.DOCServerPort?"":":"+R.default.DOCServerPort,n=R.default.DOCServerIP+t+e.relativeUrl;n&&n.indexOf("http://")<0&&(n="http://"+n);var r="jpg";switch(e.type){case"jpg":r="jpg",n=this.replacePathType(n)+".jpg";break;case"png":r="png",n=this.replacePathType(n)+".png"}if(e.pageNum&&parseInt(e.pageNum)>1){var i=n.lastIndexOf("/");if(i>0){for(var o=n.substr(0,i),s=[],a=1;a<=e.pageNum;a++)s.push(o+"/"+a+"."+r);return s}return[n]}return[n]}},{key:"getDocPDFFullPath",value:function(e){if(null==e||null==e.relativeUrl||""==e.relativeUrl)return T.warn("获取文档完整地址,传递的参数不对.",e),[];var t=""==R.default.DOCServerPort||null==R.default.DOCServerPort?"":":"+R.default.DOCServerPort,n=R.default.DOCServerIP+t+e.relativeUrl;return n&&n.indexOf("http://")<0&&(n="http://"+n),n=this.replacePathType(n)+".pdf",[n]}},{key:"replacePathType",value:function(e){var t=e;return t=t.replace(/.jpg/g,""),t=t.replace(/.png/g,""),t=t.replace(/.swf/g,""),t=t.replace(/.pdf/g,"")}},{key:"documentSwitchDoc",value:function(e){if(null==e||null==e.itemIdx)return T.warn("documentSwitch失败,参数错误",e),void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG);if(e.itemIdx==R.default.activeDocId&&0!=R.default.activeDocId)return void T.warn("文档已经显示",e.itemIdx,R.default.activeDocId);var t=void 0;0!=R.default.activeDocId&&(t=this.docList[R.default.activeDocId],t&&(t.action=d.default.DOC_ACTION_NORMAL,t.visible=!1));var n=this.docList[e.itemIdx];return null==n?(T.warn("documentSwitch失败,文档不存在",e),void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG)):(n.action=d.default.DOC_ACTION_SWITCH_DOC,n.visible=e.visible||!1,T.log("切换文档,当前文档和上一个显示的文档都需要更新状态"),console.log({oldDoc:t,nowDoc:n}),this.updaterDoc(n,n.itemIdx),void(t&&this.updaterDoc(t,t.itemIdx)))}},{key:"documentSwitchPage",value:function(e){var t=this.docList[e.itemIdx];return null==t?(T.log("documentCommand失败,文档不存在",e),void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG)):(t.action=d.default.DOC_ACTION_SWITCH_PAGE,t.curPageNo=parseInt(e.curPageNo)||1,t.curPageNo<1&&(t.curPageNo=1),void this.updaterDoc(t,t.itemIdx))}},{key:"documentCommand",value:function(e){var t=this.docList[e.itemIdx];return null==t?(T.log("documentCommand失败,文档不存在",e),void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG)):(t.action=d.default.DOC_ACTION_COMMAND,void this.updaterDoc(t,t.itemIdx))}},{key:"documentDeleteAll",value:function(e){for(var t in this.docList)T.log("删除文档数据,itemIdx:"+t),this.documentDelete({itemIdx:t})}},{key:"documentDelete",value:function(e){var t=new h.default.RCRegistryTableDeleteItemPdu;t.type=h.default.RCPDU_REG_TABLE_DELETE_PDU,t.itemIdx=parseInt(e.itemIdx);var n=new h.default.RCRegistryUpdateObjPdu;n.objId=d.default.DOCSHARING_OBJ_TABLE_ID,n.subType=t.type,n.userData=t.toArrayBuffer();var r=new h.default.RCAdapterItemPdu;r.type=h.default.RCPDU_REG_UPDATE_OBJ,r.itemData=n.toArrayBuffer();var i=new h.default.RCAdapterPdu;i.type=h.default.RCPDU_REG_ADAPTER,i.item.push(r),T.log("文档发送删除数据============="+t.itemIdx),this.sendUniform(i,!0)}},{key:"tableInsertHandler",value:function(e,t,n){var r=this.unPackPdu(e,t,n);this.docList[t]=r,"true"!=r.visible&&1!=r.visible||(R.default.activeDocId=r.itemIdx,R.default.activeDocCurPage=r.curPageNo,T.log("tableInsertHandler 设置当前激活的文档id")),T.log("tableInsertHandler 发送给客户端"),console.log(r),this._emit(g.default.DOC_UPDATE,r)}},{key:"tableDeleteHandler",value:function(e,t){if(T.log("tableDeleteHandler",e,t),t&&t.itemIdx)for(var n=t.itemIdx.length,r=t.itemIdx,i=0;i<n;i++)if(this.docList[r[i]]){T.log("删除文档数据:",r[i]),this._emit(g.default.DOC_DELETE,r[i]);var o=this.docList[r[i]];!o||"true"!=o.visible&&1!=o.visible||(R.default.activeDocId=0,R.default.activeDocCurPage=1,T.log("tableDeleteHandler 设置当前激活的文档id")),delete this.docList[r[i]]}}},{key:"tableUpdateHandler",value:function(e,t,n){var r=this.unPackPdu(e,t,n);null!=r?(this.docList[t]=r,!r||"true"!=r.visible&&1!=r.visible||(R.default.activeDocId=r.itemIdx,R.default.activeDocCurPage=r.curPageNo,T.log("tableUpdateHandler 设置当前激活的文档id")),T.log("tableUpdateHandler 发送给客户端"),console.log(r),this._emit(g.default.DOC_UPDATE,r)):T.log("tableUpdateHandler 数据无效--> itemIdx",t)}},{key:"onJoinChannelHandlerSuccess",value:function(){var e=this;T.log(this._session_name+" onJoinChannelHandlerSuccess==========================="),this._apeDelayed?setTimeout(function(){e._emit(t.DOC_JOIN_CHANNEL_SUCCESS)},R.default.mcuDelay+R.default.docDelay||12e3+R.default.docDelay):this._emit(t.DOC_JOIN_CHANNEL_SUCCESS)}},{key:"checkDocId",value:function(e){if(null==e)return T.warn("checkDocId  _docId参数为null"),!0;for(var t in this.docList){var n=this.docList[t];if(T.log("item.docId==============_docId",n.docId,e),n&&n.docId==e)return!0}return!1}},{key:"packPdu",value:function(e,t){if(T.log("文档===packPdu "),null==e||null==t)return this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG),null;var n=new h.default.RCDocSendDataModelPdu;return n.itemIdx=t,n.owner=R.default.nodeId,n.from=R.default.nodeId,n.curPageNo=e.curPageNo||1,n.pageNum=e.pageNum||1,n.fileType=e.fileType||"",n.creatUserId=e.creatUserId||"0",n.url=e.url||"",n.relativeUrl=e.relativeUrl||"",n.curV=e.curV||0,n.curH=e.curH||0,n.scale=e.scale||100,n.visible=e.visible||!1,n.action=e.action||d.default.DOC_ACTION_NORMAL,n.docId=e.docId||"",n.md5=e.md5||"",n.fileName=e.fileName||"doc_"+t,n.dynamicTS=e.dynamicTS||"0",console.log(n),n}},{key:"unPackPdu",value:function(e,t,n){if(T.log("文档===unPackPdu "),null==e||null==t||null==n)return this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG),null;try{var r=h.default.RCDocSendDataModelPdu.decode(n);return T.log(r),r}catch(e){T.log("文档收到数据 unPackPdu Pdu解析错误,itemIdx="+t+"  err:"+e.message)}return null}}]),t}(l.default);S.prototype.DOC_JOIN_CHANNEL_SUCCESS=S.DOC_JOIN_CHANNEL_SUCCESS="docServer.join.channel.success";var A=S;t.default=A;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(T,"loger","D:/work/mcuClientBranch/McuClient20170228/src/apes/DocApe.js"),__REACT_HOT_LOADER__.register(v,"itemIdx","D:/work/mcuClientBranch/McuClient20170228/src/apes/DocApe.js"),__REACT_HOT_LOADER__.register(S,"DocApe","D:/work/mcuClientBranch/McuClient20170228/src/apes/DocApe.js"),__REACT_HOT_LOADER__.register(A,"default","D:/work/mcuClientBranch/McuClient20170228/src/apes/DocApe.js"))})()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(7),l=r(u),f=n(3),d=r(f),c=n(6),h=r(c),p=n(1),_=r(p),E=n(2),g=r(E),y=n(5),R=r(y),m=n(4),C=r(m),T=n(16),v=r(T),S=_.default.getLoger("VideoApe"),A=function(e){function t(){i(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,d.default.VIDEO_SESSION_ID,d.default.VIDEO_SESSION_NAME,d.default.VIDEO_SESSION_TAG));return e.mediaModule=new v.default,e.mediaModule.MEDIA_OBJ_TABLE_ID=d.default.VIDEO_OBJ_TABLE_ID,e.mediaModule.mediaChannels={},e.registerKey(e._session_id,e._session_name,e._session_tag,new ArrayBuffer),e.registerObj(h.default.RCPDU_REG_REGISTER_TABLE,d.default.VIDEO_OBJ_TABLE_ID,d.default.VIDEO_OBJ_TABLE_NAME,d.default.VIDEO_OBJ_TABLE_TAG,0,new ArrayBuffer),e.on(h.default.RCPDU_SEND_VIDEO_DATA_REQUEST,e.receiveVideoCommandHandler.bind(e)),e}return s(t,e),a(t,[{key:"onJoinChannelHandlerSuccess",value:function(){this.mediaModule.maxMediaChannel=R.default.maxVideoChannels}},{key:"getPlayVideoPath",value:function(e){return S.log("getPlayVideoPath"),this.mediaModule.getMediaPlayPath(e)}},{key:"getPublishVideoPath",value:function(e){return S.log("getPublishVideoPath"),this.mediaModule.getMediaPublishPath(e)}},{key:"publishVideo",value:function(e){if(!this.mcu.connected)return S.warn(R.default.getCurrentStatus()),{code:d.default.RETURN_FAILED,data:"已经断开连接"};if(null==e||null==e.channelId||null==e.classId||null==e.userId||""==e.userId||null==e.siteId||null==e.timestamp)return S.warn("publishVideo,参数错误",e),this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG),{code:d.default.RETURN_FAILED,data:"参数错误"};if(S.log("publishVideo -> maxVideoChannels",R.default.maxVideoChannels),0!=this.mediaModule.getOpeningMediaChannel(R.default.nodeId))return S.warn("publishVideo,已经存在一个流,不能再推"),{code:d.default.RETURN_FAILED,data:"已经存在一个流,不能再推"};var t=this.mediaModule.getFreeMediaChannel();if(0==t)return S.warn("publishVideo,没有空闲的channel "),{code:d.default.RETURN_FAILED,data:"不能再打开更多的设备"};if(this.mediaModule.checkChannelIsOpening(e.channelId))return S.warn(e.channelId,"频道已经被占用"),{code:d.default.RETURN_FAILED,data:"频道已经被占用!"};var n={};return n.status=d.default.CHANNEL_STATUS_OPENING,n.fromNodeId=R.default.nodeId,n.channelId=e.channelId,n.timestamp=e.timestamp,n.classId=e.classId,n.siteId=e.siteId,n.toNodeId=0,n.userId=e.userId,n.mediaType=d.default.MEDIA_TYPE_VIDEO,this.sendTableUpdateHandler(n),{code:d.default.RETURN_SUCCESS,data:"推流成功!"}}},{key:"stopPublishVideo",value:function(e){if(!this.mcu.connected)return S.warn(R.default.getCurrentStatus()),{code:d.default.RETURN_FAILED,data:"已经断开连接"};S.log("stopPublishVideo -> maxVideoChannels",R.default.maxVideoChannels);var t=void 0;t=e&&parseInt(e.nodeId)>=0?parseInt(e.nodeId):R.default.nodeId;var n=this.mediaModule.getOpeningMediaChannel(t);if(0==n)return S.warn(t,"stopPublishVideo,没有占用channel,不需要关闭"),{code:d.default.RETURN_FAILED,data:"没有占用channel,不需要关闭"};var r={};r.status=d.default.CHANNEL_STATUS_RELEASED,r.fromNodeId=0,r.channelId=n,r.timestamp=0,r.classId=R.default.classId,r.toNodeId=0,r.mediaType=d.default.MEDIA_TYPE_DEFAULT,this.sendTableUpdateHandler(r)}},{key:"sendVideoBroadcastMsg",value:function(e){if(!this.mcu.connected)return S.warn(R.default.getCurrentStatus()),{code:d.default.RETURN_FAILED,data:"已经断开连接"};if(null===this._classInfo||C.default.isEmptyObject(this._classInfo))return S.log("不能发送Video消息.McuClient还未初始化数据!"),0==R.default.getCurrentStatus().code||1==R.default.getCurrentStatus().code?(this._emit(g.default.MCU_ERROR,g.default.ERR_APE_SEND_FAILED_NO_JOIN),{code:1,data:"不能发送Video消息.McuClient还未初始化数据"}):{code:d.default.RETURN_FAILED,data:"不能发送Video消息.McuClient还未初始化数据"};if(null==e)return S.warn("sendVideoCommandMsg失败,参数错误",e),this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG),{code:d.default.RETURN_FAILED,data:"sendVideoCommandMsg失败,参数错误"};if(S.log("发送Video消息.",e),null!=e.actionType&&e.actionType==d.default.MEDIA_ACTION_OPEN_CAMERA){var t=this.mediaModule.getFreeMediaChannel();if(0==t)return S.warn("sendVideoCommandMsg,不能再打开更多的设备",e),{code:d.default.RETURN_FAILED,data:"不能再打开更多的设备"}}var n=new h.default.RCVideoSendDataRequestPdu;return n.type=h.default.RCPDU_SEND_VIDEO_DATA_REQUEST,n.isPublic=!0,n.fromNodeId=R.default.nodeId,n.toNodeId=parseInt(e.toNodeId)||0,n.actionType=parseInt(e.actionType)||d.default.MEDIA_ACTION_DEFAULT,n.data=this._rCArrayBufferUtil.strToUint8Array("h5"+e.data),n.isPublic||0==n.toNodeId?(S.log("发送公聊Video消息."),this.sendChatUniform(n)):(S.log("发送私聊Video消息."),this.send(n)),{code:d.default.RETURN_SUCCESS,data:""}}},{key:"sendTableUpdateHandler",value:function(e){S.log("video===sendTableUpdateHandler ");var t=this.packPdu(e,e.channelId);if(null==t)return void S.warn("sendTableUpdateHandler error,updateModelPdu=null");var n=new h.default.RCRegistryTableItemPdu;n.itemIdx=e.channelId,n.owner=0,n.itemData=t.toArrayBuffer();var r=new h.default.RCRegistryTableUpdateItemPdu;r.type=h.default.RCPDU_REG_TABLE_UPDATE_PDU,r.items.push(n);var i=new h.default.RCRegistryUpdateObjPdu;i.objId=d.default.VIDEO_OBJ_TABLE_ID,i.subType=r.type,i.userData=r.toArrayBuffer();var o=new h.default.RCAdapterItemPdu;o.type=h.default.RCPDU_REG_UPDATE_OBJ,o.itemData=i.toArrayBuffer();var s=new h.default.RCAdapterPdu;s.type=h.default.RCPDU_REG_ADAPTER,s.item.push(o),S.log("发送更新VIDEO.itemIdx="+n.itemIdx),this.sendUniform(s,!0)}},{key:"receiveVideoCommandHandler",value:function(e){var t=h.default.RCVideoSendDataRequestPdu.decode(e);return null==t?void S.warn("视频消息处理,收到的消息为null,不做处理"):(t.data=this._rCArrayBufferUtil.uint8ArrayToStr(t.data,2),S.log("视频消息处理 receiveVideoCommandHandler."),console.log(t),void(0!=t.toNodeId&&t.toNodeId!=R.default.nodeId?S.log("视频消息不处理 toNodeId=",t.toNodeId,"my nodeId=",R.default.nodeId):this._emit(g.default.VIDEO_BROADCAST,t)))}},{key:"tableUpdateHandler",value:function(e,t,n){var r=this.unPackPdu(e,t,n);this.mediaModule.mediaChannels[t]=r,this._emit(g.default.VIDEO_UPDATE,r)}},{key:"packPdu",value:function(e,t){if(S.log("packPdu "),null==e||null==t)return this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG),null;var n=new h.default.RCVideoChannelInfoPdu;return n.status=e.status||d.default.CHANNEL_STATUS_RELEASED,n.channelId=t,n.siteId=e.siteId||R.default.siteId,n.classId=parseInt(e.classId)||parseInt(R.default.classId),n.userId=e.userId||"0",n.mediaType=e.mediaType||d.default.MEDIA_TYPE_VIDEO,n.timestamp=e.timestamp||C.default.creatTimestamp(),n.fromNodeId=R.default.nodeId,n.toNodeId=0,console.log("packPdu",n),n}},{key:"unPackPdu",value:function(e,t,n){if(S.log("unPackPdu "),null==e||null==t||null==n)return this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG),null;try{var r=h.default.RCVideoChannelInfoPdu.decode(n);return S.log("unPackPdu",r),r}catch(e){S.log("unPackPdu error,itemIdx="+t+"  err:"+e.message)}return null}}]),t}(l.default),I=A;t.default=I;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(S,"loger","D:/work/mcuClientBranch/McuClient20170228/src/apes/VideoApe.js"),__REACT_HOT_LOADER__.register(A,"VideoApe","D:/work/mcuClientBranch/McuClient20170228/src/apes/VideoApe.js"),__REACT_HOT_LOADER__.register(I,"default","D:/work/mcuClientBranch/McuClient20170228/src/apes/VideoApe.js"))})()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(7),l=r(u),f=n(3),d=r(f),c=n(6),h=r(c),p=n(1),_=r(p),E=n(2),g=r(E),y=(n(26),n(11)),R=(r(y),n(5)),m=r(R),C=n(4),T=r(C),v=_.default.getLoger("WhiteBoardApe"),S=0,A=0,I=1,b=2,D=3,N=4,P=function(e){function t(){i(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,d.default.WHITEBOARD_SESSION_ID,d.default.WHITEBOARD_SESSION_NAME,d.default.WHITEBOARD_SESSION_TAG));return e.annoInfos={},e.insertHistory=[],e.registerKey(e._session_id,e._session_name,e._session_tag,new ArrayBuffer),e.registerObj(h.default.RCPDU_REG_REGISTER_TABLE,d.default.WHITEBOARD_OBJ_TABLE_ID,d.default.WHITEBOARD_OBJ_TABLE_NAME,d.default.WHITEBOARD_OBJ_TABLE_TAG,0,new ArrayBuffer),e.on(h.default.RCPDU_SESSION_JOIN_RESPONSE,e._joinSessionHandler.bind(e)),e}return s(t,e),a(t,[{key:"_joinSessionHandler",value:function(e){v.log("RCPDU_SESSION_JOIN_RESPONSE"),this.insertHistory=[]}},{key:"sendInsetAnnotaion",value:function(e){if(null==e||T.default.isEmptyObject(e))return v.log("sendInsetAnnotaion失败,参数错误"),void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG);S=T.default.creatSoleNumberFromTimestamp();var t=this.packPdu(e,S);if(null==t)return v.log("sendInsetAnnotaion失败,参数错误"),void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG);this.insertHistory.push(t);var n=new h.default.RCRegistryTableItemPdu;n.itemIdx=S,n.registerObjId=d.default.WHITEBOARD_OBJ_TABLE_ID,n.owner=0,n.itemData=t.toArrayBuffer();var r=new h.default.RCRegistryTableInsertItemPdu;r.type=h.default.RCPDU_REG_TABLE_INSERT_PDU,r.items.push(n);var i=new h.default.RCRegistryUpdateObjPdu;i.objId=d.default.WHITEBOARD_OBJ_TABLE_ID,i.subType=r.type,i.userData=r.toArrayBuffer();var o=new h.default.RCAdapterItemPdu;o.type=h.default.RCPDU_REG_UPDATE_OBJ,o.itemData=i.toArrayBuffer();var s=new h.default.RCAdapterPdu;s.type=h.default.RCPDU_REG_ADAPTER,s.item.push(o),console.log("添加白板数据=====itemIdx="+n.itemIdx),this.sendUniform(s,!0)}},{key:"sendGotoPrev",value:function(){return v.log("白板返回上一步"),null==this.insertHistory||this.insertHistory.length<1?void v.warn("无法继续上一步操作,已经没有可以撤销的数据"):(console.log(this.insertHistory),void this.sendDeleteAnnotaion(this.insertHistory.pop()))}},{key:"sendDeleteCurPageAnnotation",value:function(e){for(var t in this.annoInfos){var n=this.annoInfos[t];n&&n.parentId==m.default.activeDocId&&n.curPageNo==m.default.activeDocCurPage&&(v.log("sendDeleteCurPageAnnotation 删除当前页面上的标注",t),this.sendDeleteAnnotaion({itemIdx:t}))}}},{key:"sendDeleteAllAnnotation",value:function(e){for(var t in this.annoInfos)this.sendDeleteAnnotaion({itemIdx:t})}},{key:"sendDeleteAnnotaion",value:function(e){if(null==e)return void v.warn("要删除的数据不存在");var t=new h.default.RCRegistryTableDeleteItemPdu;t.type=h.default.RCPDU_REG_TABLE_DELETE_PDU,t.itemIdx=parseInt(e.itemIdx);var n=new h.default.RCRegistryUpdateObjPdu;n.objId=d.default.WHITEBOARD_OBJ_TABLE_ID,n.subType=t.type,n.userData=t.toArrayBuffer();var r=new h.default.RCAdapterItemPdu;r.type=h.default.RCPDU_REG_UPDATE_OBJ,r.itemData=n.toArrayBuffer();var i=new h.default.RCAdapterPdu;i.type=h.default.RCPDU_REG_ADAPTER,i.item.push(r),console.log("白板发送删除数据============="+t.itemIdx),this.sendUniform(i,!0)}},{key:"sendUpdaterAnnotaion",value:function(e){if(null==e||T.default.isEmptyObject(e))return v.log("sendUpdaterAnnotaion失败,参数错误"),void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG);S=e.itemIdx;var t=this.packPdu(e,S);if(null==t)return v.log("sendInsetAnnotaion失败,参数错误"),void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG);var n=new h.default.RCRegistryTableItemPdu;n.itemIdx=S,n.owner=0,n.registerObjId=d.default.WHITEBOARD_OBJ_TABLE_ID,n.itemData=t.toArrayBuffer();var r=new h.default.RCRegistryTableUpdateItemPdu;r.type=h.default.RCPDU_REG_TABLE_UPDATE_PDU,r.items.push(n);var i=new h.default.RCRegistryUpdateObjPdu;i.objId=d.default.WHITEBOARD_OBJ_TABLE_ID,i.subType=r.type,i.userData=r.toArrayBuffer();var o=new h.default.RCAdapterItemPdu;o.type=h.default.RCPDU_REG_UPDATE_OBJ,o.itemData=i.toArrayBuffer();var s=new h.default.RCAdapterPdu;s.type=h.default.RCPDU_REG_ADAPTER,s.item.push(o),console.log("白板发送更新数据===============22"),this.sendUniform(s,!0)}},{key:"tableInsertHandler",value:function(e,t,n){var r=this.unPackPdu(e,t,n);v.log("tableInsertHandler"),console.log(r),r&&m.default.activeDocId==r.parentId&&m.default.activeDocCurPage==r.curPageNo&&(v.log("WHITEBOARD_ANNOTAION_INSERT 显示到界面上",r),this.insertAandShowAnnotaion(r))}},{key:"tableUpdateHandler",value:function(e,t,n){var r=this.unPackPdu(e,t,n);v.log("tableUpdateHandler"),console.log(r),r&&r.parentId==m.default.activeDocId&&r.curPageNo==m.default.activeDocCurPage&&this.updateAandShowAnnotaion()}},{key:"tableDeleteHandler",value:function(e,t){if(v.log("tableDeleteHandler",e,t),t&&t.itemIdx)for(var n=t.itemIdx.length,r=t.itemIdx,i=0;i<n;i++)this.annoInfos[r[i]]&&(v.log("删除白板数据:",r[i]),delete this.annoInfos[r[i]]);this.updateAandShowAnnotaion()}},{key:"docUpdateHandler",value:function(e){v.log("白板收到文档更新的消息docUpdateHandler"),console.log(e),e.action!=d.default.DOC_ACTION_SWITCH_DOC&&e.action!=d.default.DOC_ACTION_SWITCH_PAGE||(this.insertHistory=[]),this.updateAandShowAnnotaion()}},{key:"docDeleteHandler",value:function(e){v.log("白板收到文档删除的消息docDeleteHandler",e);for(var t in this.annoInfos){var n=this.annoInfos[t];n&&n.parentId==e&&(v.log("文档删除,白板数据也删除,itemIdx:"+t,"_parentId:",e),this.sendDeleteAnnotaion({itemIdx:t}))}}},{key:"insertAandShowAnnotaion",value:function(e){var t=[e],n={isFresh:!1,annotaionItems:t};v.log("WHITEBOARD_ANNOTATION_UPDATE",t.length),this._emit(g.default.WHITEBOARD_ANNOTATION_UPDATE,n)}},{key:"updateAandShowAnnotaion",value:function(){var e=[];for(var t in this.annoInfos){var n=this.annoInfos[t];n&&n.parentId==m.default.activeDocId&&n.curPageNo==m.default.activeDocCurPage&&(e.push(n),
v.log("显示和文档对应的白板数据docUpdateHandler itemIdx:",n.itemIdx,"doc itemIdx:",m.default.activeDocId,"curPageNo:",m.default.activeDocCurPage))}var r={isFresh:!0,annotaionItems:e};v.log("WHITEBOARD_ANNOTATION_UPDATE",e.length),this._emit(g.default.WHITEBOARD_ANNOTATION_UPDATE,r)}},{key:"packPdu",value:function(e,t){if(null==e.pointGroup||e.pointGroup.length<1)return this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG),null;var n=new h.default.RCWhiteBoardDataModelPdu;switch(e.type){case A:break;case I:break;case b:break;case D:n.radius=parseInt(e.radius);break;case N:n.fontSize=parseInt(e.fontSize),n.fontName=e.fontName||null,n.text=e.text||null;break;default:return null}return n.type=e.type,n.itemIdx=t,n.initiator=m.default.nodeId,n.parentId=m.default.activeDocId,n.curPageNo=m.default.activeDocCurPage,n.pointGroup=T.default.arrayToJsonString(e.pointGroup),n.color=e.color||"#000000",n}},{key:"unPackPdu",value:function(e,t,n){try{v.log("白板收到数据===unPackPdu ");var r=h.default.RCWhiteBoardDataModelPdu.decode(n),i=T.default.arrayFromJsonString(r.pointGroup);return r.pointGroup=i,this.annoInfos[t]=r,r}catch(e){console.log("unPackPdu Pdu解析错误,itemIdx="+t+"  err:"+e.message)}return null}}]),t}(l.default),O=P;t.default=O;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(v,"loger","D:/work/mcuClientBranch/McuClient20170228/src/apes/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(S,"itemIdx","D:/work/mcuClientBranch/McuClient20170228/src/apes/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(A,"TYPE_BIGHT","D:/work/mcuClientBranch/McuClient20170228/src/apes/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(I,"TYPE_LINE","D:/work/mcuClientBranch/McuClient20170228/src/apes/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(b,"TYPE_RECT","D:/work/mcuClientBranch/McuClient20170228/src/apes/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(D,"TYPE_CIRCLE","D:/work/mcuClientBranch/McuClient20170228/src/apes/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(N,"TYPE_TEXT","D:/work/mcuClientBranch/McuClient20170228/src/apes/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(P,"WhiteBoardApe","D:/work/mcuClientBranch/McuClient20170228/src/apes/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(O,"default","D:/work/mcuClientBranch/McuClient20170228/src/apes/WhiteBoardApe.js"))})()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(8),l=r(u),f=n(1),d=r(f),c=d.default.getLoger("EverSocket"),h=function(e){function t(){i(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e._connected=!1,e._lastActiveTime=0,e._enableEverSocket=!1,e}return s(t,e),a(t,[{key:"begin",value:function(e,t){c.log("开始WebSocket应用."),this._enableEverSocket=!0,this.wsURL="ws://"+e+":"+t,this._newConnection()}},{key:"end",value:function(){c.log("停止WebSocket应用."),this._clear()}},{key:"send",value:function(e){this._connected?(c.log("SEND MESSAGE---->"),this.websocket.send(e)):c.warn("WebSocket未建立连接.消息忽略")}},{key:"_setConnected",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._connected=e,this._connected?this._emit(t.OPEN):this._emit(t.CLOSED)}},{key:"_newConnection",value:function(){this.websocket=new WebSocket(this.wsURL),this.websocket.binaryType="arraybuffer",this.websocket.onopen=this._onOpen.bind(this),this.websocket.onclose=this._onClose.bind(this),this.websocket.onerror=this._onError.bind(this),this.websocket.onmessage=this._onMessage.bind(this)}},{key:"_reConnection",value:function(){var e=this;this._clear(),this.reConnectionTimeout=window.setTimeout(function(){c.log("WebSocket重新建立."),window.clearTimeout(e.reConnectionTimeout),e._newConnection()},t.RECONN_INTERVAL)}},{key:"_clear",value:function(){if(c.log("WebSocket,Timers销毁"),window.clearInterval(this.pingTimer),window.clearInterval(this.pongTimer),null==this.websocket)return void c.log("WebSocket,Timers已经销毁");this._enableEverSocket=!1,this._setConnected(!1),this.websocket.onopen=void 0,this.websocket.onclose=void 0,this.websocket.onerror=void 0,this.websocket.onmessage=void 0;try{this.websocket.close()}catch(e){c.log("ignore errors")}this.websocket=void 0}},{key:"_onOpen",value:function(){c.log("WebSocket建立成功",this.wsURL),this.pingTimer=window.setInterval(this._sendPingHandler.bind(this),t.PING_INTERVAL),this.pongTimer=window.setInterval(this._checkPongHandler.bind(this),t.PONG_INTERVAL),this._setConnected()}},{key:"_onClose",value:function(e){c.log("WebSocket连接断开 CODE:"+e.code+" REASON:"+e.reason+" CLEAN: "+e.wasClean,this.wsURL),this._reConnection()}},{key:"_onError",value:function(){c.log("WebSocket错误出现"),this._connected=!1,this._reConnection()}},{key:"_onMessage",value:function(e){c.log("<----RECEIVE MESSAGE"),this._lastActiveTime=Date.now();var n=e.data;n.byteLength>0&&this._emit(t.MESSAGE,n)}},{key:"_sendPingHandler",value:function(){this._connected?this.websocket.send(new ArrayBuffer):this._reConnection()}},{key:"_checkPongHandler",value:function(){var e=Date.now();this._lastActiveTime&&this._lastActiveTime>=e-t.PONG_INTERVAL&&this._lastActiveTime<=e||(c.warn("---服务器PINGPONG超时-----"),this._reConnection())}},{key:"connected",get:function(){return this._connected}}]),t}(l.default);h.prototype.PONG_INTERVAL=h.PONG_INTERVAL=21e3,h.prototype.PING_INTERVAL=h.PING_INTERVAL=1e4,h.prototype.RECONN_INTERVAL=h.RECONN_INTERVAL=3e3,h.prototype.CONNECTING=h.CONNECTING=0,h.prototype.OPEN=h.OPEN=1,h.prototype.CLOSING=h.CLOSING=2,h.prototype.CLOSED=h.CLOSED=3,h.prototype.MESSAGE=h.MESSAGE=4;var p=new h;t.default=p;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(c,"loger","D:/work/mcuClientBranch/McuClient20170228/src/everSocket.js"),__REACT_HOT_LOADER__.register(h,"EverSocket","D:/work/mcuClientBranch/McuClient20170228/src/everSocket.js"),__REACT_HOT_LOADER__.register(p,"default","D:/work/mcuClientBranch/McuClient20170228/src/everSocket.js"))})()},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n='\n//start\n// pdu_def.proto\n\n// syntax = "proto3";\n\noption optimize_for = LITE_RUNTIME;\nenum RCPduPriority_E {\n    DP_TOP = 0;\n    DP_HIGH = 1;\n    DP_MEDIUM = 2;\n    DP_LOW = 3;\n}\n\nenum RCPduSegment_E {\n    SEG_BEGIN = 0;\n    SEG_END = 1;\n    SEG_ONCE = 2;\n}\n\nenum RCPduTokenStatus_E {\n    TS_NOT_IN_USE = 0;\n    TS_SELF_GRABBED = 1;\n    TS_OTHER_GRABBED = 2;\n    TS_SELF_INHIBITED = 3;\n    TS_OTHER_INHIBITED = 4;\n    TS_SELF_RECIPIENT = 5;\n    TS_SELF_GIVING = 6;\n    TS_OTHER_GIVING = 7;\n}\n\nenum RCPduType_E {\n// GCC PDU\n    RCPDU_CONNECT_PROVIDER_REQUEST = 0;\n    RCPDU_CONNECT_PROVIDER_RESPONSE = 1;\n    RCPDU_CONFERENCE_JOIN_REQUEST = 2;\n    RCPDU_CONFERENCE_JOIN_RESPONSE = 3;\n    RCPDU_CONFERENCE_INVITE_REQUEST = 10;\n    RCPDU_CONFERENCE_INVITE_RESPONSE = 11;\n    RCPDU_CONFERENCE_LOCK_REQUEST = 20;\n    RCPDU_CONFERENCE_LOCK_RESPONSE = 21;\n    RCPDU_CONFERENCE_LOCK_INDICATION = 22;\n    RCPDU_CONFERENCE_UNLOCK_REQUEST = 30;\n    RCPDU_CONFERENCE_UNLOCK_RESPONSE = 31;\n    RCPDU_CONFERENCE_UNLOCK_INDICATION = 32;\n    RCPDU_CONFERENCE_LEAVE_REQUEST = 39;\n    RCPDU_CONFERENCE_TERMINATE_REQUEST = 40;\n    RCPDU_CONFERENCE_TERMINATE_RESPONSE = 41;\n    RCPDU_CONFERENCE_TERMINATE_INDICATION = 42;\n    RCPDU_CONFERENCE_EJECT_USER_REQUEST = 50;\n    RCPDU_CONFERENCE_EJECT_USER_RESPONSE = 51;\n    RCPDU_CONFERENCE_EJECT_USER_INDICATION = 52;\n    RCPDU_ROSTER_UPDATE_INDICATION = 60;\n    RCPDU_REGISTRY_UPDATE_REQUEST = 70; // INCLUDE ALL OBJS OPERATION\n    RCPDU_REGISTRY_UPDATE_RESPONSE = 71;\n    RCPDU_REGISTRY_UPDATE_INDICATION = 72;\n    RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE = 80;\n\n    // MCS PDU\n    RCPDU_SESSION_JOIN_REQUEST = 90;\n    RCPDU_SESSION_JOIN_RESPONSE = 91;\n    RCPDU_CHANNEL_GRAB_REQUEST = 100;\n    RCPDU_CHANNEL_GRAB_RESPONSE = 101;\n    RCPDU_CHANNEL_GRAB_INDICATION = 102;\n    RCPDU_CHANNEL_JOIN_REQUEST = 103;\n    RCPDU_CHANNEL_JOIN_RESPONSE = 104;\n    RCPDU_CHANNEL_LEAVE_REQUEST = 105;\n    RCPDU_CHANNEL_RELEASE_REQUEST = 106;\n    RCPDU_CHANNEL_RELEASE_INDICATION = 107;\n    RCPDU_SEND_DATA_REQUEST = 120;\n    RCPDU_SEND_DATA_INDICATION = 121;\n    RCPDU_UNIFORM_SEND_DATA_REQUEST = 125;\n    RCPDU_UNIFORM_SEND_DATA_INDICATION = 126;\n    RCPDU_TOKEN_GRAB_REQUEST = 130;\n    RCPDU_TOKEN_GRAB_CONFIRM = 131;\n    RCPDU_TOKEN_INHIBIT_REQUEST = 132;\n    RCPDU_TOKEN_INHIBIT_CONFIRM = 133;\n    RCPDU_TOKEN_GIVE_REQUEST = 134;\n    RCPDU_TOKEN_GIVE_INDICATION = 135;\n    RCPDU_TOKEN_GIVE_RESPONSE = 136;\n    RCPDU_TOKEN_GIVE_CONFIRM = 137;\n    RCPDU_TOKEN_PLEASE_REQUEST = 138;\n    RCPDU_TOKEN_PLEASE_INDICATION = 139;\n    RCPDU_TOKEN_RELEASE_REQUEST = 140;\n    RCPDU_TOKEN_RELEASE_CONFIRM = 141;\n    RCPDU_TOKEN_TEST_REQUEST = 142;\n    RCPDU_TOKEN_TEST_CONFIRM = 143;\n\n    // Registry PDU\n    RCPDU_REG_REGISTER_KEY = 200;\n    RCPDU_REG_UNREGISTER_KEY = 201;\n    RCPDU_REG_REGISTER_ROSTER = 202;\n    RCPDU_REG_REGISTER_TOKEN = 203;\n    RCPDU_REG_REGISTER_PARAMETER = 204;\n    RCPDU_REG_REGISTER_COUNTER = 205;\n    RCPDU_REG_REGISTER_TABLE = 206;\n    RCPDU_REG_REGISTER_CACHE = 207;\n    RCPDU_REG_REGISTER_OBJ = 208;\n    RCPDU_REG_UNREGISTER_OBJ = 209;\n    RCPDU_REG_UPDATE_OBJ = 210;\n    RCPDU_REG_ADAPTER = 211;\n    RCPDU_REG_CLEANUP_NODE = 212;\n    RCPDU_REG_REGISTER_QUEUE = 213;\n\n    // Registry Obj update PDU\n    RCPDU_REG_TABLE_INSERT_PDU = 230;\n    RCPDU_REG_TABLE_DELETE_PDU = 231;\n    RCPDU_REG_TABLE_UPDATE_PDU = 232;\n    RCPDU_REG_ROSTER_INSERT_PDU = 240;\n    RCPDU_REG_ROSTER_DELETE_PDU = 241;\n    RCPDU_REG_ROSTER_UPDATE_PDU = 242;\n    RCPDU_REG_PARAMETER_UPDATE_PDU = 250;\n    RCPDU_REG_QUEUE_INSERT_PDU = 255;\n    RCPDU_REG_QUEUE_DELETE_PDU = 256;\n    RCPDU_REG_QUEUE_UPDATE_PDU = 257;\n\n    // data\n    RCPDU_CONFERENCE_SEND_DATA_REQUEST = 259;\n    RCPDU_VIDEO_SEND_DATA_REQUEST = 260;\n    RCPDU_AUDIO_SEND_DATA_REQUEST = 261;\n    RCPDU_GIFT_SEND_DATA_REQUEST = 262;\n    RCPDU_CHAT_SEND_DATA_REQUEST = 263;\n    RCPDU_VOTING_POLL_RECORD = 265;\n    RCPDU_CONFERENCE_RECORD_REQUEST = 270;\n\n    // Registry resource request or response PDU\n    RCPDU_REG_REQUEST_OBJ = 290;\n    RCPDU_REG_RESPONSE_OBJ = 291;\n    RCPDU_REG_COUNTER_REQUEST_PDU = 292;\n    RCPDU_REG_COUNTER_RESPONSE_PDU = 293;\n\n    // Index exchange\n    RCPDU_INDEX_ADAPTER = 300;\n    RCPDU_INDEX_SERVER_USERS = 301;\n    RCPDU_INDEX_CONFERENCE_USER_JOINED = 302;\n    RCPDU_INDEX_CONFERENCE_USER_EXITED = 303;\n    RCPDU_INDEX_CONFERENCE_USERS = 304;\n\n\n\n\n    //new data\n    RCPDU_SEND_CONFERENCE_DATA_REQUEST =500;\n    RCPDU_SEND_VIDEO_DATA_REQUEST = 501;\n    RCPDU_SEND_AUDIO_DATA_REQUEST = 502;\n    RCPDU_SEND_GIFT_DATA_REQUEST = 503;\n    RCPDU_SEND_CHAT_DATA_REQUEST = 504;\n\n}\n\nenum RCPduNodeType_E {\n    NT_TERMINAL = 0;\n    NT_MULTIPORT_TERMINAL = 1;\n    NT_MCU = 2;\n}\n\nenum RCPduReason_E {\n    RSN_USERINITIATED = 0;\n    RSN_DISCONNECTED = 1;\n    RSN_SUPER_LEFT = 2;\n}\n\nenum RCPduResult_E {\n    RET_SUCCESS = 0;\n    RET_USER_REJECTED = 1;\n    RET_INVALID_CONFERENCE = 2;\n    RET_INVALID_PASSWORD = 3;\n    RET_INVALID_CONVENER_PASSWORD = 4;\n    RET_CHALLENGE_RESPONSE_REQUIRED = 5;\n    RET_INVALID_CHALLENGE_RESPONSE = 6;\n    RET_NO_CONNECTION = 7;\n    RET_FULL_CAPACITY = 8;\n}\n\nenum RCPduNodeCategory_E {\n    NC_CONVENTIONAL = 0;\n    NC_COUNTED = 1;\n    NC_ANONYMOUS = 2;\n}\n\nmessage RCConferenceDescriptorPdu {\n    required uint32 id = 1;\n    required string name = 2;\n    optional bytes description = 3;\n    optional uint32 mode = 4;\n    optional string password = 5;\n    optional uint32 capacity = 6;\n    optional bytes user_data = 7;\n}\n\nmessage RCNodeRecordPdu {\n    required uint32 id = 1;\n    optional uint32 superior_node = 2;\n    required RCPduNodeType_E type = 3;\n    required string name = 4;\n    required uint32 capability = 5;\n    optional string net_address = 6;\n    optional RCPduNodeCategory_E category = 7;\n}\n\nmessage RCApplicationRecordPdu {\n    required uint32 id = 1; // session id\n    required string name = 2;\n    required string tag = 3;\n    repeated uint32 channel_ids = 4 [packed = true];\n    optional uint32 capability = 5;\n}\n\n//reg.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCRegistryRegisterKeyPdu {\n    required RCPduType_E type = 1 [default = RCPDU_REG_REGISTER_KEY];\n    required uint32 id = 2;\n    required string name = 3;\n    required string tag = 4;\n    optional bytes user_data = 5;\n}\n\nmessage RCRegistryUnregisterKeyPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_UNREGISTER_KEY];\n    required uint32 key_id = 2;\n}\n\nmessage RCRegistryRegisterObjPdu {\n    optional RCPduType_E type = 1;\n    required uint32 obj_id = 2;\n    required string name = 3;\n    required string tag = 4;\n    optional uint32 owner = 5;\n    optional bytes user_data = 6;\n}\n\nmessage RCRegistryUnregisterObjPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_UNREGISTER_OBJ];\n    required uint32 obj_id = 2;\n}\n\nmessage RCRegistryUpdateObjPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_UPDATE_OBJ];\n    required RCPduType_E sub_type = 2;\n    required uint32 obj_id = 3;\n    required bytes user_data = 4;\n}\n\nmessage RCAdapterItemPdu {\n    required RCPduType_E type = 1;\n    required bytes item_data = 2;\n}\n\n// adapter pdu that used to package a list of pdu.\nmessage RCAdapterPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_ADAPTER];\n    repeated RCAdapterItemPdu item = 2;\n}\n\n// table operation pdu\nmessage RCRegistryTableItemPdu {\n    required uint32 item_idx = 1;\n    required uint32 owner = 2;\n    required bytes item_data = 3;\n    optional uint32 register_obj_id=4;\n}\n\nmessage RCRegistryTableInsertItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_INSERT_PDU];\n    repeated RCRegistryTableItemPdu items = 2;\n}\n\nmessage RCRegistryTableDeleteItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_DELETE_PDU];\n    repeated uint32 item_idx = 2;\n}\n\nmessage RCRegistryTableUpdateItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];\n    repeated RCRegistryTableItemPdu items = 2;\n}\n\n// roster operation pdu\nmessage RCRegistryRosterItemPdu {\n    required uint32 node_id = 1;\n    required bytes node_data = 2;\n}\nmessage RCRegistryWBItemPdu {\n    required uint32 node_id = 1;\n    required bytes node_data = 2;\n}\nmessage RCRegistryRosterInsertItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_INSERT_PDU];\n    repeated RCRegistryRosterItemPdu items = 2;\n}\n\nmessage RCRegistryRosterDeleteItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_DELETE_PDU];\n    required uint32 node_id = 2;\n}\n\nmessage RCRegistryRosterUpdateItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_UPDATE_PDU];\n    repeated RCRegistryRosterItemPdu items = 2;\n}\n\n//message RCCleanupNodePdu\n//{\n//  optional RCPduType_E    type                = 1 [default = RCPDU_REG_CLEANUP_NODE];\n//  required uint32         node_id             = 2;\n//}\n\n// parameter operation pdu\nmessage RCRegistryParameterUpdatePdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_PARAMETER_UPDATE_PDU];\n    required uint32 value = 2 [default = 0];\n    optional uint32 begin_bit = 3 [default = 31];\n    optional uint32 end_bit = 4;\n}\n\n// queue operation pdu\nmessage RCRegistryQueueItemPdu {\n    required uint32 owner = 1;\n    required uint32 item_id = 2;\n    optional bytes item_data = 3;\n    optional uint32 item_idx = 4;\n}\n\nmessage RCRegstryQueueInsertItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_INSERT_PDU];\n    repeated RCRegistryQueueItemPdu items = 2;\n}\n\nmessage RCRegistryQueueDeleteItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_DELETE_PDU];\n    required uint32 item_id = 2;\n}\n\nmessage RCRegistryQueueUpdateItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_UPDATE_PDU];\n    repeated RCRegistryQueueItemPdu items = 2;\n}\n\nmessage RCRegistryRequestObjPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_REQUEST_OBJ];\n    required RCPduType_E sub_type = 2;\n    required uint32 obj_id = 3;\n    required bytes user_data = 4;\n}\n\nmessage RCRegistryResponseObjPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_RESPONSE_OBJ];\n    required RCPduType_E sub_type = 2;\n    required uint32 obj_id = 3;\n    required bytes user_data = 4;\n}\n\nmessage RCRegistryCounterRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_COUNTER_REQUEST_PDU];\n    required uint32 count = 2;\n}\n\nmessage RCRegistryCounterResponsePdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_COUNTER_RESPONSE_PDU];\n    required uint32 start = 2;\n    required uint32 end = 3;\n}\n\n// mcs\noption optimize_for = LITE_RUNTIME;\n\n// Session management\nmessage RCSessionJoinRequestPdu {\n    required RCPduType_E type = 1 [default = RCPDU_SESSION_JOIN_REQUEST];\n    required uint32 id = 2;\n    required string name = 3;\n    required string tag = 4;\n    optional bytes session_data = 5; //聚合在一起的registry信息\n}\n\nmessage RCSessionJoinResponsePdu {\n    optional RCPduType_E type = 1 [default = RCPDU_SESSION_JOIN_RESPONSE];\n    required uint32 id = 2;\n    optional bytes response_data = 3;\n}\n\n// Channel management\nmessage RCChannelGrabRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 channel_id = 3;\n}\n\nmessage RCChannelGrabResponsePdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_RESPONSE];\n    required uint32 initiator = 2;\n    required uint32 requested_channel_id = 3;\n    required RCPduResult_E result = 4;\n    optional uint32 channel_id = 5;\n}\n\nmessage RCChannelGrabIndicationPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_INDICATION];\n    required uint32 initiator = 2;\n    optional uint32 channel_id = 3;\n}\n\nmessage RCChannelJoinRequestPdu {\n    required RCPduType_E type = 1 [default = RCPDU_CHANNEL_JOIN_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 channel_id = 3;\n}\n\nmessage RCChannelJoinResponsePdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_JOIN_RESPONSE];\n    required uint32 initiator = 2;\n    required uint32 requested_channel_id = 3;\n    required RCPduResult_E result = 4;\n}\n\nmessage RCChannelLeaveRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_LEAVE_REQUEST];\n    required uint32 initiator = 2;\n    repeated uint32 channel_ids = 3 [packed = true];\n}\n\nmessage RCChannelReleaseRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_RELEASE_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 channel_id = 3;\n}\n\nmessage RCChannelReleaseIndicationPdu {\n    optional RCPduType_E type = 1\n    [default = RCPDU_CHANNEL_RELEASE_INDICATION];\n    required uint32 initiator = 2;\n    required uint32 channel_id = 3;\n}\n\n// Data transfer\nmessage RCSendDataPdu {\n    required RCPduType_E type = 1 [default = RCPDU_SEND_DATA_REQUEST];\n    required RCPduType_E sub_type = 2;\n    required uint32 initiator = 3;\n    required uint32 conf_id = 4;\n    required uint32 session_id = 5;\n    required uint32 channel_id = 6;\n    required bool upward = 7;\n    required bool reliability = 8;\n    required RCPduPriority_E priority = 9;\n    required bytes data = 10;\n    optional uint32 peer = 11;\n    optional RCPduSegment_E seg = 12;\n    optional uint32 total_size = 13;\n    optional uint32 site_id = 14;\n    optional string user_id = 15;\n    optional string user_name = 16;\n    optional string user_role = 17;\n    optional string device_type = 18;\n    optional string site = 19;\n}\n\n//  Token management\nmessage RCTokenGrabRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GRAB_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n}\n\nmessage RCTokenGrabConfirmPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GRAB_CONFIRM];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n    required RCPduResult_E result = 4;\n    required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenInhibitRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_INHIBIT_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n}\n\nmessage RCTokenInhibitConfirmPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_INHIBIT_CONFIRM];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n    required RCPduResult_E result = 4;\n    required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenGiveRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n    required uint64 recipient = 4;\n}\n\nmessage RCTokenGiveIndicationPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_INDICATION];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n    required uint64 recipient = 4;\n}\n\nmessage RCTokenGiveResponsePdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_RESPONSE];\n    required uint32 token_id = 2;\n    required uint64 recipient = 3;\n    required RCPduResult_E result = 4;\n}\n\nmessage RCTokenGiveConfirmPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_CONFIRM];\n    required uint32 token_id = 2;\n    required uint64 recipient = 3;\n    required RCPduResult_E result = 4;\n    required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenPleaseRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_PLEASE_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n}\n\nmessage RCTokenPleaseIndicationPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_PLEASE_INDICATION];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n}\n\nmessage RCTokenReleaseRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_RELEASE_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n}\n\nmessage RCTokenReleaseConfirmPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n    required RCPduResult_E result = 4;\n    required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenTestRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n}\n\nmessage RCTokenTestConfirmPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_CONFIRM];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n    required RCPduTokenStatus_E status = 4;\n}\n\n//gcc.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCConferenceJoinRequestPdu {\n    required RCPduType_E type = 1 [default = RCPDU_CONFERENCE_JOIN_REQUEST];\n    required uint32 initiator = 2;\n    required RCPduNodeType_E node_type = 3;\n    required RCConferenceDescriptorPdu class_description = 4;//conf_desc\n}\n\nmessage RCConferenceJoinResponsePdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_JOIN_RESPONSE];\n    required uint32 conf_id = 2;\n    required RCPduResult_E result = 3;\n    optional RCConferenceDescriptorPdu class_description = 4;\n}\n\nmessage RCConferenceInviteRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_INVITE_REQUEST];\n    required uint32 initiator = 2;\n    required RCConferenceDescriptorPdu class_description = 3;\n}\n\nmessage RCConferenceInviteResponsePdu {\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_INVITE_RESPONSE];\n    required RCPduResult_E result = 2;\n    optional bytes user_data = 3;\n}\n\nmessage RCConferenceLockRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LOCK_REQUEST];\n}\n\nmessage RCConferenceLockResponsePdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LOCK_RESPONSE];\n    required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceLockIndicationPdu {\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_LOCK_INDICATION];\n}\n\nmessage RCConferenceUnlockRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_UNLOCK_REQUEST];\n}\n\nmessage RCConferenceUnlockResponsePdu {\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_UNLOCK_RESPONSE];\n    required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceUnlockIndicationPdu {\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_UNLOCK_INDICATION];\n}\n\nmessage RCConferenceLeaveRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LEAVE_REQUEST];\n    required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceTerminateRequestPdu {\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_TERMINATE_REQUEST];\n    required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceTerminateResponsePdu {\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_TERMINATE_RESPONSE];\n    required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceTerminateIndicationPdu { // MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_TERMINATE_INDICATION];\n    required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceEjectUserRequestPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_EJECT_USER_REQUEST];\n    required uint32 ejected_node_id = 2;\n    required RCPduReason_E reason = 3;\n}\n\nmessage RCConferenceEjectUserResponsePdu { // MCS_Send_Data on Node ID Channel of requester\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_EJECT_USER_RESPONSE];\n    required uint32 ejected_node_id = 2;\n    required RCPduResult_E result = 3;\n}\n\nmessage RCConferenceEjectUserIndicationPdu { // MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_EJECT_USER_INDICATION];\n    required uint32 ejected_node_id = 2;\n    required RCPduReason_E reason = 3;\n}\n\nmessage RCRosterUpdateIndicationPdu { // MCS_Send_Data on Node ID Channel or\n// MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n    optional RCPduType_E type = 1 [default = RCPDU_ROSTER_UPDATE_INDICATION];\n    required bool full_refresh = 2; // Conference Roster and all\n    repeated RCNodeRecordPdu node_record = 3;\n    repeated RCApplicationRecordPdu app_record = 4;\n}\n\nmessage RCRegistryUpdateRequestPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n    optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_REQUEST];\n    required uint32 key_id = 2;\n    required uint32 obj_id = 3;\n    required bytes user_data = 4;\n}\n\nmessage RCRegistryUpdateIndicationPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n    optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_RESPONSE];\n    required uint32 key_id = 2;\n    required uint32 obj_id = 3;\n    required bytes user_data = 4;\n}\n\nmessage RCRegistryUpdateResponsePdu { // MCS_Send_Data on Node ID Channel of requester\n    optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_INDICATION];\n    required uint32 key_id = 2;\n    required uint32 obj_id = 3;\n    required RCPduResult_E result = 4;\n}\n\nmessage RCFunctionNotSupportedResponsePdu {\n    optional RCPduType_E type = 1\n    [default = RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE];\n    required uint32 request_pdu_id = 2;\n}\n\n//ape.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCConferenceSendDataRequestPdu {\n    optional uint32 initiator = 1;\n    optional uint32 peer = 2;\n    required bool is_public = 3;\n    required bytes user_data = 4;\n    optional uint32 action_type = 5;//消息的指令类型\n}\n\nmessage RCChatSendDataRequestPdu {\n    optional uint32 initiator = 1;\n    optional uint32 peer = 2;\n    required bool is_public = 3;\n    required bytes user_data = 4;\n    required string from_role = 5;\n    required bytes from_name = 6;\n}\n\nmessage RCDocSendDataModelPdu {\n    required uint32 item_idx=1;//唯一标识\n    required uint32 owner=2;\n    optional uint32 from=3;\n    optional uint32 cur_page_no=4;\n    optional uint32 page_num  =5;\n    optional string file_type=6;\n    optional string creat_user_id=7;//创建文档userid\n    optional string relative_url=8;//文档相对地址\n    optional string url  =9;//文档地址\n    optional uint32 cur_V=10;\n    optional uint32 cur_H=11;\n    optional uint32 scale=12;\n    optional bool visible=13;\n    optional uint32 action=14;//0,无操作, 1翻页、2.显示/隐藏\n    optional string doc_id=15;//文档在服务器数据库中的唯一id\n    optional string file_name=16;//文档的名字\n    optional string dynamic_TS=17;//"dynamicTransferStatic": "0"\n    optional string md5=18;//md5\n\n}\nmessage RCGiftSendDataRequestPdu {\n    optional uint32 initiator = 1;\n    required uint32 peer = 2;\n    required uint32 index = 3;\n    required uint32 num = 4;\n    optional bytes user_data = 5;\n}\n\nmessage RCAudioSendDataRequestPdu1 {\n    optional uint32 initiator = 1;\n    required bytes user_data = 2;\n}\nmessage RCAudioSendDataRequestPdu {\n    required uint32 from_node_id = 1;//发起人\n    optional uint32 to_node_id = 2;//接收人,如果是0就是所有人都接收\n    optional uint32 actionType = 3;//消息指令类型;\n    optional bytes  data = 4;//其他数据,这个根据actionType来确定数据的结构\n}\n\nmessage RCVideoSendDataRequestPdu {\n    required uint32 from_node_id = 1;//发起人\n    optional uint32 to_node_id = 2;//接收人,如果是0就是所有人都接收\n    optional uint32 actionType = 3;//消息指令类型;\n    optional bytes  data = 4;//其他数据,这个根据actionType来确定数据的结构\n}\n\nmessage RCAudioChannelInfoRecordPdu {\n    required uint32 status = 1;\n    required uint32 device_id = 2;\n    required uint32 framerate = 3;\n    required uint32 bitrate = 4;\n    required uint32 codec = 5;\n}\nmessage RCAudioChannelInfoPdu {\n     optional uint32 status = 1;//开启的状态\n    optional uint32 channel_id = 2;//唯一的频道id\n    optional uint32 timestamp = 3;//更新的时间戳\n    optional uint32 from_node_id = 4;//发起者的id\n    optional uint32 to_node_id = 5;//接收者的id,(如果是0,所有人都接收)\n    optional uint32 media_type = 6;//媒体类型:视频(包含音频)或音频\n    optional uint32 class_id = 7;//课堂号\n    optional string site_id = 8;//站点号\n    optional string user_id = 9;//用户的userId\n}\n\nmessage RCVideoChannelInfoPdu {\n    optional uint32 status = 1;//开启的状态\n    optional uint32 channel_id = 2;//唯一的频道id\n    optional uint32 timestamp = 3;//更新的时间戳\n    optional uint32 from_node_id = 4;//发起者的id\n    optional uint32 to_node_id = 5;//接收者的id,(如果是0,所有人都接收)\n    optional uint32 media_type = 6;//媒体类型:视频(包含音频)或音频\n    optional uint32 class_id = 7;//课堂号\n    optional string site_id = 8;//站点号\n    optional string user_id = 9;//用户的userId\n}\n\nmessage RCVideoChannelInfoRecordPdu {\n    optional uint32 status = 1;\n    optional uint32 device_id = 2;\n    optional uint32 width = 3;\n    optional uint32 height = 4;\n    optional uint32 framerate = 5;\n    optional uint32 bitrate = 6;\n    optional uint32 codec = 7;\n    optional string peer_id = 8;\n    optional string url = 9;\n    optional uint32 type = 10;\n    optional string shamlive = 11;\n    optional uint32 livetype = 12;\n    optional uint32 releaseGrab = 13;\n    optional string curTime = 14;\n}\n\nmessage RCAudioDeviceInfoRecordPdu {\n    required uint32 device_id = 1;\n    required string device_name = 2;\n}\n\nmessage RCVideoDeviceInfoRecordPdu {\n    required uint32 device_id = 1;\n    required string device_name = 2;\n}\n\nmessage RCNodeInfoRecordPdu {\n    required uint32 node_id = 1;\n    required string name = 2;\n    required uint32 role = 3;\n    required uint32 level = 4;\n    repeated RCAudioDeviceInfoRecordPdu audio_records = 5;\n    repeated RCVideoDeviceInfoRecordPdu video_records = 6;\n    optional uint32 status = 7;\n    optional bytes user_data = 8;\n    optional string user_id = 9;\n    optional uint32 handUpTime = 10;\n    optional uint32 deviceType = 11;\n    optional uint32 mobileDirection = 12;\n}\n\nmessage RCVotingPollSettingsPdu {\n    required bool timer = 1;\n    optional uint32 time_limit = 2;\n    optional uint32 total_score = 3;\n}\n\nmessage RCVotingPollResultPdu {\n    required string title = 1;\n    required string content = 2;\n    optional uint32 score = 3;\n}\n\nmessage RCVotingPollQuestionPdu {\n    required uint32 index = 1;\n    required uint32 type = 2;\n    required string title = 3;\n    repeated string options = 4;\n    optional uint32 score = 5;\n    optional uint32 time_limit = 6;\n    optional string restrict_input = 7;\n    optional uint32 char_limit = 8;\n    optional string answer = 9;\n    repeated uint32 selections = 10;\n    repeated string responses = 11;\n}\n\nmessage RCVotingPollRecordPdu {\n    required RCVotingPollSettingsPdu settings = 1;\n    required string title = 2;\n    repeated RCVotingPollResultPdu results = 3;\n    repeated RCVotingPollQuestionPdu questions = 4;\n}\n\nmessage RCNodeInfoUserDataPdu {\n    optional string device = 1;//设备名称\n    optional bool has_camera = 2;//是否有摄像头可用\n    optional bool has_microphone = 3;//麦克风是否可用\n    optional string browser = 4;//浏览器\n    optional string qq = 5;//qq\n    optional string skype = 6;//skype\n}\n\nmessage RCTabUpdateDataRequestPdu {\n    optional uint32 id = 1;\n    optional bytes action = 2;\n    optional uint32 uncomprLen =3;\n}\n\nmessage RCWhiteBoardDataModelPdu {\n     required uint32 type= 1;//白板类型\n     required uint32 itemIdx= 2;//itemIdx 每一次绘制的唯一标识\n     required uint32 initiator=3; //绘制来自谁\n     required uint32 parentId=4; //父级的id\n     required uint32 cur_page_no= 5;//页码\n     optional string pointGroup=6; //坐标点集数组的JSON字符串\n     optional string color=7  [default = "#000000"]; //颜色\n     optional uint32 thickness= 8 ;//线条粗细\n     optional uint32 radius= 9;//园的半径\n     optional uint32 fontSize= 10;//字体大小\n     optional string fontName= 11;//字体名称\n     optional string text= 12;//文本内容\n     optional bytes data = 13;//暂时预留的参数\n}\nmessage RCClassSendDataModelPdu {\n     optional uint32 item_idx=1;\n     optional uint32 from=2;\n     optional uint32 owner=3;\n     optional uint32 action_type=4;//状态改变的类型\n     optional RCClassStatusInfoPdu class_status_info=5;//当前课堂状态的信息\n}\nmessage RCClassStatusInfoPdu {\n     optional uint32 node_id=1;//mcu中的唯一ID\n     optional string user_id=2;\n     optional string user_name=3;\n     optional string site_id=4;//站点号\n     optional uint32 class_id=5;\n     optional string class_name=6;\n     required uint32 class_type=7;//课堂类型\n     required uint32 class_status=9;//课堂的状态\n     optional string class_startTime=10;//课堂点击开始时间\n     optional string class_stopTime=11;//最后一次停止的时间(点暂停或结束),每次发送数据都获取当前时间戳\n     optional uint32 class_timestamp=12;//相对于点开始课堂的时间戳\n     optional string class_beginTime=13;//课堂创建的时间,这个是Sass返回的\n     optional string class_endTime=14;//课堂结束的时间,这个是Sass返回的\n     optional bool record_status=15;//当前录制状态\n     optional uint32 record_timestamp=16;//相对于首次开始录制的时间戳\n     optional string record_fileName=17;//录制的文件名\n     optional string record_downloadUrl=18;//下载地址\n     optional uint32 server_timestamp=19;//当前的系统时间戳\n     optional uint32 active_doc_id=20;//当前激活的文档id\n     optional uint32 active_doc_cur_page=21;//当前激活的文档的当前页\n}\n\nmessage RCConferenceRecordRequestPdu {\n    \toptional uint32 initiator = 1;\t// 发起录像指令的node id\n\t\toptional bool record = 2;\t\t// 录像指令 true:开始录像, false:停止录像\n    \toptional uint32 class_time = 3;\t// 课堂进行时间(秒)\n\t\toptional string filename = 4;\t// 录像文件名称,filename中增加目录部分\n}\n\n//end\n';
t.default=n;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(n,"default","D:/work/mcuClientBranch/McuClient20170228/src/pdus/pro.js")})()},function(e,t){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],r=0;r<e.length;r+=3)for(var i=e[r]<<16|e[r+1]<<8|e[r+2],o=0;o<4;o++)8*r+6*o<=8*e.length?n.push(t.charAt(i>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,i=0;r<e.length;i=++r%4)0!=i&&n.push((t.indexOf(e.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|t.indexOf(e.charAt(r))>>>6-2*i);return n}};e.exports=n}()},function(e,t,n){var r;(function(e,i,o){(function(){"use strict";function s(e){return"function"==typeof e||"object"==typeof e&&null!==e}function a(e){return"function"==typeof e}function u(e){K=e}function l(e){ee=e}function f(){return function(){e.nextTick(_)}}function d(){return function(){z(_)}}function c(){var e=0,t=new re(_),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function h(){var e=new MessageChannel;return e.port1.onmessage=_,function(){e.port2.postMessage(0)}}function p(){return function(){setTimeout(_,1)}}function _(){for(var e=0;e<Z;e+=2){var t=se[e],n=se[e+1];t(n),se[e]=void 0,se[e+1]=void 0}Z=0}function E(){try{var e=n(47);return z=e.runOnLoop||e.runOnContext,d()}catch(e){return p()}}function g(e,t){var n=this,r=new this.constructor(R);void 0===r[le]&&B(r);var i=n._state;if(i){var o=arguments[i-1];ee(function(){k(i,r,o,n._result)})}else O(n,r,e,t);return r}function y(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(R);return b(n,e),n}function R(){}function m(){return new TypeError("You cannot resolve a promise with itself")}function C(){return new TypeError("A promises callback cannot return that same promise.")}function T(e){try{return e.then}catch(e){return he.error=e,he}}function v(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function S(e,t,n){ee(function(e){var r=!1,i=v(n,t,function(n){r||(r=!0,t!==n?b(e,n):N(e,n))},function(t){r||(r=!0,P(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&i&&(r=!0,P(e,i))},e)}function A(e,t){t._state===de?N(e,t._result):t._state===ce?P(e,t._result):O(t,void 0,function(t){b(e,t)},function(t){P(e,t)})}function I(e,t,n){t.constructor===e.constructor&&n===ae&&constructor.resolve===ue?A(e,t):n===he?P(e,he.error):void 0===n?N(e,t):a(n)?S(e,t,n):N(e,t)}function b(e,t){e===t?P(e,m()):s(t)?I(e,t,T(t)):N(e,t)}function D(e){e._onerror&&e._onerror(e._result),w(e)}function N(e,t){e._state===fe&&(e._result=t,e._state=de,0!==e._subscribers.length&&ee(w,e))}function P(e,t){e._state===fe&&(e._state=ce,e._result=t,ee(D,e))}function O(e,t,n,r){var i=e._subscribers,o=i.length;e._onerror=null,i[o]=t,i[o+de]=n,i[o+ce]=r,0===o&&e._state&&ee(w,e)}function w(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,i,o=e._result,s=0;s<t.length;s+=3)r=t[s],i=t[s+n],r?k(n,r,i,o):i(o);e._subscribers.length=0}}function U(){this.error=null}function L(e,t){try{return e(t)}catch(e){return pe.error=e,pe}}function k(e,t,n,r){var i,o,s,u,l=a(n);if(l){if(i=L(n,r),i===pe?(u=!0,o=i.error,i=null):s=!0,t===i)return void P(t,C())}else i=r,s=!0;t._state!==fe||(l&&s?b(t,i):u?P(t,o):e===de?N(t,i):e===ce&&P(t,i))}function x(e,t){try{t(function(t){b(e,t)},function(t){P(e,t)})}catch(t){P(e,t)}}function M(){return _e++}function B(e){e[le]=_e++,e._state=void 0,e._result=void 0,e._subscribers=[]}function F(e){return new me(this,e).promise}function H(e){var t=this;return new t(X(e)?function(n,r){for(var i=e.length,o=0;o<i;o++)t.resolve(e[o]).then(n,r)}:function(e,t){t(new TypeError("You must pass an array to race."))})}function j(e){var t=this,n=new t(R);return P(n,e),n}function G(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function q(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function V(e){this[le]=M(),this._result=this._state=void 0,this._subscribers=[],R!==e&&("function"!=typeof e&&G(),this instanceof V?x(this,e):q())}function J(e,t){this._instanceConstructor=e,this.promise=new e(R),this.promise[le]||B(this.promise),X(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?N(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&N(this.promise,this._result))):P(this.promise,Y())}function Y(){return new Error("Array Methods must be provided an Array")}function W(){var e;if("undefined"!=typeof i)e=i;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;t&&"[object Promise]"===Object.prototype.toString.call(t.resolve())&&!t.cast||(e.Promise=Re)}var Q;Q=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var z,K,$,X=Q,Z=0,ee=function(e,t){se[Z]=e,se[Z+1]=t,Z+=2,2===Z&&(K?K(_):$())},te="undefined"!=typeof window?window:void 0,ne=te||{},re=ne.MutationObserver||ne.WebKitMutationObserver,ie="undefined"==typeof self&&"undefined"!=typeof e&&"[object process]"==={}.toString.call(e),oe="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,se=new Array(1e3);$=ie?f():re?c():oe?h():void 0===te?E():p();var ae=g,ue=y,le=Math.random().toString(36).substring(16),fe=void 0,de=1,ce=2,he=new U,pe=new U,_e=0,Ee=F,ge=H,ye=j,Re=V;V.all=Ee,V.race=ge,V.resolve=ue,V.reject=ye,V._setScheduler=u,V._setAsap=l,V._asap=ee,V.prototype={constructor:V,then:ae,catch:function(e){return this.then(null,e)}};var me=J;J.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===fe&&n<e;n++)this._eachEntry(t[n],n)},J.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===ue){var i=T(e);if(i===ae&&e._state!==fe)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(n===Re){var o=new n(R);I(o,e,i),this._willSettleAt(o,t)}else this._willSettleAt(new n(function(t){t(e)}),t)}else this._willSettleAt(r(e),t)},J.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===fe&&(this._remaining--,e===ce?P(r,n):this._result[t]=n),0===this._remaining&&N(r,this._result)},J.prototype._willSettleAt=function(e,t){var n=this;O(e,void 0,function(e){n._settledAt(de,t,e)},function(e){n._settledAt(ce,t,e)})};var Ce=W,Te={Promise:Re,polyfill:Ce};n(10).amd?(r=function(){return Te}.call(t,n,t,o),!(void 0!==r&&(o.exports=r))):"undefined"!=typeof o&&o.exports?o.exports=Te:"undefined"!=typeof this&&(this.ES6Promise=Te),Ce()}).call(this)}).call(t,n(19),function(){return this}(),n(9)(e))},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function r(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t,n){var r,i,o;!function(s){n(20)&&n(20).jQuery?(i=[n(23)],r=s,o="function"==typeof r?r.apply(t,i):r,!(void 0!==o&&(e.exports=o))):s("undefined"!=typeof e&&e.exports?n(23):jQuery)}(function(e){function t(t){return!t||void 0!==t.allowPageScroll||void 0===t.swipe&&void 0===t.swipeStatus||(t.allowPageScroll=f),void 0!==t.click&&void 0===t.tap&&(t.tap=t.click),t||(t={}),t=e.extend({},e.fn.swipe.defaults,t),this.each(function(){var r=e(this),i=r.data(D);i||(i=new n(this,t),r.data(D,i))})}function n(t,n){function r(t){if(!(le()||e(t.target).closest(n.excludedElements,Ve).length>0)){var r,i=t.originalEvent?t.originalEvent:t,o=i.touches,s=o?o[0]:i;return Je=C,o?Ye=o.length:n.preventDefaultEvents!==!1&&t.preventDefault(),Le=0,ke=null,xe=null,Ge=null,Me=0,Be=0,Fe=0,He=1,je=0,qe=Ee(),ae(),de(0,s),!o||Ye===n.fingers||n.fingers===R||q()?(Qe=Ae(),2==Ye&&(de(1,o[1]),Be=Fe=Re(We[0].start,We[1].start)),(n.swipeStatus||n.pinchStatus)&&(r=k(i,Je))):r=!1,r===!1?(Je=S,k(i,Je),r):(n.hold&&(et=setTimeout(e.proxy(function(){Ve.trigger("hold",[i.target]),n.hold&&(r=n.hold.call(Ve,i,i.target))},this),n.longTapThreshold)),fe(!0),null)}}function N(e){var t=e.originalEvent?e.originalEvent:e;if(Je!==v&&Je!==S&&!ue()){var r,i=t.touches,o=i?i[0]:t,s=ce(o);if(ze=Ae(),i&&(Ye=i.length),n.hold&&clearTimeout(et),Je=T,2==Ye&&(0==Be?(de(1,i[1]),Be=Fe=Re(We[0].start,We[1].start)):(ce(i[1]),Fe=Re(We[0].end,We[1].end),Ge=Ce(We[0].end,We[1].end)),He=me(Be,Fe),je=Math.abs(Be-Fe)),Ye===n.fingers||n.fingers===R||!i||q()){if(ke=Se(s.start,s.end),xe=Se(s.last,s.end),j(e,xe),Le=Te(s.start,s.end),Me=ye(),pe(ke,Le),r=k(t,Je),!n.triggerOnTouchEnd||n.triggerOnTouchLeave){var a=!0;if(n.triggerOnTouchLeave){var u=Ie(this);a=be(s.end,u)}!n.triggerOnTouchEnd&&a?Je=L(T):n.triggerOnTouchLeave&&!a&&(Je=L(v)),Je!=S&&Je!=v||k(t,Je)}}else Je=S,k(t,Je);r===!1&&(Je=S,k(t,Je))}}function P(e){var t=e.originalEvent?e.originalEvent:e,r=t.touches;if(r){if(r.length&&!ue())return se(t),!0;if(r.length&&ue())return!0}return ue()&&(Ye=$e),ze=Ae(),Me=ye(),B()||!M()?(Je=S,k(t,Je)):n.triggerOnTouchEnd||0==n.triggerOnTouchEnd&&Je===T?(n.preventDefaultEvents!==!1&&e.preventDefault(),Je=v,k(t,Je)):!n.triggerOnTouchEnd&&K()?(Je=v,x(t,Je,p)):Je===T&&(Je=S,k(t,Je)),fe(!1),null}function O(){Ye=0,ze=0,Qe=0,Be=0,Fe=0,He=1,ae(),fe(!1)}function w(e){var t=e.originalEvent?e.originalEvent:e;n.triggerOnTouchLeave&&(Je=L(v),k(t,Je))}function U(){Ve.unbind(Ne,r),Ve.unbind(Ue,O),Ve.unbind(Pe,N),Ve.unbind(Oe,P),we&&Ve.unbind(we,w),fe(!1)}function L(e){var t=e,r=H(),i=M(),o=B();return!r||o?t=S:!i||e!=T||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!i&&e==v&&n.triggerOnTouchLeave&&(t=S):t=v,t}function k(e,t){var n,r=e.touches;return(W()||Y())&&(n=x(e,t,c)),(V()||q())&&n!==!1&&(n=x(e,t,h)),ie()&&n!==!1?n=x(e,t,_):oe()&&n!==!1?n=x(e,t,E):re()&&n!==!1&&(n=x(e,t,p)),t===S&&(Y()&&(n=x(e,t,c)),q()&&(n=x(e,t,h)),O(e)),t===v&&(r?r.length||O(e):O(e)),n}function x(t,r,f){var d;if(f==c){if(Ve.trigger("swipeStatus",[r,ke||null,Le||0,Me||0,Ye,We,xe]),n.swipeStatus&&(d=n.swipeStatus.call(Ve,t,r,ke||null,Le||0,Me||0,Ye,We,xe),d===!1))return!1;if(r==v&&J()){if(clearTimeout(Ze),clearTimeout(et),Ve.trigger("swipe",[ke,Le,Me,Ye,We,xe]),n.swipe&&(d=n.swipe.call(Ve,t,ke,Le,Me,Ye,We,xe),d===!1))return!1;switch(ke){case i:Ve.trigger("swipeLeft",[ke,Le,Me,Ye,We,xe]),n.swipeLeft&&(d=n.swipeLeft.call(Ve,t,ke,Le,Me,Ye,We,xe));break;case o:Ve.trigger("swipeRight",[ke,Le,Me,Ye,We,xe]),n.swipeRight&&(d=n.swipeRight.call(Ve,t,ke,Le,Me,Ye,We,xe));break;case s:Ve.trigger("swipeUp",[ke,Le,Me,Ye,We,xe]),n.swipeUp&&(d=n.swipeUp.call(Ve,t,ke,Le,Me,Ye,We,xe));break;case a:Ve.trigger("swipeDown",[ke,Le,Me,Ye,We,xe]),n.swipeDown&&(d=n.swipeDown.call(Ve,t,ke,Le,Me,Ye,We,xe))}}}if(f==h){if(Ve.trigger("pinchStatus",[r,Ge||null,je||0,Me||0,Ye,He,We]),n.pinchStatus&&(d=n.pinchStatus.call(Ve,t,r,Ge||null,je||0,Me||0,Ye,He,We),d===!1))return!1;if(r==v&&G())switch(Ge){case u:Ve.trigger("pinchIn",[Ge||null,je||0,Me||0,Ye,He,We]),n.pinchIn&&(d=n.pinchIn.call(Ve,t,Ge||null,je||0,Me||0,Ye,He,We));break;case l:Ve.trigger("pinchOut",[Ge||null,je||0,Me||0,Ye,He,We]),n.pinchOut&&(d=n.pinchOut.call(Ve,t,Ge||null,je||0,Me||0,Ye,He,We))}}return f==p?r!==S&&r!==v||(clearTimeout(Ze),clearTimeout(et),$()&&!ee()?(Xe=Ae(),Ze=setTimeout(e.proxy(function(){Xe=null,Ve.trigger("tap",[t.target]),n.tap&&(d=n.tap.call(Ve,t,t.target))},this),n.doubleTapThreshold)):(Xe=null,Ve.trigger("tap",[t.target]),n.tap&&(d=n.tap.call(Ve,t,t.target)))):f==_?r!==S&&r!==v||(clearTimeout(Ze),clearTimeout(et),Xe=null,Ve.trigger("doubletap",[t.target]),n.doubleTap&&(d=n.doubleTap.call(Ve,t,t.target))):f==E&&(r!==S&&r!==v||(clearTimeout(Ze),Xe=null,Ve.trigger("longtap",[t.target]),n.longTap&&(d=n.longTap.call(Ve,t,t.target)))),d}function M(){var e=!0;return null!==n.threshold&&(e=Le>=n.threshold),e}function B(){var e=!1;return null!==n.cancelThreshold&&null!==ke&&(e=_e(ke)-Le>=n.cancelThreshold),e}function F(){return null===n.pinchThreshold||je>=n.pinchThreshold}function H(){var e;return e=!n.maxTimeThreshold||!(Me>=n.maxTimeThreshold)}function j(e,t){if(n.preventDefaultEvents!==!1)if(n.allowPageScroll===f)e.preventDefault();else{var r=n.allowPageScroll===d;switch(t){case i:(n.swipeLeft&&r||!r&&n.allowPageScroll!=g)&&e.preventDefault();break;case o:(n.swipeRight&&r||!r&&n.allowPageScroll!=g)&&e.preventDefault();break;case s:(n.swipeUp&&r||!r&&n.allowPageScroll!=y)&&e.preventDefault();break;case a:(n.swipeDown&&r||!r&&n.allowPageScroll!=y)&&e.preventDefault()}}}function G(){var e=Q(),t=z(),n=F();return e&&t&&n}function q(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function V(){return!(!G()||!q())}function J(){var e=H(),t=M(),n=Q(),r=z(),i=B(),o=!i&&r&&n&&t&&e;return o}function Y(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function W(){return!(!J()||!Y())}function Q(){return Ye===n.fingers||n.fingers===R||!A}function z(){return 0!==We[0].end.x}function K(){return!!n.tap}function $(){return!!n.doubleTap}function X(){return!!n.longTap}function Z(){if(null==Xe)return!1;var e=Ae();return $()&&e-Xe<=n.doubleTapThreshold}function ee(){return Z()}function te(){return(1===Ye||!A)&&(isNaN(Le)||Le<n.threshold)}function ne(){return Me>n.longTapThreshold&&Le<m}function re(){return!(!te()||!K())}function ie(){return!(!Z()||!$())}function oe(){return!(!ne()||!X())}function se(e){Ke=Ae(),$e=e.touches.length+1}function ae(){Ke=0,$e=0}function ue(){var e=!1;if(Ke){var t=Ae()-Ke;t<=n.fingerReleaseThreshold&&(e=!0)}return e}function le(){return!(Ve.data(D+"_intouch")!==!0)}function fe(e){Ve&&(e===!0?(Ve.bind(Pe,N),Ve.bind(Oe,P),we&&Ve.bind(we,w)):(Ve.unbind(Pe,N,!1),Ve.unbind(Oe,P,!1),we&&Ve.unbind(we,w,!1)),Ve.data(D+"_intouch",e===!0))}function de(e,t){var n={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return n.start.x=n.last.x=n.end.x=t.pageX||t.clientX,n.start.y=n.last.y=n.end.y=t.pageY||t.clientY,We[e]=n,n}function ce(e){var t=void 0!==e.identifier?e.identifier:0,n=he(t);return null===n&&(n=de(t,e)),n.last.x=n.end.x,n.last.y=n.end.y,n.end.x=e.pageX||e.clientX,n.end.y=e.pageY||e.clientY,n}function he(e){return We[e]||null}function pe(e,t){t=Math.max(t,_e(e)),qe[e].distance=t}function _e(e){if(qe[e])return qe[e].distance}function Ee(){var e={};return e[i]=ge(i),e[o]=ge(o),e[s]=ge(s),e[a]=ge(a),e}function ge(e){return{direction:e,distance:0}}function ye(){return ze-Qe}function Re(e,t){var n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+r*r))}function me(e,t){var n=t/e*1;return n.toFixed(2)}function Ce(){return He<1?l:u}function Te(e,t){return Math.round(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)))}function ve(e,t){var n=e.x-t.x,r=t.y-e.y,i=Math.atan2(r,n),o=Math.round(180*i/Math.PI);return o<0&&(o=360-Math.abs(o)),o}function Se(e,t){var n=ve(e,t);return n<=45&&n>=0?i:n<=360&&n>=315?i:n>=135&&n<=225?o:n>45&&n<135?a:s}function Ae(){var e=new Date;return e.getTime()}function Ie(t){t=e(t);var n=t.offset(),r={left:n.left,right:n.left+t.outerWidth(),top:n.top,bottom:n.top+t.outerHeight()};return r}function be(e,t){return e.x>t.left&&e.x<t.right&&e.y>t.top&&e.y<t.bottom}var n=e.extend({},n),De=A||b||!n.fallbackToMouseEvents,Ne=De?b?I?"MSPointerDown":"pointerdown":"touchstart":"mousedown",Pe=De?b?I?"MSPointerMove":"pointermove":"touchmove":"mousemove",Oe=De?b?I?"MSPointerUp":"pointerup":"touchend":"mouseup",we=De?b?"mouseleave":null:"mouseleave",Ue=b?I?"MSPointerCancel":"pointercancel":"touchcancel",Le=0,ke=null,xe=null,Me=0,Be=0,Fe=0,He=1,je=0,Ge=0,qe=null,Ve=e(t),Je="start",Ye=0,We={},Qe=0,ze=0,Ke=0,$e=0,Xe=0,Ze=null,et=null;try{Ve.bind(Ne,r),Ve.bind(Ue,O)}catch(t){e.error("events not supported "+Ne+","+Ue+" on jQuery.swipe")}this.enable=function(){return Ve.bind(Ne,r),Ve.bind(Ue,O),Ve},this.disable=function(){return U(),Ve},this.destroy=function(){U(),Ve.data(D,null),Ve=null},this.option=function(t,r){if("object"==typeof t)n=e.extend(n,t);else if(void 0!==n[t]){if(void 0===r)return n[t];n[t]=r}else{if(!t)return n;e.error("Option "+t+" does not exist on jQuery.swipe.options")}return null}}var r="1.6.15",i="left",o="right",s="up",a="down",u="in",l="out",f="none",d="auto",c="swipe",h="pinch",p="tap",_="doubletap",E="longtap",g="horizontal",y="vertical",R="all",m=10,C="start",T="move",v="end",S="cancel",A="ontouchstart"in window,I=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!A,b=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!A,D="TouchSwipe",N={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:!0};e.fn.swipe=function(n){var r=e(this),i=r.data(D);if(i&&"string"==typeof n){if(i[n])return i[n].apply(this,Array.prototype.slice.call(arguments,1));e.error("Method "+n+" does not exist on jQuery.swipe")}else if(i&&"object"==typeof n)i.option.apply(this,arguments);else if(!(i||"object"!=typeof n&&n))return t.apply(this,arguments);return r},e.fn.swipe.version=r,e.fn.swipe.defaults=N,e.fn.swipe.phases={PHASE_START:C,PHASE_MOVE:T,PHASE_END:v,PHASE_CANCEL:S},e.fn.swipe.directions={LEFT:i,RIGHT:o,UP:s,DOWN:a,IN:u,OUT:l},e.fn.swipe.pageScroll={NONE:f,HORIZONTAL:g,VERTICAL:y,AUTO:d},e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:R}})},function(e,t,n){!function(){var t=n(39),r=n(22).utf8,i=n(41),o=n(22).bin,s=function(e,n){e.constructor==String?e=n&&"binary"===n.encoding?o.stringToBytes(e):r.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var a=t.bytesToWords(e),u=8*e.length,l=1732584193,f=-271733879,d=-1732584194,c=271733878,h=0;h<a.length;h++)a[h]=16711935&(a[h]<<8|a[h]>>>24)|4278255360&(a[h]<<24|a[h]>>>8);a[u>>>5]|=128<<u%32,a[(u+64>>>9<<4)+14]=u;for(var p=s._ff,_=s._gg,E=s._hh,g=s._ii,h=0;h<a.length;h+=16){var y=l,R=f,m=d,C=c;l=p(l,f,d,c,a[h+0],7,-680876936),c=p(c,l,f,d,a[h+1],12,-389564586),d=p(d,c,l,f,a[h+2],17,606105819),f=p(f,d,c,l,a[h+3],22,-1044525330),l=p(l,f,d,c,a[h+4],7,-176418897),c=p(c,l,f,d,a[h+5],12,1200080426),d=p(d,c,l,f,a[h+6],17,-1473231341),f=p(f,d,c,l,a[h+7],22,-45705983),l=p(l,f,d,c,a[h+8],7,1770035416),c=p(c,l,f,d,a[h+9],12,-1958414417),d=p(d,c,l,f,a[h+10],17,-42063),f=p(f,d,c,l,a[h+11],22,-1990404162),l=p(l,f,d,c,a[h+12],7,1804603682),c=p(c,l,f,d,a[h+13],12,-40341101),d=p(d,c,l,f,a[h+14],17,-1502002290),f=p(f,d,c,l,a[h+15],22,1236535329),l=_(l,f,d,c,a[h+1],5,-165796510),c=_(c,l,f,d,a[h+6],9,-1069501632),d=_(d,c,l,f,a[h+11],14,643717713),f=_(f,d,c,l,a[h+0],20,-373897302),l=_(l,f,d,c,a[h+5],5,-701558691),c=_(c,l,f,d,a[h+10],9,38016083),d=_(d,c,l,f,a[h+15],14,-660478335),f=_(f,d,c,l,a[h+4],20,-405537848),l=_(l,f,d,c,a[h+9],5,568446438),c=_(c,l,f,d,a[h+14],9,-1019803690),d=_(d,c,l,f,a[h+3],14,-187363961),f=_(f,d,c,l,a[h+8],20,1163531501),l=_(l,f,d,c,a[h+13],5,-1444681467),c=_(c,l,f,d,a[h+2],9,-51403784),d=_(d,c,l,f,a[h+7],14,1735328473),f=_(f,d,c,l,a[h+12],20,-1926607734),l=E(l,f,d,c,a[h+5],4,-378558),c=E(c,l,f,d,a[h+8],11,-2022574463),d=E(d,c,l,f,a[h+11],16,1839030562),f=E(f,d,c,l,a[h+14],23,-35309556),l=E(l,f,d,c,a[h+1],4,-1530992060),c=E(c,l,f,d,a[h+4],11,1272893353),d=E(d,c,l,f,a[h+7],16,-155497632),f=E(f,d,c,l,a[h+10],23,-1094730640),l=E(l,f,d,c,a[h+13],4,681279174),c=E(c,l,f,d,a[h+0],11,-358537222),d=E(d,c,l,f,a[h+3],16,-722521979),f=E(f,d,c,l,a[h+6],23,76029189),l=E(l,f,d,c,a[h+9],4,-640364487),c=E(c,l,f,d,a[h+12],11,-421815835),d=E(d,c,l,f,a[h+15],16,530742520),f=E(f,d,c,l,a[h+2],23,-995338651),l=g(l,f,d,c,a[h+0],6,-198630844),c=g(c,l,f,d,a[h+7],10,1126891415),d=g(d,c,l,f,a[h+14],15,-1416354905),f=g(f,d,c,l,a[h+5],21,-57434055),l=g(l,f,d,c,a[h+12],6,1700485571),c=g(c,l,f,d,a[h+3],10,-1894986606),d=g(d,c,l,f,a[h+10],15,-1051523),f=g(f,d,c,l,a[h+1],21,-2054922799),l=g(l,f,d,c,a[h+8],6,1873313359),c=g(c,l,f,d,a[h+15],10,-30611744),d=g(d,c,l,f,a[h+6],15,-1560198380),f=g(f,d,c,l,a[h+13],21,1309151649),l=g(l,f,d,c,a[h+4],6,-145523070),c=g(c,l,f,d,a[h+11],10,-1120210379),d=g(d,c,l,f,a[h+2],15,718787259),f=g(f,d,c,l,a[h+9],21,-343485551),l=l+y>>>0,f=f+R>>>0,d=d+m>>>0,c=c+C>>>0}return t.endian([l,f,d,c])};s._ff=function(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+(i>>>0)+s;return(a<<o|a>>>32-o)+t},s._gg=function(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+(i>>>0)+s;return(a<<o|a>>>32-o)+t},s._hh=function(e,t,n,r,i,o,s){var a=e+(t^n^r)+(i>>>0)+s;return(a<<o|a>>>32-o)+t},s._ii=function(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+(i>>>0)+s;return(a<<o|a>>>32-o)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,n){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var r=t.wordsToBytes(s(e,n));return n&&n.asBytes?r:n&&n.asString?o.bytesToString(r):t.bytesToHex(r)}}()},function(e,t,n){var r,i,o;(function(e,s){!function(e,a){n(10).amd?(i=[n(21)],r=a,o="function"==typeof r?r.apply(t,i):r,!(void 0!==o&&(s.exports=o))):"object"==typeof s&&s&&s.exports?s.exports=a(n(21),!0):(e.dcodeIO=e.dcodeIO||{}).ProtoBuf=a(e.dcodeIO.ByteBuffer)}(this,function(t,r){"use strict";var i={};return i.ByteBuffer=t,i.Long=t.Long||null,i.VERSION="5.0.1",i.WIRE_TYPES={},i.WIRE_TYPES.VARINT=0,i.WIRE_TYPES.BITS64=1,i.WIRE_TYPES.LDELIM=2,i.WIRE_TYPES.STARTGROUP=3,i.WIRE_TYPES.ENDGROUP=4,i.WIRE_TYPES.BITS32=5,i.PACKABLE_WIRE_TYPES=[i.WIRE_TYPES.VARINT,i.WIRE_TYPES.BITS64,i.WIRE_TYPES.BITS32],i.TYPES={int32:{name:"int32",wireType:i.WIRE_TYPES.VARINT,defaultValue:0},uint32:{name:"uint32",wireType:i.WIRE_TYPES.VARINT,defaultValue:0},sint32:{name:"sint32",wireType:i.WIRE_TYPES.VARINT,defaultValue:0},int64:{name:"int64",wireType:i.WIRE_TYPES.VARINT,defaultValue:i.Long?i.Long.ZERO:void 0},uint64:{name:"uint64",wireType:i.WIRE_TYPES.VARINT,defaultValue:i.Long?i.Long.UZERO:void 0},sint64:{name:"sint64",wireType:i.WIRE_TYPES.VARINT,defaultValue:i.Long?i.Long.ZERO:void 0},bool:{name:"bool",wireType:i.WIRE_TYPES.VARINT,defaultValue:!1},double:{name:"double",wireType:i.WIRE_TYPES.BITS64,defaultValue:0},string:{name:"string",wireType:i.WIRE_TYPES.LDELIM,defaultValue:""},bytes:{name:"bytes",wireType:i.WIRE_TYPES.LDELIM,defaultValue:null},fixed32:{name:"fixed32",wireType:i.WIRE_TYPES.BITS32,defaultValue:0},sfixed32:{name:"sfixed32",wireType:i.WIRE_TYPES.BITS32,defaultValue:0},fixed64:{name:"fixed64",wireType:i.WIRE_TYPES.BITS64,defaultValue:i.Long?i.Long.UZERO:void 0},sfixed64:{name:"sfixed64",wireType:i.WIRE_TYPES.BITS64,defaultValue:i.Long?i.Long.ZERO:void 0},float:{name:"float",wireType:i.WIRE_TYPES.BITS32,defaultValue:0},enum:{name:"enum",wireType:i.WIRE_TYPES.VARINT,defaultValue:0},message:{name:"message",wireType:i.WIRE_TYPES.LDELIM,defaultValue:null},group:{name:"group",wireType:i.WIRE_TYPES.STARTGROUP,defaultValue:null}},i.MAP_KEY_TYPES=[i.TYPES.int32,i.TYPES.sint32,i.TYPES.sfixed32,i.TYPES.uint32,i.TYPES.fixed32,i.TYPES.int64,i.TYPES.sint64,i.TYPES.sfixed64,i.TYPES.uint64,i.TYPES.fixed64,i.TYPES.bool,i.TYPES.string,i.TYPES.bytes],i.ID_MIN=1,i.ID_MAX=536870911,i.convertFieldsToCamelCase=!1,i.populateAccessors=!0,i.populateDefaults=!0,i.Util=function(){var t={};return t.IS_NODE=!("object"!=typeof e||e+""!="[object process]"||e.browser),t.XHR=function(){for(var e=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],t=null,n=0;n<e.length;n++){try{t=e[n]()}catch(e){continue}break}if(!t)throw Error("XMLHttpRequest is not supported");return t},t.fetch=function(e,r){if(r&&"function"!=typeof r&&(r=null),t.IS_NODE){var i=n(48);if(r)i.readFile(e,function(e,t){r(e?null:""+t)});else try{return i.readFileSync(e)}catch(e){return null}}else{var o=t.XHR();if(o.open("GET",e,!!r),o.setRequestHeader("Accept","text/plain"),"function"==typeof o.overrideMimeType&&o.overrideMimeType("text/plain"),!r)return o.send(null),200==o.status||0==o.status&&"string"==typeof o.responseText?o.responseText:null;if(o.onreadystatechange=function(){4==o.readyState&&r(200==o.status||0==o.status&&"string"==typeof o.responseText?o.responseText:null)},4==o.readyState)return;o.send(null)}},t.toCamelCase=function(e){return e.replace(/_([a-zA-Z])/g,function(e,t){return t.toUpperCase()})},t}(),i.Lang={DELIM:/[\s\{\}=;:\[\],'"\(\)<>]/g,RULE:/^(?:required|optional|repeated|map)$/,TYPE:/^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/,NAME:/^[a-zA-Z_][a-zA-Z_0-9]*$/,TYPEDEF:/^[a-zA-Z][a-zA-Z_0-9]*$/,TYPEREF:/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,FQTYPEREF:/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/,NUMBER:/^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,NUMBER_DEC:/^(?:[1-9][0-9]*|0)$/,NUMBER_HEX:/^0[xX][0-9a-fA-F]+$/,NUMBER_OCT:/^0[0-7]+$/,NUMBER_FLT:/^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/,BOOL:/^(?:true|false)$/i,ID:/^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,NEGID:/^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,WHITESPACE:/\s/,STRING:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,STRING_DQ:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,STRING_SQ:/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},i.DotProto=function(e,t){function n(e,n){var r=-1,i=1;if("-"==e.charAt(0)&&(i=-1,e=e.substring(1)),t.NUMBER_DEC.test(e))r=parseInt(e);else if(t.NUMBER_HEX.test(e))r=parseInt(e.substring(2),16);else{if(!t.NUMBER_OCT.test(e))throw Error("illegal id value: "+(i<0?"-":"")+e);r=parseInt(e.substring(1),8)}if(r=i*r|0,!n&&r<0)throw Error("illegal id value: "+(i<0?"-":"")+e);return r}function r(e){var n=1;if("-"==e.charAt(0)&&(n=-1,e=e.substring(1)),t.NUMBER_DEC.test(e))return n*parseInt(e,10);if(t.NUMBER_HEX.test(e))return n*parseInt(e.substring(2),16);if(t.NUMBER_OCT.test(e))return n*parseInt(e.substring(1),8);if("inf"===e)return n*(1/0);if("nan"===e)return NaN;if(t.NUMBER_FLT.test(e))return n*parseFloat(e);throw Error("illegal number value: "+(n<0?"-":"")+e)}function i(e,t,n){"undefined"==typeof e[t]?e[t]=n:(Array.isArray(e[t])||(e[t]=[e[t]]),e[t].push(n))}var o={},s=function(e){this.source=e+"",this.index=0,this.line=1,this.stack=[],this._stringOpen=null},a=s.prototype;a._readString=function(){var e='"'===this._stringOpen?t.STRING_DQ:t.STRING_SQ;e.lastIndex=this.index-1;var n=e.exec(this.source);if(!n)throw Error("unterminated string");return this.index=e.lastIndex,this.stack.push(this._stringOpen),this._stringOpen=null,n[1]},a.next=function(){if(this.stack.length>0)return this.stack.shift();if(this.index>=this.source.length)return null;if(null!==this._stringOpen)return this._readString();var e,n,r;do{for(e=!1;t.WHITESPACE.test(r=this.source.charAt(this.index));)if("\n"===r&&++this.line,++this.index===this.source.length)return null;if("/"===this.source.charAt(this.index))if(++this.index,"/"===this.source.charAt(this.index)){for(;"\n"!==this.source.charAt(++this.index);)if(this.index==this.source.length)return null;++this.index,++this.line,e=!0}else{if("*"!==(r=this.source.charAt(this.index)))return"/";do{if("\n"===r&&++this.line,++this.index===this.source.length)return null;n=r,r=this.source.charAt(this.index)}while("*"!==n||"/"!==r);++this.index,e=!0}}while(e);if(this.index===this.source.length)return null;var i=this.index;t.DELIM.lastIndex=0;var o=t.DELIM.test(this.source.charAt(i++));if(!o)for(;i<this.source.length&&!t.DELIM.test(this.source.charAt(i));)++i;var s=this.source.substring(this.index,this.index=i);return'"'!==s&&"'"!==s||(this._stringOpen=s),s},a.peek=function(){if(0===this.stack.length){var e=this.next();if(null===e)return null;this.stack.push(e)}return this.stack[0]},a.skip=function(e){var t=this.next();if(t!==e)throw Error("illegal '"+t+"', '"+e+"' expected")},a.omit=function(e){return this.peek()===e&&(this.next(),!0)},a.toString=function(){return"Tokenizer ("+this.index+"/"+this.source.length+" at line "+this.line+")"},o.Tokenizer=s;var u=function(e){this.tn=new s(e),this.proto3=!1},l=u.prototype;return l.parse=function(){var e,n,r={name:"[ROOT]",package:null,messages:[],enums:[],imports:[],options:{},services:[]},i=!0;try{for(;e=this.tn.next();)switch(e){case"package":if(!i||null!==r.package)throw Error("unexpected 'package'");if(e=this.tn.next(),!t.TYPEREF.test(e))throw Error("illegal package name: "+e);this.tn.skip(";"),r.package=e;break;case"import":if(!i)throw Error("unexpected 'import'");e=this.tn.peek(),("public"===e||(n="weak"===e))&&this.tn.next(),e=this._readString(),this.tn.skip(";"),n||r.imports.push(e);break;case"syntax":if(!i)throw Error("unexpected 'syntax'");this.tn.skip("="),"proto3"===(r.syntax=this._readString())&&(this.proto3=!0),this.tn.skip(";");break;case"message":this._parseMessage(r,null),i=!1;break;case"enum":this._parseEnum(r),i=!1;break;case"option":this._parseOption(r);break;case"service":this._parseService(r);break;case"extend":this._parseExtend(r);break;default:throw Error("unexpected '"+e+"'")}}catch(e){throw e.message="Parse error at line "+this.tn.line+": "+e.message,e}return delete r.name,r},u.parse=function(e){return new u(e).parse()},l._readString=function(){var e,t,n="";do{if(t=this.tn.next(),"'"!==t&&'"'!==t)throw Error("illegal string delimiter: "+t);n+=this.tn.next(),this.tn.skip(t),e=this.tn.peek()}while('"'===e||'"'===e);return n},l._readValue=function(e){var n=this.tn.peek();if('"'===n||"'"===n)return this._readString();if(this.tn.next(),t.NUMBER.test(n))return r(n);if(t.BOOL.test(n))return"true"===n.toLowerCase();if(e&&t.TYPEREF.test(n))return n;throw Error("illegal value: "+n)},l._parseOption=function(e,n){var r=this.tn.next(),i=!1;if("("===r&&(i=!0,r=this.tn.next()),!t.TYPEREF.test(r))throw Error("illegal option name: "+r);var o=r;i&&(this.tn.skip(")"),o="("+o+")",r=this.tn.peek(),t.FQTYPEREF.test(r)&&(o+=r,this.tn.next())),this.tn.skip("="),this._parseOptionValue(e,o),n||this.tn.skip(";")},l._parseOptionValue=function(e,n){var r=this.tn.peek();if("{"!==r)i(e.options,n,this._readValue(!0));else for(this.tn.skip("{");"}"!==(r=this.tn.next());){if(!t.NAME.test(r))throw Error("illegal option name: "+n+"."+r);this.tn.omit(":")?i(e.options,n+"."+r,this._readValue(!0)):this._parseOptionValue(e,n+"."+r)}},l._parseService=function(e){var n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal service name at line "+this.tn.line+": "+n);var r=n,i={name:r,rpc:{},options:{}};for(this.tn.skip("{");"}"!==(n=this.tn.next());)if("option"===n)this._parseOption(i);else{if("rpc"!==n)throw Error("illegal service token: "+n);this._parseServiceRPC(i)}this.tn.omit(";"),e.services.push(i)},l._parseServiceRPC=function(e){var n="rpc",r=this.tn.next();if(!t.NAME.test(r))throw Error("illegal rpc service method name: "+r);var i=r,o={request:null,response:null,request_stream:!1,response_stream:!1,options:{}};if(this.tn.skip("("),r=this.tn.next(),"stream"===r.toLowerCase()&&(o.request_stream=!0,r=this.tn.next()),!t.TYPEREF.test(r))throw Error("illegal rpc service request type: "+r);
if(o.request=r,this.tn.skip(")"),r=this.tn.next(),"returns"!==r.toLowerCase())throw Error("illegal rpc service request type delimiter: "+r);if(this.tn.skip("("),r=this.tn.next(),"stream"===r.toLowerCase()&&(o.response_stream=!0,r=this.tn.next()),o.response=r,this.tn.skip(")"),r=this.tn.peek(),"{"===r){for(this.tn.next();"}"!==(r=this.tn.next());){if("option"!==r)throw Error("illegal rpc service token: "+r);this._parseOption(o)}this.tn.omit(";")}else this.tn.skip(";");"undefined"==typeof e[n]&&(e[n]={}),e[n][i]=o},l._parseMessage=function(e,r){var i=!!r,o=this.tn.next(),s={name:"",fields:[],enums:[],messages:[],options:{},services:[],oneofs:{}};if(!t.NAME.test(o))throw Error("illegal "+(i?"group":"message")+" name: "+o);for(s.name=o,i&&(this.tn.skip("="),r.id=n(this.tn.next()),s.isGroup=!0),o=this.tn.peek(),"["===o&&r&&this._parseFieldOptions(r),this.tn.skip("{");"}"!==(o=this.tn.next());)if(t.RULE.test(o))this._parseMessageField(s,o);else if("oneof"===o)this._parseMessageOneOf(s);else if("enum"===o)this._parseEnum(s);else if("message"===o)this._parseMessage(s);else if("option"===o)this._parseOption(s);else if("service"===o)this._parseService(s);else if("extensions"===o)s.extensions=this._parseExtensionRanges();else if("reserved"===o)this._parseIgnored();else if("extend"===o)this._parseExtend(s);else{if(!t.TYPEREF.test(o))throw Error("illegal message token: "+o);if(!this.proto3)throw Error("illegal field rule: "+o);this._parseMessageField(s,"optional",o)}return this.tn.omit(";"),e.messages.push(s),s},l._parseIgnored=function(){for(;";"!==this.tn.peek();)this.tn.next();this.tn.skip(";")},l._parseMessageField=function(e,r,i){if(!t.RULE.test(r))throw Error("illegal message field rule: "+r);var o,s={rule:r,type:"",name:"",options:{},id:0};if("map"===r){if(i)throw Error("illegal type: "+i);if(this.tn.skip("<"),o=this.tn.next(),!t.TYPE.test(o)&&!t.TYPEREF.test(o))throw Error("illegal message field type: "+o);if(s.keytype=o,this.tn.skip(","),o=this.tn.next(),!t.TYPE.test(o)&&!t.TYPEREF.test(o))throw Error("illegal message field: "+o);if(s.type=o,this.tn.skip(">"),o=this.tn.next(),!t.NAME.test(o))throw Error("illegal message field name: "+o);s.name=o,this.tn.skip("="),s.id=n(this.tn.next()),o=this.tn.peek(),"["===o&&this._parseFieldOptions(s),this.tn.skip(";")}else if(i="undefined"!=typeof i?i:this.tn.next(),"group"===i){var a=this._parseMessage(e,s);if(!/^[A-Z]/.test(a.name))throw Error("illegal group name: "+a.name);s.type=a.name,s.name=a.name.toLowerCase(),this.tn.omit(";")}else{if(!t.TYPE.test(i)&&!t.TYPEREF.test(i))throw Error("illegal message field type: "+i);if(s.type=i,o=this.tn.next(),!t.NAME.test(o))throw Error("illegal message field name: "+o);s.name=o,this.tn.skip("="),s.id=n(this.tn.next()),o=this.tn.peek(),"["===o&&this._parseFieldOptions(s),this.tn.skip(";")}return e.fields.push(s),s},l._parseMessageOneOf=function(e){var n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal oneof name: "+n);var r,i=n,o=[];for(this.tn.skip("{");"}"!==(n=this.tn.next());)r=this._parseMessageField(e,"optional",n),r.oneof=i,o.push(r.id);this.tn.omit(";"),e.oneofs[i]=o},l._parseFieldOptions=function(e){this.tn.skip("[");for(var t,n=!0;"]"!==(t=this.tn.peek());)n||this.tn.skip(","),this._parseOption(e,!0),n=!1;this.tn.next()},l._parseEnum=function(e){var r={name:"",values:[],options:{}},i=this.tn.next();if(!t.NAME.test(i))throw Error("illegal name: "+i);for(r.name=i,this.tn.skip("{");"}"!==(i=this.tn.next());)if("option"===i)this._parseOption(r);else{if(!t.NAME.test(i))throw Error("illegal name: "+i);this.tn.skip("=");var o={name:i,id:n(this.tn.next(),!0)};i=this.tn.peek(),"["===i&&this._parseFieldOptions({options:{}}),this.tn.skip(";"),r.values.push(o)}this.tn.omit(";"),e.enums.push(r)},l._parseExtensionRanges=function(){var t,n,i,o=[];do{for(n=[];;){switch(t=this.tn.next()){case"min":i=e.ID_MIN;break;case"max":i=e.ID_MAX;break;default:i=r(t)}if(n.push(i),2===n.length)break;if("to"!==this.tn.peek()){n.push(i);break}this.tn.next()}o.push(n)}while(this.tn.omit(","));return this.tn.skip(";"),o},l._parseExtend=function(e){var n=this.tn.next();if(!t.TYPEREF.test(n))throw Error("illegal extend reference: "+n);var r={ref:n,fields:[]};for(this.tn.skip("{");"}"!==(n=this.tn.next());)if(t.RULE.test(n))this._parseMessageField(r,n);else{if(!t.TYPEREF.test(n))throw Error("illegal extend token: "+n);if(!this.proto3)throw Error("illegal field rule: "+n);this._parseMessageField(r,"optional",n)}return this.tn.omit(";"),e.messages.push(r),r},l.toString=function(){return"Parser at line "+this.tn.line},o.Parser=u,o}(i,i.Lang),i.Reflect=function(e){function n(n){if("string"==typeof n&&(n=e.TYPES[n]),"undefined"==typeof n.defaultValue)throw Error("default value for type "+n.name+" is not supported");return n==e.TYPES.bytes?new t(0):n.defaultValue}function r(t,n){if(t&&"number"==typeof t.low&&"number"==typeof t.high&&"boolean"==typeof t.unsigned&&t.low===t.low&&t.high===t.high)return new e.Long(t.low,t.high,"undefined"==typeof n?t.unsigned:n);if("string"==typeof t)return e.Long.fromString(t,n||!1,10);if("number"==typeof t)return e.Long.fromNumber(t,n||!1);throw Error("not convertible to Long")}function i(t,n){var r=n.readVarint32(),o=7&r,s=r>>>3;switch(o){case e.WIRE_TYPES.VARINT:do r=n.readUint8();while(128===(128&r));break;case e.WIRE_TYPES.BITS64:n.offset+=8;break;case e.WIRE_TYPES.LDELIM:r=n.readVarint32(),n.offset+=r;break;case e.WIRE_TYPES.STARTGROUP:i(s,n);break;case e.WIRE_TYPES.ENDGROUP:if(s===t)return!1;throw Error("Illegal GROUPEND after unknown group: "+s+" ("+t+" expected)");case e.WIRE_TYPES.BITS32:n.offset+=4;break;default:throw Error("Illegal wire type in unknown group "+t+": "+o)}return!0}var o={},s=function(e,t,n){this.builder=e,this.parent=t,this.name=n,this.className},a=s.prototype;a.fqn=function(){for(var e=this.name,t=this;;){if(t=t.parent,null==t)break;e=t.name+"."+e}return e},a.toString=function(e){return(e?this.className+" ":"")+this.fqn()},a.build=function(){throw Error(this.toString(!0)+" cannot be built directly")},o.T=s;var u=function(e,t,n,r,i){s.call(this,e,t,n),this.className="Namespace",this.children=[],this.options=r||{},this.syntax=i||"proto2"},l=u.prototype=Object.create(s.prototype);l.getChildren=function(e){if(e=e||null,null==e)return this.children.slice();for(var t=[],n=0,r=this.children.length;n<r;++n)this.children[n]instanceof e&&t.push(this.children[n]);return t},l.addChild=function(e){var t;if(t=this.getChild(e.name))if(t instanceof c.Field&&t.name!==t.originalName&&null===this.getChild(t.originalName))t.name=t.originalName;else{if(!(e instanceof c.Field&&e.name!==e.originalName&&null===this.getChild(e.originalName)))throw Error("Duplicate name in namespace "+this.toString(!0)+": "+e.name);e.name=e.originalName}this.children.push(e)},l.getChild=function(e){for(var t="number"==typeof e?"id":"name",n=0,r=this.children.length;n<r;++n)if(this.children[n][t]===e)return this.children[n];return null},l.resolve=function(e,t){var n="string"==typeof e?e.split("."):e,r=this,i=0;if(""===n[i]){for(;null!==r.parent;)r=r.parent;i++}var s;do{do{if(!(r instanceof o.Namespace)){r=null;break}if(s=r.getChild(n[i]),!s||!(s instanceof o.T)||t&&!(s instanceof o.Namespace)){r=null;break}r=s,i++}while(i<n.length);if(null!=r)break;if(null!==this.parent)return this.parent.resolve(e,t)}while(null!=r);return r},l.qn=function(e){var t=[],n=e;do t.unshift(n.name),n=n.parent;while(null!==n);for(var r=1;r<=t.length;r++){var i=t.slice(t.length-r);if(e===this.resolve(i,e instanceof o.Namespace))return i.join(".")}return e.fqn()},l.build=function(){for(var e,t={},n=this.children,r=0,i=n.length;r<i;++r)e=n[r],e instanceof u&&(t[e.name]=e.build());return Object.defineProperty&&Object.defineProperty(t,"$options",{value:this.buildOpt()}),t},l.buildOpt=function(){for(var e={},t=Object.keys(this.options),n=0,r=t.length;n<r;++n){var i=t[n],o=this.options[t[n]];e[i]=o}return e},l.getOption=function(e){return"undefined"==typeof e?this.options:"undefined"!=typeof this.options[e]?this.options[e]:null},o.Namespace=u;var f=function(t,n,r,i){if(this.type=t,this.resolvedType=n,this.isMapKey=r,this.syntax=i,r&&e.MAP_KEY_TYPES.indexOf(t)<0)throw Error("Invalid map key type: "+t.name)},d=f.prototype;f.defaultFieldValue=n,d.verifyValue=function(n){function i(e,t){throw Error("Illegal value for "+o.toString(!0)+" of type "+o.type.name+": "+e+" ("+t+")")}var o=this;switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:return("number"!=typeof n||n===n&&n%1!==0)&&i(typeof n,"not an integer"),n>4294967295?0|n:n;case e.TYPES.uint32:case e.TYPES.fixed32:return("number"!=typeof n||n===n&&n%1!==0)&&i(typeof n,"not an integer"),n<0?n>>>0:n;case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:if(e.Long)try{return r(n,!1)}catch(e){i(typeof n,e.message)}else i(typeof n,"requires Long.js");case e.TYPES.uint64:case e.TYPES.fixed64:if(e.Long)try{return r(n,!0)}catch(e){i(typeof n,e.message)}else i(typeof n,"requires Long.js");case e.TYPES.bool:return"boolean"!=typeof n&&i(typeof n,"not a boolean"),n;case e.TYPES.float:case e.TYPES.double:return"number"!=typeof n&&i(typeof n,"not a number"),n;case e.TYPES.string:return"string"==typeof n||n&&n instanceof String||i(typeof n,"not a string"),""+n;case e.TYPES.bytes:return t.isByteBuffer(n)?n:t.wrap(n,"base64");case e.TYPES.enum:var s=this.resolvedType.getChildren(e.Reflect.Enum.Value);for(u=0;u<s.length;u++){if(s[u].name==n)return s[u].id;if(s[u].id==n)return s[u].id}if("proto3"===this.syntax)return("number"!=typeof n||n===n&&n%1!==0)&&i(typeof n,"not an integer"),(n>4294967295||n<0)&&i(typeof n,"not in range for uint32"),n;i(n,"not a valid enum value");case e.TYPES.group:case e.TYPES.message:if(n&&"object"==typeof n||i(typeof n,"object expected"),n instanceof this.resolvedType.clazz)return n;if(n instanceof e.Builder.Message){var a={};for(var u in n)n.hasOwnProperty(u)&&(a[u]=n[u]);n=a}return new this.resolvedType.clazz(n)}throw Error("[INTERNAL] Illegal value for "+this.toString(!0)+": "+n+" (undefined type "+this.type+")")},d.calculateLength=function(n,r){if(null===r)return 0;var i;switch(this.type){case e.TYPES.int32:return r<0?t.calculateVarint64(r):t.calculateVarint32(r);case e.TYPES.uint32:return t.calculateVarint32(r);case e.TYPES.sint32:return t.calculateVarint32(t.zigZagEncode32(r));case e.TYPES.fixed32:case e.TYPES.sfixed32:case e.TYPES.float:return 4;case e.TYPES.int64:case e.TYPES.uint64:return t.calculateVarint64(r);case e.TYPES.sint64:return t.calculateVarint64(t.zigZagEncode64(r));case e.TYPES.fixed64:case e.TYPES.sfixed64:return 8;case e.TYPES.bool:return 1;case e.TYPES.enum:return t.calculateVarint32(r);case e.TYPES.double:return 8;case e.TYPES.string:return i=t.calculateUTF8Bytes(r),t.calculateVarint32(i)+i;case e.TYPES.bytes:if(r.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+r.remaining()+" bytes remaining");return t.calculateVarint32(r.remaining())+r.remaining();case e.TYPES.message:return i=this.resolvedType.calculate(r),t.calculateVarint32(i)+i;case e.TYPES.group:return i=this.resolvedType.calculate(r),i+t.calculateVarint32(n<<3|e.WIRE_TYPES.ENDGROUP)}throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+r+" (unknown type)")},d.encodeValue=function(n,r,i){if(null===r)return i;switch(this.type){case e.TYPES.int32:r<0?i.writeVarint64(r):i.writeVarint32(r);break;case e.TYPES.uint32:i.writeVarint32(r);break;case e.TYPES.sint32:i.writeVarint32ZigZag(r);break;case e.TYPES.fixed32:i.writeUint32(r);break;case e.TYPES.sfixed32:i.writeInt32(r);break;case e.TYPES.int64:case e.TYPES.uint64:i.writeVarint64(r);break;case e.TYPES.sint64:i.writeVarint64ZigZag(r);break;case e.TYPES.fixed64:i.writeUint64(r);break;case e.TYPES.sfixed64:i.writeInt64(r);break;case e.TYPES.bool:"string"==typeof r?i.writeVarint32("false"===r.toLowerCase()?0:!!r):i.writeVarint32(r?1:0);break;case e.TYPES.enum:i.writeVarint32(r);break;case e.TYPES.float:i.writeFloat32(r);break;case e.TYPES.double:i.writeFloat64(r);break;case e.TYPES.string:i.writeVString(r);break;case e.TYPES.bytes:if(r.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+r.remaining()+" bytes remaining");var o=r.offset;i.writeVarint32(r.remaining()),i.append(r),r.offset=o;break;case e.TYPES.message:var s=(new t).LE();this.resolvedType.encode(r,s),i.writeVarint32(s.offset),i.append(s.flip());break;case e.TYPES.group:this.resolvedType.encode(r,i),i.writeVarint32(n<<3|e.WIRE_TYPES.ENDGROUP);break;default:throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+r+" (unknown type)")}return i},d.decode=function(t,n,r){if(n!=this.type.wireType)throw Error("Unexpected wire type for element");var i,o;switch(this.type){case e.TYPES.int32:return 0|t.readVarint32();case e.TYPES.uint32:return t.readVarint32()>>>0;case e.TYPES.sint32:return 0|t.readVarint32ZigZag();case e.TYPES.fixed32:return t.readUint32()>>>0;case e.TYPES.sfixed32:return 0|t.readInt32();case e.TYPES.int64:return t.readVarint64();case e.TYPES.uint64:return t.readVarint64().toUnsigned();case e.TYPES.sint64:return t.readVarint64ZigZag();case e.TYPES.fixed64:return t.readUint64();case e.TYPES.sfixed64:return t.readInt64();case e.TYPES.bool:return!!t.readVarint32();case e.TYPES.enum:return t.readVarint32();case e.TYPES.float:return t.readFloat();case e.TYPES.double:return t.readDouble();case e.TYPES.string:return t.readVString();case e.TYPES.bytes:if(o=t.readVarint32(),t.remaining()<o)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+o+" required but got only "+t.remaining());return i=t.clone(),i.limit=i.offset+o,t.offset+=o,i;case e.TYPES.message:return o=t.readVarint32(),this.resolvedType.decode(t,o);case e.TYPES.group:return this.resolvedType.decode(t,-1,r)}throw Error("[INTERNAL] Illegal decode type")},d.valueFromString=function(n){if(!this.isMapKey)throw Error("valueFromString() called on non-map-key element");switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:case e.TYPES.uint32:case e.TYPES.fixed32:return this.verifyValue(parseInt(n));case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:case e.TYPES.uint64:case e.TYPES.fixed64:return this.verifyValue(n);case e.TYPES.bool:return"true"===n;case e.TYPES.string:return this.verifyValue(n);case e.TYPES.bytes:return t.fromBinary(n)}},d.valueToString=function(t){if(!this.isMapKey)throw Error("valueToString() called on non-map-key element");return this.type===e.TYPES.bytes?t.toString("binary"):t.toString()},o.Element=f;var c=function(e,t,n,r,i,o){u.call(this,e,t,n,r,o),this.className="Message",this.extensions=void 0,this.clazz=null,this.isGroup=!!i,this._fields=null,this._fieldsById=null,this._fieldsByName=null},h=c.prototype=Object.create(u.prototype);h.build=function(n){if(this.clazz&&!n)return this.clazz;var r=function(e,n){function r(n,i,o,s){if(null===n||"object"!=typeof n){if(s&&s instanceof e.Reflect.Enum){var a=e.Reflect.Enum.getName(s.object,n);if(null!==a)return a}return n}if(t.isByteBuffer(n))return i?n.toBase64():n.toBuffer();if(e.Long.isLong(n))return o?n.toString():e.Long.fromValue(n);var u;if(Array.isArray(n))return u=[],n.forEach(function(e,t){u[t]=r(e,i,o,s)}),u;if(u={},n instanceof e.Map){for(var l=n.entries(),f=l.next();!f.done;f=l.next())u[n.keyElem.valueToString(f.value[0])]=r(f.value[1],i,o,n.valueElem.resolvedType);return u}var d=n.$type,c=void 0;for(var h in n)n.hasOwnProperty(h)&&(d&&(c=d.getChild(h))?u[h]=r(n[h],i,o,c.resolvedType):u[h]=r(n[h],i,o));return u}var i=n.getChildren(e.Reflect.Message.Field),o=n.getChildren(e.Reflect.Message.OneOf),s=function(r,a){e.Builder.Message.call(this);for(var u=0,l=o.length;u<l;++u)this[o[u].name]=null;for(u=0,l=i.length;u<l;++u){var f=i[u];this[f.name]=f.repeated?[]:f.map?new e.Map(f):null,!f.required&&"proto3"!==n.syntax||null===f.defaultValue||(this[f.name]=f.defaultValue)}if(arguments.length>0){var d;if(1!==arguments.length||null===r||"object"!=typeof r||!("function"!=typeof r.encode||r instanceof s)||Array.isArray(r)||r instanceof e.Map||t.isByteBuffer(r)||r instanceof ArrayBuffer||e.Long&&r instanceof e.Long)for(u=0,l=arguments.length;u<l;++u)"undefined"!=typeof(d=arguments[u])&&this.$set(i[u].name,d);else this.$set(r)}},a=s.prototype=Object.create(e.Builder.Message.prototype);a.add=function(t,r,i){var o=n._fieldsByName[t];if(!i){if(!o)throw Error(this+"#"+t+" is undefined");if(!(o instanceof e.Reflect.Message.Field))throw Error(this+"#"+t+" is not a field: "+o.toString(!0));if(!o.repeated)throw Error(this+"#"+t+" is not a repeated field");r=o.verifyValue(r,!0)}return null===this[t]&&(this[t]=[]),this[t].push(r),this},a.$add=a.add,a.set=function(t,r,i){if(t&&"object"==typeof t){i=r;for(var o in t)t.hasOwnProperty(o)&&"undefined"!=typeof(r=t[o])&&this.$set(o,r,i);return this}var s=n._fieldsByName[t];if(i)this[t]=r;else{if(!s)throw Error(this+"#"+t+" is not a field: undefined");if(!(s instanceof e.Reflect.Message.Field))throw Error(this+"#"+t+" is not a field: "+s.toString(!0));this[s.name]=r=s.verifyValue(r)}if(s&&s.oneof){var a=this[s.oneof.name];null!==r?(null!==a&&a!==s.name&&(this[a]=null),this[s.oneof.name]=s.name):a===t&&(this[s.oneof.name]=null)}return this},a.$set=a.set,a.get=function(t,r){if(r)return this[t];var i=n._fieldsByName[t];if(!(i&&i instanceof e.Reflect.Message.Field))throw Error(this+"#"+t+" is not a field: undefined");if(!(i instanceof e.Reflect.Message.Field))throw Error(this+"#"+t+" is not a field: "+i.toString(!0));return this[i.name]},a.$get=a.get;for(var u=0;u<i.length;u++){var l=i[u];l instanceof e.Reflect.Message.ExtensionField||n.builder.options.populateAccessors&&function(e){var t=e.originalName.replace(/(_[a-zA-Z])/g,function(e){return e.toUpperCase().replace("_","")});t=t.substring(0,1).toUpperCase()+t.substring(1);var r=e.originalName.replace(/([A-Z])/g,function(e){return"_"+e}),i=function(t,n){return this[e.name]=n?t:e.verifyValue(t),this},o=function(){return this[e.name]};null===n.getChild("set"+t)&&(a["set"+t]=i),null===n.getChild("set_"+r)&&(a["set_"+r]=i),null===n.getChild("get"+t)&&(a["get"+t]=o),null===n.getChild("get_"+r)&&(a["get_"+r]=o)}(l)}a.encode=function(e,r){"boolean"==typeof e&&(r=e,e=void 0);var i=!1;e||(e=new t,i=!0);var o=e.littleEndian;try{return n.encode(this,e.LE(),r),(i?e.flip():e).LE(o)}catch(t){throw e.LE(o),t}},s.encode=function(e,t,n){return new s(e).encode(t,n)},a.calculate=function(){return n.calculate(this)},a.encodeDelimited=function(e,r){var i=!1;e||(e=new t,i=!0);var o=(new t).LE();return n.encode(this,o,r).flip(),e.writeVarint32(o.remaining()),e.append(o),i?e.flip():e},a.encodeAB=function(){try{return this.encode().toArrayBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toArrayBuffer()),e}},a.toArrayBuffer=a.encodeAB,a.encodeNB=function(){try{return this.encode().toBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBuffer()),e}},a.toBuffer=a.encodeNB,a.encode64=function(){try{return this.encode().toBase64()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBase64()),e}},a.toBase64=a.encode64,a.encodeHex=function(){try{return this.encode().toHex()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toHex()),e}},a.toHex=a.encodeHex,a.toRaw=function(e,t){return r(this,!!e,!!t,this.$type)},a.encodeJSON=function(){return JSON.stringify(r(this,!0,!0,this.$type))},s.decode=function(e,r,i){"string"==typeof r&&(i=r,r=-1),"string"==typeof e&&(e=t.wrap(e,i?i:"base64")),e=t.isByteBuffer(e)?e:t.wrap(e);var o=e.littleEndian;try{var s=n.decode(e.LE());return e.LE(o),s}catch(t){throw e.LE(o),t}},s.decodeDelimited=function(e,r){if("string"==typeof e&&(e=t.wrap(e,r?r:"base64")),e=t.isByteBuffer(e)?e:t.wrap(e),e.remaining()<1)return null;var i=e.offset,o=e.readVarint32();if(e.remaining()<o)return e.offset=i,null;try{var s=n.decode(e.slice(e.offset,e.offset+o).LE());return e.offset+=o,s}catch(t){throw e.offset+=o,t}},s.decode64=function(e){return s.decode(e,"base64")},s.decodeHex=function(e){return s.decode(e,"hex")},s.decodeJSON=function(e){return new s(JSON.parse(e))},a.toString=function(){return n.toString()};return Object.defineProperty&&(Object.defineProperty(s,"$options",{value:n.buildOpt()}),Object.defineProperty(a,"$options",{value:s.$options}),Object.defineProperty(s,"$type",{value:n}),Object.defineProperty(a,"$type",{value:n})),s}(e,this);this._fields=[],this._fieldsById={},this._fieldsByName={};for(var i,o=0,s=this.children.length;o<s;o++)if(i=this.children[o],i instanceof y||i instanceof c||i instanceof T){if(r.hasOwnProperty(i.name))throw Error("Illegal reflect child of "+this.toString(!0)+": "+i.toString(!0)+" cannot override static property '"+i.name+"'");r[i.name]=i.build()}else if(i instanceof c.Field)i.build(),this._fields.push(i),this._fieldsById[i.id]=i,this._fieldsByName[i.name]=i;else if(!(i instanceof c.OneOf||i instanceof C))throw Error("Illegal reflect child of "+this.toString(!0)+": "+this.children[o].toString(!0));return this.clazz=r},h.encode=function(e,t,n){for(var r,i,o=null,s=0,a=this._fields.length;s<a;++s)r=this._fields[s],i=e[r.name],r.required&&null===i?null===o&&(o=r):r.encode(n?i:r.verifyValue(i),t,e);if(null!==o){var u=Error("Missing at least one required field for "+this.toString(!0)+": "+o);throw u.encoded=t,u}return t},h.calculate=function(e){for(var t,n,r=0,i=0,o=this._fields.length;i<o;++i){if(t=this._fields[i],n=e[t.name],t.required&&null===n)throw Error("Missing at least one required field for "+this.toString(!0)+": "+t);r+=t.calculate(n,e)}return r},h.decode=function(t,n,r){n="number"==typeof n?n:-1;for(var o,s,a,u,l=t.offset,f=new this.clazz;t.offset<l+n||n===-1&&t.remaining()>0;){if(o=t.readVarint32(),s=7&o,a=o>>>3,s===e.WIRE_TYPES.ENDGROUP){if(a!==r)throw Error("Illegal group end indicator for "+this.toString(!0)+": "+a+" ("+(r?r+" expected":"not a group")+")");break}if(u=this._fieldsById[a]){if(u.repeated&&!u.options.packed)f[u.name].push(u.decode(s,t));else if(u.map){var d=u.decode(s,t);f[u.name].set(d[0],d[1])}else if(f[u.name]=u.decode(s,t),u.oneof){var c=f[u.oneof.name];null!==c&&c!==u.name&&(f[c]=null),f[u.oneof.name]=u.name}}else switch(s){case e.WIRE_TYPES.VARINT:t.readVarint32();break;case e.WIRE_TYPES.BITS32:t.offset+=4;break;case e.WIRE_TYPES.BITS64:t.offset+=8;break;case e.WIRE_TYPES.LDELIM:var h=t.readVarint32();t.offset+=h;break;case e.WIRE_TYPES.STARTGROUP:for(;i(a,t););break;default:throw Error("Illegal wire type for unknown field "+a+" in "+this.toString(!0)+"#decode: "+s)}}for(var p=0,_=this._fields.length;p<_;++p)if(u=this._fields[p],null===f[u.name])if("proto3"===this.syntax)f[u.name]=u.defaultValue;else{if(u.required){var E=Error("Missing at least one required field for "+this.toString(!0)+": "+u.name);throw E.decoded=f,E}e.populateDefaults&&null!==u.defaultValue&&(f[u.name]=u.defaultValue)}return f},o.Message=c;var p=function(t,n,r,i,o,a,u,l,f,d){s.call(this,t,n,a),this.className="Message.Field",this.required="required"===r,this.repeated="repeated"===r,this.map="map"===r,this.keyType=i||null,this.type=o,this.resolvedType=null,this.id=u,this.options=l||{},this.defaultValue=null,this.oneof=f||null,this.syntax=d||"proto2",this.originalName=this.name,this.element=null,this.keyElement=null,!this.builder.options.convertFieldsToCamelCase||this instanceof c.ExtensionField||(this.name=e.Util.toCamelCase(this.name))},_=p.prototype=Object.create(s.prototype);_.build=function(){this.element=new f(this.type,this.resolvedType,!1,this.syntax),this.map&&(this.keyElement=new f(this.keyType,void 0,!0,this.syntax)),"proto3"!==this.syntax||this.repeated||this.map?"undefined"!=typeof this.options.default&&(this.defaultValue=this.verifyValue(this.options.default)):this.defaultValue=f.defaultFieldValue(this.type)},_.verifyValue=function(t,n){function r(e,t){throw Error("Illegal value for "+i.toString(!0)+" of type "+i.type.name+": "+e+" ("+t+")")}n=n||!1;var i=this;if(null===t)return this.required&&r(typeof t,"required"),"proto3"===this.syntax&&this.type!==e.TYPES.message&&r(typeof t,"proto3 field without field presence cannot be null"),null;var o;if(this.repeated&&!n){Array.isArray(t)||(t=[t]);var s=[];for(o=0;o<t.length;o++)s.push(this.element.verifyValue(t[o]));return s}return this.map&&!n?t instanceof e.Map?t:(t instanceof Object||r(typeof t,"expected ProtoBuf.Map or raw object for map field"),new e.Map(this,t)):(!this.repeated&&Array.isArray(t)&&r(typeof t,"no array expected"),this.element.verifyValue(t))},_.hasWirePresence=function(t,n){if("proto3"!==this.syntax)return null!==t;if(this.oneof&&n[this.oneof.name]===this.name)return!0;switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:case e.TYPES.uint32:case e.TYPES.fixed32:return 0!==t;case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:case e.TYPES.uint64:case e.TYPES.fixed64:return 0!==t.low||0!==t.high;case e.TYPES.bool:return t;case e.TYPES.float:case e.TYPES.double:return 0!==t;case e.TYPES.string:return t.length>0;case e.TYPES.bytes:return t.remaining()>0;case e.TYPES.enum:return 0!==t;case e.TYPES.message:return null!==t;default:return!0}},_.encode=function(n,r,i){if(null===this.type||"object"!=typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===n||this.repeated&&0==n.length)return r;try{if(this.repeated){var o;if(this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){r.writeVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),r.ensureCapacity(r.offset+=1);var s=r.offset;for(o=0;o<n.length;o++)this.element.encodeValue(this.id,n[o],r);var a=r.offset-s,u=t.calculateVarint32(a);if(u>1){var l=r.slice(s,r.offset);s+=u-1,r.offset=s,r.append(l)}r.writeVarint32(a,s-u)}else for(o=0;o<n.length;o++)r.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,n[o],r)}else this.map?n.forEach(function(n,i,o){var s=t.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,i)+t.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,n);r.writeVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),r.writeVarint32(s),r.writeVarint32(8|this.keyType.wireType),this.keyElement.encodeValue(1,i,r),r.writeVarint32(16|this.type.wireType),this.element.encodeValue(2,n,r)},this):this.hasWirePresence(n,i)&&(r.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,n,r))}catch(e){throw Error("Illegal value for "+this.toString(!0)+": "+n+" ("+e+")")}return r},_.calculate=function(n,r){if(n=this.verifyValue(n),null===this.type||"object"!=typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===n||this.repeated&&0==n.length)return 0;var i=0;try{if(this.repeated){var o,s;if(this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){for(i+=t.calculateVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),s=0,o=0;o<n.length;o++)s+=this.element.calculateLength(this.id,n[o]);i+=t.calculateVarint32(s),i+=s}else for(o=0;o<n.length;o++)i+=t.calculateVarint32(this.id<<3|this.type.wireType),i+=this.element.calculateLength(this.id,n[o])}else this.map?n.forEach(function(n,r,o){var s=t.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,r)+t.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,n);i+=t.calculateVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),i+=t.calculateVarint32(s),i+=s},this):this.hasWirePresence(n,r)&&(i+=t.calculateVarint32(this.id<<3|this.type.wireType),i+=this.element.calculateLength(this.id,n))}catch(e){throw Error("Illegal value for "+this.toString(!0)+": "+n+" ("+e+")")}return i},_.decode=function(t,n,r){var i,o,s=!this.map&&t==this.type.wireType||!r&&this.repeated&&this.options.packed&&t==e.WIRE_TYPES.LDELIM||this.map&&t==e.WIRE_TYPES.LDELIM;if(!s)throw Error("Illegal wire type for field "+this.toString(!0)+": "+t+" ("+this.type.wireType+" expected)");if(t==e.WIRE_TYPES.LDELIM&&this.repeated&&this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0&&!r){o=n.readVarint32(),o=n.offset+o;for(var a=[];n.offset<o;)a.push(this.decode(this.type.wireType,n,!0));return a}if(this.map){var u=f.defaultFieldValue(this.keyType);if(i=f.defaultFieldValue(this.type),o=n.readVarint32(),n.remaining()<o)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+o+" required but got only "+n.remaining());var l=n.clone();for(l.limit=l.offset+o,n.offset+=o;l.remaining()>0;){var d=l.readVarint32();t=7&d;var c=d>>>3;if(1===c)u=this.keyElement.decode(l,t,c);else{if(2!==c)throw Error("Unexpected tag in map field key/value submessage");i=this.element.decode(l,t,c)}}return[u,i]}return this.element.decode(n,t,this.id)},o.Message.Field=p;var E=function(e,t,n,r,i,o,s){p.call(this,e,t,n,null,r,i,o,s),this.extension};E.prototype=Object.create(p.prototype),o.Message.ExtensionField=E;var g=function(e,t,n){s.call(this,e,t,n),this.fields=[]};o.Message.OneOf=g;var y=function(e,t,n,r,i){u.call(this,e,t,n,r,i),this.className="Enum",this.object=null};y.getName=function(e,t){for(var n,r=Object.keys(e),i=0;i<r.length;++i)if(e[n=r[i]]===t)return n;return null};var R=y.prototype=Object.create(u.prototype);R.build=function(t){if(this.object&&!t)return this.object;for(var n=new e.Builder.Enum,r=this.getChildren(y.Value),i=0,o=r.length;i<o;++i)n[r[i].name]=r[i].id;return Object.defineProperty&&Object.defineProperty(n,"$options",{value:this.buildOpt(),enumerable:!1}),this.object=n},o.Enum=y;var m=function(e,t,n,r){s.call(this,e,t,n),this.className="Enum.Value",this.id=r};m.prototype=Object.create(s.prototype),o.Enum.Value=m;var C=function(e,t,n,r){s.call(this,e,t,n),this.field=r};C.prototype=Object.create(s.prototype),o.Extension=C;var T=function(e,t,n,r){u.call(this,e,t,n,r),this.className="Service",this.clazz=null},v=T.prototype=Object.create(u.prototype);v.build=function(n){return this.clazz&&!n?this.clazz:this.clazz=function(e,n){for(var r=function(t){e.Builder.Service.call(this),this.rpcImpl=t||function(e,t,n){setTimeout(n.bind(this,Error("Not implemented, see: https://github.com/dcodeIO/ProtoBuf.js/wiki/Services")),0)}},i=r.prototype=Object.create(e.Builder.Service.prototype),o=n.getChildren(e.Reflect.Service.RPCMethod),s=0;s<o.length;s++)!function(e){i[e.name]=function(r,i){try{try{r=e.resolvedRequestType.clazz.decode(t.wrap(r))}catch(e){if(!(e instanceof TypeError))throw e}if(null===r||"object"!=typeof r)throw Error("Illegal arguments");r instanceof e.resolvedRequestType.clazz||(r=new e.resolvedRequestType.clazz(r)),this.rpcImpl(e.fqn(),r,function(t,r){if(t)return void i(t);null===r&&(r="");try{r=e.resolvedResponseType.clazz.decode(r)}catch(e){}return r&&r instanceof e.resolvedResponseType.clazz?void i(null,r):void i(Error("Illegal response type received in service method "+n.name+"#"+e.name))})}catch(e){setTimeout(i.bind(this,e),0)}},r[e.name]=function(t,n,i){new r(t)[e.name](n,i)},Object.defineProperty&&(Object.defineProperty(r[e.name],"$options",{value:e.buildOpt()}),Object.defineProperty(i[e.name],"$options",{value:r[e.name].$options}))}(o[s]);return Object.defineProperty&&(Object.defineProperty(r,"$options",{value:n.buildOpt()}),Object.defineProperty(i,"$options",{value:r.$options}),Object.defineProperty(r,"$type",{value:n}),Object.defineProperty(i,"$type",{value:n})),r}(e,this)},o.Service=T;var S=function(e,t,n,r){s.call(this,e,t,n),this.className="Service.Method",this.options=r||{}},A=S.prototype=Object.create(s.prototype);A.buildOpt=l.buildOpt,o.Service.Method=S;var I=function(e,t,n,r,i,o,s,a){S.call(this,e,t,n,a),this.className="Service.RPCMethod",this.requestName=r,this.responseName=i,this.requestStream=o,this.responseStream=s,this.resolvedRequestType=null,this.resolvedResponseType=null};return I.prototype=Object.create(S.prototype),o.Service.RPCMethod=I,o}(i),i.Builder=function(e,t,r){function i(e){e.messages&&e.messages.forEach(function(t){t.syntax=e.syntax,i(t)}),e.enums&&e.enums.forEach(function(t){t.syntax=e.syntax})}var o=function(e){this.ns=new r.Namespace(this,null,""),this.ptr=this.ns,this.resolved=!1,this.result=null,this.files={},this.importRoot=null,this.options=e||{}},s=o.prototype;return o.isMessage=function(e){return"string"==typeof e.name&&("undefined"==typeof e.values&&"undefined"==typeof e.rpc);
},o.isMessageField=function(e){return"string"==typeof e.rule&&"string"==typeof e.name&&"string"==typeof e.type&&"undefined"!=typeof e.id},o.isEnum=function(e){return"string"==typeof e.name&&!("undefined"==typeof e.values||!Array.isArray(e.values)||0===e.values.length)},o.isService=function(e){return!("string"!=typeof e.name||"object"!=typeof e.rpc||!e.rpc)},o.isExtend=function(e){return"string"==typeof e.ref},s.reset=function(){return this.ptr=this.ns,this},s.define=function(e){if("string"!=typeof e||!t.TYPEREF.test(e))throw Error("illegal namespace: "+e);return e.split(".").forEach(function(e){var t=this.ptr.getChild(e);null===t&&this.ptr.addChild(t=new r.Namespace(this,this.ptr,e)),this.ptr=t},this),this},s.create=function(t){if(!t)return this;if(Array.isArray(t)){if(0===t.length)return this;t=t.slice()}else t=[t];for(var n=[t];n.length>0;){if(t=n.pop(),!Array.isArray(t))throw Error("not a valid namespace: "+JSON.stringify(t));for(;t.length>0;){var i=t.shift();if(o.isMessage(i)){var s=new r.Message(this,this.ptr,i.name,i.options,i.isGroup,i.syntax),a={};i.oneofs&&Object.keys(i.oneofs).forEach(function(e){s.addChild(a[e]=new r.Message.OneOf(this,s,e))},this),i.fields&&i.fields.forEach(function(e){if(null!==s.getChild(0|e.id))throw Error("duplicate or invalid field id in "+s.name+": "+e.id);if(e.options&&"object"!=typeof e.options)throw Error("illegal field options in "+s.name+"#"+e.name);var t=null;if("string"==typeof e.oneof&&!(t=a[e.oneof]))throw Error("illegal oneof in "+s.name+"#"+e.name+": "+e.oneof);e=new r.Message.Field(this,s,e.rule,e.keytype,e.type,e.name,e.id,e.options,t,i.syntax),t&&t.fields.push(e),s.addChild(e)},this);var u=[];if(i.enums&&i.enums.forEach(function(e){u.push(e)}),i.messages&&i.messages.forEach(function(e){u.push(e)}),i.services&&i.services.forEach(function(e){u.push(e)}),i.extensions&&("number"==typeof i.extensions[0]?s.extensions=[i.extensions]:s.extensions=i.extensions),this.ptr.addChild(s),u.length>0){n.push(t),t=u,u=null,this.ptr=s,s=null;continue}u=null}else if(o.isEnum(i))s=new r.Enum(this,this.ptr,i.name,i.options,i.syntax),i.values.forEach(function(e){s.addChild(new r.Enum.Value(this,s,e.name,e.id))},this),this.ptr.addChild(s);else if(o.isService(i))s=new r.Service(this,this.ptr,i.name,i.options),Object.keys(i.rpc).forEach(function(e){var t=i.rpc[e];s.addChild(new r.Service.RPCMethod(this,s,e,t.request,t.response,!!t.request_stream,!!t.response_stream,t.options))},this),this.ptr.addChild(s);else{if(!o.isExtend(i))throw Error("not a valid definition: "+JSON.stringify(i));if(s=this.ptr.resolve(i.ref,!0))i.fields.forEach(function(t){if(null!==s.getChild(0|t.id))throw Error("duplicate extended field id in "+s.name+": "+t.id);if(s.extensions){var n=!1;if(s.extensions.forEach(function(e){t.id>=e[0]&&t.id<=e[1]&&(n=!0)}),!n)throw Error("illegal extended field id in "+s.name+": "+t.id+" (not within valid ranges)")}var i=t.name;this.options.convertFieldsToCamelCase&&(i=e.Util.toCamelCase(i));var o=new r.Message.ExtensionField(this,s,t.rule,t.type,this.ptr.fqn()+"."+i,t.id,t.options),a=new r.Extension(this,this.ptr,t.name,o);o.extension=a,this.ptr.addChild(a),s.addChild(o)},this);else if(!/\.?google\.protobuf\./.test(i.ref))throw Error("extended message "+i.ref+" is not defined")}i=null,s=null}t=null,this.ptr=this.ptr.parent}return this.resolved=!1,this.result=null,this},s.import=function(t,r){var o="/";if("string"==typeof r){if(e.Util.IS_NODE&&(r=n(27).resolve(r)),this.files[r]===!0)return this.reset();this.files[r]=!0}else if("object"==typeof r){var s=r.root;e.Util.IS_NODE&&(s=n(27).resolve(s)),(s.indexOf("\\")>=0||r.file.indexOf("\\")>=0)&&(o="\\");var a=s+o+r.file;if(this.files[a]===!0)return this.reset();this.files[a]=!0}if(t.imports&&t.imports.length>0){var u,l=!1;"object"==typeof r?(this.importRoot=r.root,l=!0,u=this.importRoot,r=r.file,(u.indexOf("\\")>=0||r.indexOf("\\")>=0)&&(o="\\")):"string"==typeof r?this.importRoot?u=this.importRoot:r.indexOf("/")>=0?(u=r.replace(/\/[^\/]*$/,""),""===u&&(u="/")):r.indexOf("\\")>=0?(u=r.replace(/\\[^\\]*$/,""),o="\\"):u=".":u=null;for(var f=0;f<t.imports.length;f++)if("string"==typeof t.imports[f]){if(!u)throw Error("cannot determine import root");var d=t.imports[f];if("google/protobuf/descriptor.proto"===d)continue;if(d=u+o+d,this.files[d]===!0)continue;/\.proto$/i.test(d)&&!e.DotProto&&(d=d.replace(/\.proto$/,".json"));var c=e.Util.fetch(d);if(null===c)throw Error("failed to import '"+d+"' in '"+r+"': file not found");/\.json$/i.test(d)?this.import(JSON.parse(c+""),d):this.import(e.DotProto.Parser.parse(c),d)}else r?/\.(\w+)$/.test(r)?this.import(t.imports[f],r.replace(/^(.+)\.(\w+)$/,function(e,t,n){return t+"_import"+f+"."+n})):this.import(t.imports[f],r+"_import"+f):this.import(t.imports[f]);l&&(this.importRoot=null)}t.package&&this.define(t.package),t.syntax&&i(t);var h=this.ptr;return t.options&&Object.keys(t.options).forEach(function(e){h.options[e]=t.options[e]}),t.messages&&(this.create(t.messages),this.ptr=h),t.enums&&(this.create(t.enums),this.ptr=h),t.services&&(this.create(t.services),this.ptr=h),t.extends&&this.create(t.extends),this.reset()},s.resolveAll=function(){var n;if(null==this.ptr||"object"==typeof this.ptr.type)return this;if(this.ptr instanceof r.Namespace)this.ptr.children.forEach(function(e){this.ptr=e,this.resolveAll()},this);else if(this.ptr instanceof r.Message.Field){if(t.TYPE.test(this.ptr.type))this.ptr.type=e.TYPES[this.ptr.type];else{if(!t.TYPEREF.test(this.ptr.type))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(n=(this.ptr instanceof r.Message.ExtensionField?this.ptr.extension.parent:this.ptr.parent).resolve(this.ptr.type,!0),!n)throw Error("unresolvable type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(this.ptr.resolvedType=n,n instanceof r.Enum){if(this.ptr.type=e.TYPES.enum,"proto3"===this.ptr.syntax&&"proto3"!==n.syntax)throw Error("proto3 message cannot reference proto2 enum")}else{if(!(n instanceof r.Message))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);this.ptr.type=n.isGroup?e.TYPES.group:e.TYPES.message}}if(this.ptr.map){if(!t.TYPE.test(this.ptr.keyType))throw Error("illegal key type for map field in "+this.ptr.toString(!0)+": "+this.ptr.keyType);this.ptr.keyType=e.TYPES[this.ptr.keyType]}}else if(this.ptr instanceof e.Reflect.Service.Method){if(!(this.ptr instanceof e.Reflect.Service.RPCMethod))throw Error("illegal service type in "+this.ptr.toString(!0));if(n=this.ptr.parent.resolve(this.ptr.requestName,!0),!(n&&n instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.requestName);if(this.ptr.resolvedRequestType=n,n=this.ptr.parent.resolve(this.ptr.responseName,!0),!(n&&n instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.responseName);this.ptr.resolvedResponseType=n}else if(!(this.ptr instanceof e.Reflect.Message.OneOf||this.ptr instanceof e.Reflect.Extension||this.ptr instanceof e.Reflect.Enum.Value))throw Error("illegal object in namespace: "+typeof this.ptr+": "+this.ptr);return this.reset()},s.build=function(e){if(this.reset(),this.resolved||(this.resolveAll(),this.resolved=!0,this.result=null),null===this.result&&(this.result=this.ns.build()),!e)return this.result;for(var t="string"==typeof e?e.split("."):e,n=this.result,r=0;r<t.length;r++){if(!n[t[r]]){n=null;break}n=n[t[r]]}return n},s.lookup=function(e,t){return e?this.ns.resolve(e,t):this.ns},s.toString=function(){return"Builder"},o.Message=function(){},o.Enum=function(){},o.Service=function(){},o}(i,i.Lang,i.Reflect),i.Map=function(e,t){function n(e){var t=0;return{next:function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}}var r=function(e,n){if(!e.map)throw Error("field is not a map");if(this.field=e,this.keyElem=new t.Element(e.keyType,null,!0,e.syntax),this.valueElem=new t.Element(e.type,e.resolvedType,!1,e.syntax),this.map={},Object.defineProperty(this,"size",{get:function(){return Object.keys(this.map).length}}),n)for(var r=Object.keys(n),i=0;i<r.length;i++){var o=this.keyElem.valueFromString(r[i]),s=this.valueElem.verifyValue(n[r[i]]);this.map[this.keyElem.valueToString(o)]={key:o,value:s}}},i=r.prototype;return i.clear=function(){this.map={}},i.delete=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e)),n=t in this.map;return delete this.map[t],n},i.entries=function(){for(var e,t=[],r=Object.keys(this.map),i=0;i<r.length;i++)t.push([(e=this.map[r[i]]).key,e.value]);return n(t)},i.keys=function(){for(var e=[],t=Object.keys(this.map),r=0;r<t.length;r++)e.push(this.map[t[r]].key);return n(e)},i.values=function(){for(var e=[],t=Object.keys(this.map),r=0;r<t.length;r++)e.push(this.map[t[r]].value);return n(e)},i.forEach=function(e,t){for(var n,r=Object.keys(this.map),i=0;i<r.length;i++)e.call(t,(n=this.map[r[i]]).value,n.key,this)},i.set=function(e,t){var n=this.keyElem.verifyValue(e),r=this.valueElem.verifyValue(t);return this.map[this.keyElem.valueToString(n)]={key:n,value:r},this},i.get=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e));if(t in this.map)return this.map[t].value},i.has=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e));return t in this.map},r}(i,i.Reflect),i.loadProto=function(e,t,n){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(n=t,t=void 0),i.loadJson(i.DotProto.Parser.parse(e),t,n)},i.protoFromString=i.loadProto,i.loadProtoFile=function(e,t,n){if(t&&"object"==typeof t?(n=t,t=null):t&&"function"==typeof t||(t=null),t)return i.Util.fetch("string"==typeof e?e:e.root+"/"+e.file,function(r){if(null===r)return void t(Error("Failed to fetch file"));try{t(null,i.loadProto(r,n,e))}catch(e){t(e)}});var r=i.Util.fetch("object"==typeof e?e.root+"/"+e.file:e);return null===r?null:i.loadProto(r,n,e)},i.protoFromFile=i.loadProtoFile,i.newBuilder=function(e){return e=e||{},"undefined"==typeof e.convertFieldsToCamelCase&&(e.convertFieldsToCamelCase=i.convertFieldsToCamelCase),"undefined"==typeof e.populateAccessors&&(e.populateAccessors=i.populateAccessors),new i.Builder(e)},i.loadJson=function(e,t,n){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(n=t,t=null),t&&"object"==typeof t||(t=i.newBuilder()),"string"==typeof e&&(e=JSON.parse(e)),t.import(e,n),t.resolveAll(),t},i.loadJsonFile=function(e,t,n){if(t&&"object"==typeof t?(n=t,t=null):t&&"function"==typeof t||(t=null),t)return i.Util.fetch("string"==typeof e?e:e.root+"/"+e.file,function(r){if(null===r)return void t(Error("Failed to fetch file"));try{t(null,i.loadJson(JSON.parse(r),n,e))}catch(e){t(e)}});var r=i.Util.fetch("object"==typeof e?e.root+"/"+e.file:e);return null===r?null:i.loadJson(JSON.parse(r),n,e)},i})}).call(t,n(19),n(9)(e))},function(e,t){String.prototype.codePointAt||!function(){"use strict";var e=function(){try{var e={},t=Object.defineProperty,n=t(e,e,e)&&t}catch(e){}return n}(),t=function(e){if(null==this)throw TypeError();var t=String(this),n=t.length,r=e?Number(e):0;if(r!=r&&(r=0),!(r<0||r>=n)){var i,o=t.charCodeAt(r);return o>=55296&&o<=56319&&n>r+1&&(i=t.charCodeAt(r+1),i>=56320&&i<=57343)?1024*(o-55296)+i-56320+65536:o}};e?e(String.prototype,"codePointAt",{value:t,configurable:!0,writable:!0}):String.prototype.codePointAt=t}()},function(e,t){!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function r(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return _.iterable&&(t[Symbol.iterator]=function(){return t}),t}function i(e){this.map={},e instanceof i?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function o(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function s(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function a(e){var t=new FileReader;return t.readAsArrayBuffer(e),s(t)}function u(e){var t=new FileReader;return t.readAsText(e),s(t)}function l(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(_.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(_.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(e){if(!_.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},_.blob?(this.blob=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(a)},this.text=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=o(this);return e?e:Promise.resolve(this._bodyText)},_.formData&&(this.formData=function(){return this.text().then(c)}),this.json=function(){return this.text().then(JSON.parse)},this}function f(e){var t=e.toUpperCase();return E.indexOf(t)>-1?t:e}function d(e,t){t=t||{};var n=t.body;if(d.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new i(t.headers)),this.method=f(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function c(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function h(e){var t=new i,n=(e.getAllResponseHeaders()||"").trim().split("\n");return n.forEach(function(e){var n=e.trim().split(":"),r=n.shift().trim(),i=n.join(":").trim();t.append(r,i)}),t}function p(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof i?t.headers:new i(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var _={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};i.prototype.append=function(e,r){e=t(e),r=n(r);var i=this.map[e];i||(i=[],this.map[e]=i),i.push(r)},i.prototype.delete=function(e){delete this.map[t(e)]},i.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},i.prototype.getAll=function(e){return this.map[t(e)]||[]},i.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},i.prototype.set=function(e,r){this.map[t(e)]=[n(r)]},i.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){e.call(t,r,n,this)},this)},this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},_.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var E=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this)},l.call(d.prototype),l.call(p.prototype),p.prototype.clone=function(){return new p(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},p.error=function(){var e=new p(null,{status:0,statusText:""});return e.type="error",e};var g=[301,302,303,307,308];p.redirect=function(e,t){if(g.indexOf(t)===-1)throw new RangeError("Invalid status code");return new p(null,{status:t,headers:{location:e}})},e.Headers=i,e.Request=d,e.Response=p,e.fetch=function(e,t){return new Promise(function(n,r){function i(){return"responseURL"in s?s.responseURL:/^X-Request-URL:/m.test(s.getAllResponseHeaders())?s.getResponseHeader("X-Request-URL"):void 0}var o;o=d.prototype.isPrototypeOf(e)&&!t?e:new d(e,t);var s=new XMLHttpRequest;s.onload=function(){var e={status:s.status,statusText:s.statusText,headers:h(s),url:i()},t="response"in s?s.response:s.responseText;n(new p(t,e))},s.onerror=function(){r(new TypeError("Network request failed"))},s.ontimeout=function(){r(new TypeError("Network request failed"))},s.open(o.method,o.url,!0),"include"===o.credentials&&(s.withCredentials=!0),"responseType"in s&&_.blob&&(s.responseType="blob"),o.headers.forEach(function(e,t){s.setRequestHeader(t,e)}),s.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},27,27]))});