diff --git a/lib/direct-node.min.js b/lib/direct-node.min.js index 8ab8ed9..aee0f66 100755 --- a/lib/direct-node.min.js +++ b/lib/direct-node.min.js @@ -1 +1 @@ -!function(e,t){"use strict";function s(){return Fa.__string_rec(this,"")}var n={};function i(e,t){function n(){}n.prototype=e;var i=new n;for(var r in t)i[r]=t[r];return t.toString!==Object.prototype.toString&&(i.toString=t.toString),i}var r=e.DirectAPI=function(){this.eventEmitter=new o,require("unorm")};(n.DirectAPI=r).__name__=["DirectAPI"],r.getInstance=function(){return null==r.instance&&(r.instance=new r),r.instance},r.main=function(){},r.prototype={setOptions:function(e){null!=e&&(ro.host=e.host,ro.endpoint=e.endpoint,ro.accessToken=e.access_token,ro.proxyURL=e.proxyURL,ro.account=e.account,ro.talkWithBot=e.talkWithBot,ro.acceptableEventTimeDiff=e.acceptableEventTimeDiff,ro.name=e.name,ro.storagePath=e.storage_path,ro.storageQuota=e.storage_quota,ro.wsConfig=e.ws_config),Fi._d("["+qe.dateStr(new Date)+"] ","current settings",ro,"","",""),null==ro.accessToken&&Fi._e("["+qe.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},announce:function(e,t){var n,i=e.room;if(null!=i){var r,a=i.split("_");if(2=e.length);){if(!this.matchSub(e,n)){i+=K.string(qe.substr(e,n,null));break}var r=this.matchedPos();if(i+=K.string(qe.substr(e,n,r.pos-n)),i+=K.string(t(this)),n=0==r.len?(i+=K.string(qe.substr(e,r.pos,1)),r.pos+1):r.pos+r.len,!this.r.global)break}return!this.r.global&&0r.interval)r.basetime=n,r.count=1;else{if(!(0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},W.startsWith=function(e,t){return e.length>=t.length&&qe.substr(e,0,t.length)==t},W.isSpace=function(e,t){var n=qe.cca(e,t);return 8>>=4););if(null!=t)for(;n.lengthn;){var t=qe.substr(e,0,n);i.push(t),e=qe.substr(e,n,null)}0n&&(t(r),r=""),0>>16,l=65535&n.low,u=n.low>>>16,c=sa._mul(o,l),_=sa._mul(s,l),h=sa._mul(o,u),d=c,f=(sa._mul(s,u)+(h>>>16)|0)+(_>>>16)|0;if(d=d+(h<<=16)|0,sa.ucompare(d,h)<0){f++;f|=0}if(d=d+(_<<=16)|0,sa.ucompare(d,_)<0){f++;f|=0}f=f+(sa._mul(t.low,n.high)+sa._mul(t.high,n.low)|0)|0;var m=new Hn(f,d),p=new Hn(0,K.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(sa.ucompare(v,m.low)<0){g++;g|=0}t=new Hn(g,v)}return t},Je.getHigh=function(e){return e.high},Je.getLow=function(e){return e.low},Je.idStr=function(e){return"_"+e.high+"_"+e.low},Je.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new Hn(K.parseInt(t.matched(1)),K.parseInt(t.matched(2))):null},Je.toStr=function(e){return la.toString(e)},Je.isNeg=function(e){return e.high<0},Je.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(sa.ucompare(i,e.low)<0){n++;n|=0}return new Hn(n,i)},Je.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(sa.ucompare(e.low,t.low)<0){n--;n|=0}return new Hn(n,i)},Je.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:sa.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},Je.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Je.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Je.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},Je.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},Je.eqArray=function(e,t){if(e!=t){if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0,i=e.length;n>31,t);return e.filter(function(e){var t=Ze.map(n.userPresences.getUserPresence(e),function(e){return e.isExpired(i,r)});switch(t[1]){case 0:return t[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){var n=t.splice(0,100);0!=n.length&&this.api.getPresences(e,n),0!=t.length&&this.updateIfNeedPerSub(e,t)},__class__:Te});var Ie=function(){U.call(this)};(n["albero.command.UrlCommand"]=Ie).__name__=["albero","command","UrlCommand"],Ie.__super__=U,Ie.prototype=i(U.prototype,{execute:function(e){var t=e.getBody();switch(t[1]){case 0:var n=t[2];this.routing.forward(n);break;case 1:var i=t[2];this.routing.redirect(i);break;case 2:this.routing.back()}},__class__:Ie});var Ee=n["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};Ee.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=Ee,t.toString=s,t},Ee.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=Ee,t.toString=s,t},Ee.BACK=["BACK",2],Ee.BACK.toString=s,(Ee.BACK.__enum__=Ee).__empty_constructs__=[Ee.BACK];function Ne(e,t,n){this.email=e,this.pass=t,this.accessToken=n}(n["albero.entity.Account"]=Ne).__name__=["albero","entity","Account"],Ne.prototype={__class__:Ne};function et(e){null!=e&&(this.id=e.id,this.group=new Ae(e.group),this.profilePolicy=new be(e.profile_policy))}(n["albero.entity.AccountControlGroup"]=et).__name__=["albero","entity","AccountControlGroup"],et.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:et};var Ae=function(e){null!=e&&(this.name=e.name,this.alias=e.alias,this.ownerName=e.owner_name,this.version=e.version)};(n["albero.entity.AccountControlGroupGroup"]=Ae).__name__=["albero","entity","AccountControlGroupGroup"],Ae.prototype={__class__:Ae};var be=function(e){null!=e&&(this.allowUpdateDisplayName=e.allow_update_display_name,this.allowUpdateProfileImage=e.allow_update_profile_image,this.version=e.version)};(n["albero.entity.AccountControlGroupProfilePolicy"]=be).__name__=["albero","entity","AccountControlGroupProfilePolicy"],be.prototype={__class__:be};function tt(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new Ae(e.group)),null!=e.profile_policy&&(this.profilePolicy=new be(e.profile_policy)))}(n["albero.entity.AccountControlGroupPartialUpdate"]=tt).__name__=["albero","entity","AccountControlGroupPartialUpdate"],tt.prototype={__class__:tt};function nt(e){null!=e&&(this.id=Je.fromIntOrInt64(e.id),this.groupName=e.group_name,this.groupOwnerName=e.group_owner_name,this.groupOwnerEmail=e.group_owner_email,this.hasDomainInvite=e.has_domain_invite,this.updatedAt=e.updated_at,this.version=e.version)}(n["albero.entity.AccountControlRequest"]=nt).__name__=["albero","entity","AccountControlRequest"],nt.prototype={__class__:nt};var De=n["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};De.ng=["ng",0],De.ng.toString=s,(De.ng.__enum__=De).ok=["ok",1],De.ok.toString=s,(De.ok.__enum__=De).image=["image",2],De.image.toString=s,(De.image.__enum__=De).imageOrVideo=["imageOrVideo",3],De.imageOrVideo.toString=s,(De.imageOrVideo.__enum__=De).imageOrVideoOrAudio=["imageOrVideoOrAudio",4],De.imageOrVideoOrAudio.toString=s,(De.imageOrVideoOrAudio.__enum__=De).other=["other",5],De.other.toString=s,(De.other.__enum__=De).__empty_constructs__=[De.ng,De.ok,De.image,De.imageOrVideo,De.imageOrVideoOrAudio,De.other];function ke(e){this.value=e}(n["albero.entity.AllowAttachmentType"]=ke).__name__=["albero","entity","AllowAttachmentType"],ke.fromInt=function(e){if(null==e)return new ke(De.other);var t;if(null==e)t=De.other;else switch(e){case 0:t=De.ng;break;case 1:t=De.ok;break;case 2:t=De.image;break;case 3:t=De.imageOrVideo;break;case 4:t=De.imageOrVideoOrAudio;break;default:t=De.other}return new ke(t)},ke.fromValue=function(e){return new ke(e)},ke.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),0>t,e.high<<32-t|e.low>>>t):new Hn(e.high>>31,e.high>>t-32):new Hn(e.high,e.low)},It.subTimestampPart=function(e,t){var n=It.timestamp(e),i=It.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(sa.ucompare(n.low,i.low)<0){r--;r|=0}return new Hn(r,a)},It.createForTest=function(e){var t=It.TIMESTAMP_SHIFT;return 0!=(t&=63)?t<32?new Hn(e.high<>>32-t,e.low<this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,Ri.localize("MessageStringMaker.achieve"),Ri.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?Ri.localize("MessageStringMaker.achieve"):Ri.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForBookmarkWithEllipsis:function(){var e=this.messageStringForBookmark();return e.length<100?e:e.substring(0,99)+"…"},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&0>>16,s=65535&t.low,l=t.low>>>16,u=sa._mul(a,s),c=sa._mul(o,s),_=sa._mul(a,l),h=u,d=(sa._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,sa.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,sa.ucompare(h,c)<0){d++;d|=0}d=d+(sa._mul(e.low,t.high)+sa._mul(e.high,t.low)|0)|0;var f=new Hn(d,h),m=new Hn(0,K.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,g=f.low+m.low|0;if(sa.ucompare(g,f.low)<0){p++;p|=0}e=new Hn(p,g)}return e},__class__:dn};function fn(e,t,n){this.stampsetId=e,this.id=t,this.illust=n}(n["albero.entity.OriginalStamp"]=fn).__name__=["albero","entity","OriginalStamp"],fn.__interfaces__=[hn],fn.fromJson=function(e){if(null==e.originalStamp)return null;var t=e.originalStamp;if(null==t.stampsetIdStr||null==t.stampIdStr)return null;var n=Je.makeFromIdStr(t.stampsetIdStr),i=Je.makeFromIdStr(t.stampIdStr);return new fn(n,i,t.illust)},fn.fromPropsAndStampsetId=function(e,t){return new fn(t,Je.fromIntOrInt64(e.id),e.illust)},fn.createKey=function(e){return"original__"+e.high+"_"+e.low},fn.prototype={getImageUrl:function(){return this.illust},getKey:function(){return fn.createKey(this.id)},toJson:function(){var e=this.stampsetId,t=this.id;return{originalStamp:{stampsetIdStr:"_"+e.high+"_"+e.low,stampIdStr:"_"+t.high+"_"+t.low,illust:this.illust}}},createMessage:function(e,t){var n=new Ct;return n.talkId=e,n.type=Ot.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:fn};function mn(e,t,n,i){this.stampsetType=e,this.name=t,this.icon=n,this.version=i,this.stamps=[]}(n["albero.entity.Stampset"]=mn).__name__=["albero","entity","Stampset"],mn.historyStampset=function(){return new mn(yn.getHistoryStampsetType(),"stamp-history",null,0)},mn.commonStampset=function(e,t,n){return new mn(yn.fromCommonStampCategoryIndex(e),t,"./images/stamp/3/"+n,0)},mn.originalStampset=function(e){var t=Je.fromIntOrInt64(e.stampset_id),n=yn.fromStampsetId(t),i=new mn(n,e.name,e.icon,e.version);if(null!=e.stamps){var r=Fa.__cast(e.stamps,Array).map(function(e){return fn.fromPropsAndStampsetId(e,t)});i.setStamps(r)}return i},mn.fromStampsetInfo=function(e){var t=yn.fromStampsetId(e.stampsetId);return new mn(t,e.name,e.icon,e.version)},mn.prototype={toTabId:function(){return this.stampsetType.toTabId()},getIconUrl:function(){return this.icon},isStampHistory:function(){return"stamp-history"==this.name},isOriginalStampset:function(){return this.stampsetType.isOriginalStampset()},isEmpty:function(){return 0==this.stamps.length},setStamps:function(e){this.stamps=e},getStamps:function(){return this.stamps},isOlderThan:function(e){return this.versione.version},__class__:pn};var gn=function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(Je.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))};(n["albero.entity.StampsetSetting"]=gn).__name__=["albero","entity","StampsetSetting"],gn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new pn(e)})},isForwardForbidden:function(e){var t=e.getContentsForOriginalStamp(),n=null==t?null:t.stampsetId;return null!=n&&!this.containSendableStampset(n)},containSendableStampset:function(t){return null!=this.allowCreateMessageStampsetIds&&Qe.exists(this.allowCreateMessageStampsetIds,function(e){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})},containVisibleStampset:function(n){return Qe.exists(this.stampsetInfos,function(e){var t=e.stampsetId;return null!=n&&null!=t&&n.high==t.high&&n.low==t.low})},getSendableStampsetInfos:function(){var t=this;return null==this.stampsetInfos?[]:null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(e){return t.containSendableStampset(e.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(t){this.stampsetInfos=this.stampsetInfos.map(function(e){return t.eqStampsetId(e)&&t.isNewerThan(e)?t:e})},deleteStampsetInfo:function(n){this.stampsetInfos=this.stampsetInfos.filter(function(e){var t=e.stampsetId;return!(null!=t&&null!=n&&t.high==n.high&&t.low==n.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(e){return!(null!=e&&null!=n&&e.high==n.high&&e.low==n.low)})},getStampsetIdsDiff:function(e){for(var t=new Ta,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i=Hi.HIRAGANA_SMALL_A&&o<=Hi.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(Hi.KATAKANA_SMALL_A-Hi.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},Hi.katakanaToRoman=function(e){return(new Ci).convert(e)},Hi.normalize=function(e){return new ji(null).normalize(e)},Hi.normalizeForFile=function(e){return new ji(null).normalizeForFile(e)},Hi.asyncAssureNormalize=function(){return Promise.resolve()},Hi.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var ji=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=ji).__name__=["albero","js","Normalizer"],ji.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof Ra&&(e=e.val),Fi._e("["+qe.dateStr(new Date)+"] ","invalid character:",e,"","",""),Ri.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof Ra&&(e=e.val),Fi._e("["+qe.dateStr(new Date)+"] ","invalid character:",e,"","",""),Ri.localize("TextCanonicalizer.invalid")}},__class__:ji};function Yi(e){var t=this,n=ro.wsConfig,i=require("websocket").client;this.ws=new i(n),this.ws.on("connectFailed",io(this,this.onError)),this.ws.on("connect",function(e){(t.connection=e).on("error",io(t,t.onError)),e.on("close",io(t,t.onConnectionClose)),e.on("message",io(t,t.onMessage)),e.on("pong",io(t,t.onPong)),t.onOpen(null)});var r=null;null!=ro.proxyURL&&(r={agent:Li.createAgent(ro.proxyURL)}),this.ws.connect(e,null,null,null,r)}(n["albero.js.WebSocket"]=Yi).__name__=["albero","js","WebSocket"],Yi.prototype={onOpen:function(e){Fi._i("["+qe.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=Ia.ofData(e.binaryData),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){Fi._e("["+qe.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){null!=this.ws&&(this.ws.removeAllListeners(),this.ws=null),null!=this.connection&&(this.connection.removeAllListeners(),this.connection=null);var t="WebSocket closed. "+K.string(e.code)+" "+K.string(e.reason)+" "+K.string(e.wasClean);Fi._i("["+qe.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},onConnectionClose:function(e,t){this.onClose({code:e,reason:t})},close:function(){if(!this.isClosed()){var e=this.connection;this.onConnectionClose(1e3,"Normal connection closure"),e.close()}},send:function(e){this.isClosed()||this.connection.sendBytes(new Ha(e.b.bufferValue))},ping:function(e){this.connection.ping(e)},isClosed:function(){return null==this.ws||null==this.connection||!this.connection.connected},__class__:Yi};function Gi(){}(n["puremvc.interfaces.IProxy"]=Gi).__name__=["puremvc","interfaces","IProxy"],Gi.prototype={__class__:Gi};function zi(){}(n["albero.proxy.AccessTokenResolverProxy"]=zi).__name__=["albero","proxy","AccessTokenResolverProxy"],zi.__interfaces__=[Gi],zi.prototype={__class__:zi};var Ki=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=Ki).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Ki.newInstance=function(){return new Vi("accessTokenResolver")};var Wi=function(e,t){R.call(this),this.proxyName=null!=e?e:Wi.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=Wi).__name__=["puremvc","patterns","proxy","Proxy"],Wi.__interfaces__=[Gi],Wi.__super__=R,Wi.prototype=i(R.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:Wi});var Vi=function(e){Wi.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJsHubot"]=Vi).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJsHubot"],Vi.__interfaces__=[zi],Vi.__super__=Wi,Vi.prototype=i(Wi.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=ro.account?ro.account.split(":"):null;null==i||2!=i.length?null!=(e=null==e?this.accountLoader.load():e)&&(null!=e.accessToken?(this.settings.setAccessToken(e.accessToken),t(e.accessToken)):this.api.createAccessToken(e.email,e.pass,t)):this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:Vi});function qi(){}(n["albero.proxy.AccountLoaderProxy"]=qi).__name__=["albero","proxy","AccountLoaderProxy"],qi.__interfaces__=[Gi],qi.prototype={__class__:qi};var Qi=function(){};(n["albero.proxy.AccountLoaderProxyFactory"]=Qi).__name__=["albero","proxy","AccountLoaderProxyFactory"],Qi.newInstance=function(){var e=ee.resolveClass("albero.debug.proxy.AccountLoaderProxyImpl");return null!=e?ee.createInstance(e,["accountLoader"]):new Ji("accountLoader")};var Ji=function(e){Wi.call(this,e)};(n["albero.proxy.AccountLoaderProxyForHubot"]=Ji).__name__=["albero","proxy","AccountLoaderProxyForHubot"],Ji.__interfaces__=[qi],Ji.__super__=Wi,Ji.prototype=i(Wi.prototype,{load:function(){var i=this,t=require("read");return t({prompt:"Email: "},function(e,n){t({prompt:"Password: ",silent:!0},function(e,t){i.sendNotification("SignIn",new Ne(n,t))})}),null},__class__:Ji});var Xi=function(){Wi.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=Xi).__name__=["albero","proxy","AlberoBroadcastProxy"],Xi.__super__=Wi,Xi.prototype=i(Wi.prototype,{handleNotification:function(n,e,i){var r=this;switch(Fi._d("["+qe.dateStr(new Date)+"] ","Receive request from server. name:",n," body:",e,""),n){case"notify_add_account_control_request":var t=new nt(e);this.dataStore.setAccountControlRequest(t),this.sendNotification(n,t),i();break;case"notify_add_acquaintance":var a=this.dataFactory.newAcquaintance(e[1]);this.sendNotification(n,a),i();break;case"notify_add_acquaintances":for(var o=e[1].map(io(to=this.dataFactory,to.newAcquaintance)),s=0;st.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null!=t&&null!=t.maxMessage){var n=t.maxMessage.id,i=e.messageId;null!=n&&null!=i&&n.high==i.high&&n.low==i.low&&(t.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(t))}},updateTalkStatusByTalkPushNotificationEvent:function(e,t){var n=this.dataStore.getTalkStatus(t.talkId);if(null==n){var i=this.dataStore.getTalk(t.talkId);if(null==i)return void Fi._e("["+qe.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new On).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Wt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new On).id=e.id),null==t.talkOrderingTimestamp&&(t.talkOrderingTimestamp=e.updatedAt),this.dataStore.setTalkStatus(t),t},newTalkStatusByMessage:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t&&((t=new On).id=e.talkId),Mn.isNewMax(t,e.id)&&(t.maxMessageId=e.id,t.maxMessage=e),e.isUnreadCountTarget){var n,i=this.dataStore,r=e.userId;if(null!=i.me){var a=i.me.id;n=null!=a&&null!=r&&a.high==r.high&&a.low==r.low}else n=!1;t.applyNewMessage(e,n)}return this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&(Mn.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),Mn.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=Ot.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var i=this;if(!Qe.exists(e.readUserIds,function(e){var t=i.dataStore;if(null==t.me)return!1;var n=t.me.id;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}))return null;var t=this.dataStore.getTalkStatus(e.talkId);if(null==t)return Fi._e("["+qe.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null;for(var n=e.messageIds[0],r=0,a=e.messageIds;r=i.length)){var e=i[r],t=n.id,o=this.dataFactory.newDummyMessage(t,e.type,e.content);this.sendNotification("create_message_start",o),this.apiCaller.call("create_message",[t,Ct.enumIndex(e.type),e.content],function(e){var t=a.dataFactory.newMessage(e);a.sendNotification("create_message_complete",[t,o.id]),a.forwardMessages(n,i,r+1)},function(e){if(a.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=wr.toLocalError(bt.SendingMessageConflicted,e);a.sendNotification("error_occurred",t)}else a.sendNotification("error_occurred",e)})}},deleteMessage:function(n,i){var r=this;this.apiCaller.call("delete_message",[n,i],function(e){var t=new Mt;t.talkId=n,t.messageId=i,r.sendNotification("notify_delete_message",t)},function(e){if(null!=e){if(403==e.code&&"frozen domain"==e.message)return void r.sendNotification("error_occurred",e);if(409==e.code&&"conflict"==e.message){var t=wr.toLocalError(bt.DeletingMessageConflicted,e);return void r.sendNotification("error_occurred",t)}r.sendNotification("error_occurred",e)}})},updateReadStatuses:function(r,a){var o=this;this.apiCaller.callApiReliable("update_read_statuses",[r,a],function(e){var t,n=o.dataStore.getTalkStatus(r);if(null!=n){var i=n.maxReadMessageId;t=null!=i&&null!=a&&i.high==a.high&&i.low==a.low}else t=!1;t&&o.sendNotification("notify_update_local_talk_status",n)},null,function(e){return 429==e.code&&"too many requests"==e.message?Sa.Some(1e3*o.asInt(e.detail.retry_after)):Sa.None})},upload:function(e,t,n,i){var r=this,a=this.dataFactory.newDummyFileMessage(t,n);this.sendNotification("create_message_start",a);var o=this.prepareMessageFileAsync(n,e);o.then(function(e){r.createMessageReliable(t,Ot.file,e,a,i)}),o.catch(function(e){r.sendNotification("create_message_fail",[e,a],i)})},uploadForHubot:function(e,t,n){var i=this.dataStore.getTalk(e);if(null==i){var r=this.dataFactory.newDummyFileMessage(e,t),a={code:400,message:"invalid talk_id (deleted talk)"};return Fi._w("["+qe.dateStr(new Date)+"] ","WARNING method: upload",a,"","",""),void this.sendNotification("create_message_fail",[a,r],n)}this.upload(i.domainId,i.id,t,n)},uploadMulti:function(n,i,r,a,o){var s=this,l=this.dataFactory.newDummyMultipleFileMessage(i,r,a);this.sendNotification("create_message_start",l);for(var e=Promise.resolve([]),t=0;te.version)return r;var a=this.accountControlRequests;return null!=_o[n]?a.setReserved(n,e):a.h[n]=e,this.storage.setDirtyFlag(),e},removeAccountControlRequest:function(e){var t="_"+e.high+"_"+e.low;this.accountControlRequests.remove(t),this.storage.setDirtyFlag()},removeAccountControlRequests:function(){this.accountControlRequests=new Ta,this.storage.setDirtyFlag()},getAccountControlGroup:function(){return this.accountControlGroup},setAccountControlGroup:function(e){return this.accountControlGroup=e,this.storage.setDirtyFlag(),this.accountControlGroup},updateAccountControlGroup:function(e){if(null!=this.accountControlGroup){var t=this.accountControlGroup.id,n=e.id;if(null!=t&&null!=n&&t.high==n.high&&t.low==n.low){var i=e.group;null!=i&&this.accountControlGroup.group.version>31,e);return I.createByteSizeStringWithUnit(t)},lr.convertUploadableFile=function(e){var t=!1,n=e.name;b.isEmpty(n)&&(n="clipboard_"+S.getDateStringForFile()+".png",t=!0);var i=lr.getContentTypeByFileName(n,e.type);return i!=e.type&&(t=!0),t?{name:n,type:i,file:n,blob:e,size:e.size}:e},lr.getBlobFromUpdatableFile=function(e){return null==e.blob?e:e.blob},lr.getContentTypeByFileName=function(e,t){if(b.isNotEmpty(t))return"csv"==lr.getExtension(e)?"text/csv":t;switch(lr.getExtension(e)){case"csv":return"text/csv";case"doc":return"application/msword";case"docm":return"application/vnd.ms-word.document.macroenabled.12";case"docx":return"application/vnd.openxmlformats-officedocument.wordprocessingml.document";case"gif":return"image/gif";case"htm":case"html":return"text/html";case"jpeg":case"jpg":return"image/jpeg";case"md":return"text/markdown";case"pdf":return"application/pdf";case"png":return"image/png";case"ppt":return"application/vnd.ms-powerpoint";case"pptm":return"application/vnd.ms-powerpoint.presentation.macroenabled.12";case"pptx":return"application/vnd.openxmlformats-officedocument.presentationml.presentation";case"txt":return"text/plain";case"xls":return"application/vnd.ms-excel";case"xlsb":return"application/vnd.ms-excel.sheet.binary.macroenabled.12";case"xlsm":return"application/vnd.ms-excel.sheet.macroenabled.12";case"xlsx":return"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";case"xml":return"text/xml";default:return"application/octet-stream"}},lr.getExtension=function(e){if(null==e)return"";var t=e.split("."),n=t.length;return 0==n?"":t[n-1]},lr.__super__=Wi,lr.prototype=i(Wi.prototype,{getValidHost:function(){return"https://"+ro.host},downloadUrl:function(e,t){if(null==t&&(t=!1),null==e||0==e.length)return"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(W.startsWith(e,this.validHost)){var n=this.settings.getAccessToken(),i=e;return-1!=e.indexOf("?")?i+="&":i+="?",i+="Authorization=ALB%20"+n,t&&(i+="&download=true"),i}return e},download:function(e,i,r){var a=this;if(e=this.downloadUrl(e),W.startsWith(e,"data:"))r(null,new Error("download URL was not resolved"));else{var t=Ba.parse(e);null!=ro.proxyURL&&(t.agent=Li.createAgent(ro.proxyURL));var n=Ua.request(t,function(e){var t=e.headers.location;if(null==t)if(2==Math.floor(e.statusCode/100)){var n=xa.createWriteStream(i);e.on("data",function(e){n.write(e)}),e.on("end",function(){n.end(),n.on("finish",function(){r(i,null)})}),e.on("error",function(e){r(null,e)}),n.on("error",function(e){r(null,e)})}else r(null,new Error("HTTP request failed ("+e.statusCode+" "+e.statusMessage+")"));else a.download(t,i,r)});n.on("error",function(e){r(null,e)}),n.end()}},upload:function(e,t,n){return this.uploadForNodeJS(e,t,n)},uploadForNodeJS:function(e,t,r){var a=Ba.parse(e.put_url);a.method="PUT";a.headers={},a.headers["Content-Length"]=""+r.size;var n=e.post_form;return a.headers["Content-Type"]=n["Content-Type"],a.headers["Content-Disposition"]=n["Content-Disposition"],null!=ro.proxyURL&&(a.agent=Li.createAgent(ro.proxyURL)),new Promise(function(n,i){var t=Ua.request(a,function(e){if(2!=Math.floor(e.statusCode/100)){var t="";return e.on("data",function(e){t+=e}),void e.on("end",function(){i(e.statusCode+": "+t)})}Pi.resolveVoid(n)});t.on("error",function(e){i(e.message)});var e=xa.createReadStream(r.path);e.on("data",function(e){t.write(e)}),e.on("end",function(){t.end()}),e.on("error",function(){t.end()})})},createDummyFile:function(e,t,n){var i=W.replace(e,"/","\\").split("\\");if(0==i.length)return null;var r=i[i.length-1];if(null!=t&&(r=t),0==r.length)return null;var a=lr.getContentTypeByFileName(r,n);return{name:r,size:0|xa.statSync(e).size,type:a,path:e}},asyncCreateThumbnail:function(e){return Promise.reject(null)},__class__:lr});var ur=function(){Wi.call(this,"keywordWatcher")};(n["albero.proxy.KeywordWatcherProxy"]=ur).__name__=["albero","proxy","KeywordWatcherProxy"],ur.__super__=Wi,ur.prototype=i(Wi.prototype,{onMessageCreated:function(e){if(null!=e){var t,n=Ze.map(Ze.option(this.dataStore.getTalk(e.talkId)),function(e){return e.domainId});switch(n[1]){case 0:t=n[2];break;case 1:t=this.settings.getSelectedDomainId()}if(this.features.canDetectKeyword(t)){var i;if(this.settings.getBrowserSettings().keywordWatchingSelfMessage)i=!1;else{var r=this.dataStore,a=e.userId;if(null!=r.me){var o=r.me.id;i=null!=o&&null!=a&&o.high==a.high&&o.low==a.low}else i=!1}if(!i){var s=e.messageStringForKeywordDetection(this.settings.getBrowserSettings().keywordWatchingActionReply);this.detectKeyword(s,e.type,e.id,t,e.talkId)}}}},onAnnouncementCreated:function(e){if(null!=e&&this.features.canDetectKeyword(e.domainId)){var t=Ct.getDisplayTextWithoutEscape(e.type,e.content);this.detectKeyword(t,e.type,e.id,e.domainId,null)}},detectKeyword:function(s,l,u,c,_){var h=this;this.reserveOnNormalizedKeywordPrepared(function(e){for(var t=W.htmlEscape(s,!0),n=e.keys();n.hasNext();){var i=n.next(),r=e.get(i);if(null!=r&&0!=r.length&&dr.match(l,i))for(var a=0;a>>31,t.low<<1);if(63,u=new Hn(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new Hn(0,0);if(u.high==h.high&&u.low==h.low)break;var d=sa.ucompare(n.high,t.high);if(0<=(0!=d?d:sa.ucompare(n.low,t.low))){l=new Hn(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(sa.ucompare(n.low,t.low)<0){f--;f|=0}n=new Hn(f,m)}63,u=new Hn(u.high>>>1,u.high<<31|u.low>>>1);63,t=new Hn(t.high>>>1,t.high<<31|t.low>>>1)}if(i){var p=~l.high,g=-l.low;if(0==g){p++;p|=0}l=new Hn(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new Hn(v,y)}return{quotient:l,modulus:n}};var ua=function(){};(n["haxe.Int64Helper"]=ua).__name__=["haxe","Int64Helper"],ua.parseString=function(e){var t=new Hn(0,10),n=new Hn(0,0),i=new Hn(0,1),r=!1,a=W.trim(e);"-"==a.charAt(0)&&(r=!0,a=a.substring(1,a.length));for(var o=a.length,s=0,l=o;s>31,c);if(r){var h=65535&i.low,d=i.low>>>16,f=65535&_.low,m=_.low>>>16,p=sa._mul(h,f),g=sa._mul(d,f),v=sa._mul(h,m),y=p,S=(sa._mul(d,m)+(v>>>16)|0)+(g>>>16)|0;if(y=y+(v<<=16)|0,sa.ucompare(y,v)<0){S++;S|=0}if(y=y+(g<<=16)|0,sa.ucompare(y,g)<0){S++;S|=0}S=S+(sa._mul(i.low,_.high)+sa._mul(i.high,_.low)|0)|0;var w=new Hn(S,y),T=n.high-w.high|0,I=n.low-w.low|0;if(sa.ucompare(n.low,w.low)<0){T--;T|=0}if(!((n=new Hn(T,I)).high<0))throw new Ra("NumberFormatError: Underflow")}else{var E=65535&i.low,N=i.low>>>16,A=65535&_.low,b=_.low>>>16,D=sa._mul(E,A),k=sa._mul(N,A),C=sa._mul(E,b),O=D,M=(sa._mul(N,b)+(C>>>16)|0)+(k>>>16)|0;if(O=O+(C<<=16)|0,sa.ucompare(O,C)<0){M++;M|=0}if(O=O+(k<<=16)|0,sa.ucompare(O,k)<0){M++;M|=0}M=M+(sa._mul(i.low,_.high)+sa._mul(i.high,_.low)|0)|0;var R=new Hn(M,O),F=n.high+R.high|0,x=n.low+R.low|0;if(sa.ucompare(x,n.low)<0){F++;F|=0}if((n=new Hn(F,x)).high<0)throw new Ra("NumberFormatError: Overflow")}var U=65535&i.low,P=i.low>>>16,L=65535&t.low,B=t.low>>>16,H=sa._mul(U,L),j=sa._mul(P,L),Y=sa._mul(U,B),G=H,z=(sa._mul(P,B)+(Y>>>16)|0)+(j>>>16)|0;if(G=G+(Y<<=16)|0,sa.ucompare(G,Y)<0){z++;z|=0}if(G=G+(j<<=16)|0,sa.ucompare(G,j)<0){z++;z|=0}z=z+(sa._mul(i.low,t.high)+sa._mul(i.high,t.low)|0)|0,i=new Hn(z,G)}return n};var ca=function(){this.buf=new T,this.cache=[],this.useCache=ca.USE_CACHE,this.useEnumIndex=ca.USE_ENUM_INDEX,this.shash=new Ta,this.scount=0};(n["haxe.Serializer"]=ca).__name__=["haxe","Serializer"],ca.run=function(e){var t=new ca;return t.serialize(e),t.toString()},ca.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=_o[e]?t.getReserved(e):t.h[e];if(null!=n)return this.buf.b+="R",void(this.buf.b+=null==n?"null":""+n);var i=this.shash,r=this.scount++;null!=_o[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=K.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n>2]),this.buf.b+=String.fromCharCode(b[63&(M<<4|R>>4)]),this.buf.b+=String.fromCharCode(b[63&(R<<2|F>>6)]),this.buf.b+=String.fromCharCode(b[63&F])}if(N==A){var x=E.b[N++],U=E.b[N++];this.buf.b+=String.fromCharCode(b[x>>2]),this.buf.b+=String.fromCharCode(b[63&(x<<4|U>>4)]),this.buf.b+=String.fromCharCode(b[U<<2&63])}else if(N==1+A){var P=E.b[N++];this.buf.b+=String.fromCharCode(b[P>>2]),this.buf.b+=String.fromCharCode(b[P<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var L=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=K.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=K.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=K.string(B-2);for(var H=2,j=B;H=this.length)throw new Ra("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new Ra("Invalid object key");var n=this.unserialize();e[t]=n}this.pos++},unserializeEnum:function(e,t){if(58!=this.buf.charCodeAt(this.pos++))throw new Ra("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new Ra("Invalid string reference");return this.scache[u];case 97:this.buf;var c=[];for(this.cache.push(c);;){var _=this.buf.charCodeAt(this.pos);if(104==_){this.pos++;break}if(117==_){this.pos++;var h=this.readDigits();c[c.length+h-1]=null}else c.push(this.unserialize())}return c;case 98:var d=new Ta;this.cache.push(d);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=_o[f]?d.setReserved(f,m):d.h[f]=m}return this.pos++,d;case 99:var p=this.unserialize(),g=this.resolver.resolveClass(p);if(null==g)throw new Ra("Class not found "+p);var v=ee.createEmptyInstance(g);return this.cache.push(v),this.unserializeObject(v),v;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:var y=this.unserialize(),S=this.resolver.resolveEnum(y);if(null==S)throw new Ra("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new Ra("Unknown enum index "+y+"@"+w);var I=this.unserializeEnum(S,T);return this.cache.push(I),I;case 107:return NaN;case 108:var E=new $;this.cache.push(E);for(this.buf;104!=this.buf.charCodeAt(this.pos);)E.add(this.unserialize());return this.pos++,E;case 109:return-1/0;case 110:return null;case 111:var N={};return this.cache.push(N),this.unserializeObject(N),N;case 112:return 1/0;case 113:var A=new va;this.cache.push(A);this.buf;for(var b=this.buf.charCodeAt(this.pos++);58==b;){var D=this.readDigits(),k=this.unserialize();A.h[D]=k,b=this.buf.charCodeAt(this.pos++)}if(104!=b)throw new Ra("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new Ra("Invalid reference");return this.cache[C];case 115:var O=this.readDigits(),M=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(2<=x?x-1:0))),L=0;F>4);var j=R[M.charCodeAt(F++)];P.b[L++]=255&(H<<4|j>>2);var Y=R[M.charCodeAt(F++)];P.b[L++]=255&(j<<6|Y)}if(2<=x){var G=R[M.charCodeAt(F++)],z=R[M.charCodeAt(F++)];if(P.b[L++]=255&(G<<2|z>>4),3==x){var K=R[M.charCodeAt(F++)];P.b[L++]=255&(z<<4|K>>2)}}return this.pos+=O,this.cache.push(P),P;case 116:return!0;case 118:var W;if(48<=this.buf.charCodeAt(this.pos)&&this.buf.charCodeAt(this.pos)<=57&&48<=this.buf.charCodeAt(this.pos+1)&&this.buf.charCodeAt(this.pos+1)<=57&&48<=this.buf.charCodeAt(this.pos+2)&&this.buf.charCodeAt(this.pos+2)<=57&&48<=this.buf.charCodeAt(this.pos+3)&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4))W=qe.strDate(qe.substr(this.buf,this.pos,19)),this.pos+=19;else{var V=this.readFloat();W=new Date(V)}return this.cache.push(W),W;case 119:var q=this.unserialize(),Q=this.resolver.resolveEnum(q);if(null==Q)throw new Ra("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw Ra.wrap(this.unserialize());case 121:var X=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos=(null==s?0:s._height)?new ma(e.left,e.key,e.value,new ma(e.right,t,n,i)):new ma(new ma(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new ma(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new ma(new ma(e,t,n,i.left),i.key,i.value,i.right):new ma(new ma(e,t,n,i.left.left),i.left.key,i.left.value,new ma(i.left.right,i.key,i.value,i.right))}return new ma(e,t,n,i,(a(null==s?0:s._height)){var l=this.left;a=null==l?0:l._height}else{var u=this.right;a=null==u?0:u._height}this._height=a+1}else this._height=r};(n["haxe.ds.TreeNode"]=ma).__name__=["haxe","ds","TreeNode"],ma.prototype={__class__:ma};var pa=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};pa.Left=function(e){var t=["Left",0,e];return t.__enum__=pa,t.toString=s,t},pa.Right=function(e){var t=["Right",1,e];return t.__enum__=pa,t.toString=s,t},pa.__empty_constructs__=[];var ga=function(){fa.call(this)};(n["haxe.ds.EnumValueMap"]=ga).__name__=["haxe","ds","EnumValueMap"],ga.__interfaces__=[oa],ga.__super__=fa,ga.prototype=i(fa.prototype,{compare:function(e,t){var n=e[1]-t[1];if(0!=n)return n;var i=e.slice(2),r=t.slice(2);return 0==i.length&&0==r.length?0:this.compareArgs(i,r)},compareArgs:function(e,t){var n=e.length-t.length;if(0!=n)return n;for(var i=0,r=e.length;i>6):(i<=65535?t.push(224|i>>12):(t.push(240|i>>18),t.push(128|i>>12&63)),t.push(128|i>>6&63)),t.push(128|63&i))}return new Ia(new Uint8Array(t).buffer)},Ia.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Ia(e)},Ia.fastGet=function(e,t){return e.bytes[t]},Ia.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new Ra(Ca.OutsideBounds);for(var n="",i=this.b,r=String.fromCharCode,a=e,o=e+t;a>10)),n+=r(1023&l|56320)}}return n},toString:function(){return this.getString(0,this.length)},__class__:Ia};function Ea(){this.b=[]}(n["haxe.io.BytesBuffer"]=Ea).__name__=["haxe","io","BytesBuffer"],Ea.prototype={getBytes:function(){var e=new Ia(new Uint8Array(this.b).buffer);return this.b=null,e},__class__:Ea};function Na(){}(n["haxe.io.Input"]=Na).__name__=["haxe","io","Input"],Na.prototype={readByte:function(){throw new Ra("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new Ra(Ca.OutsideBounds);try{for(;0e.length)throw new Ra(Ca.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=Aa).__name__=["haxe","io","BytesInput"],Aa.__super__=Na,Aa.prototype=i(Na.prototype,{readByte:function(){if(0==this.len)throw new Ra(new ka);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new Ra(Ca.OutsideBounds);if(0==this.len&&0e.length)throw new Ra(Ca.OutsideBounds);for(var i=e.b,r=n;0>8),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8))},writeInt32:function(e){this.bigEndian?(this.writeByte(e>>>24),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8&255),this.writeByte(e>>16&255),this.writeByte(e>>>24))},__class__:ba};function Da(){this.b=new Ea}(n["haxe.io.BytesOutput"]=Da).__name__=["haxe","io","BytesOutput"],Da.__super__=ba,Da.prototype=i(ba.prototype,{writeByte:function(e){this.b.b.push(e)},writeBytes:function(e,t,n){var i=this.b;if(t<0||n<0||t+n>e.length)throw new Ra(Ca.OutsideBounds);i.b;for(var r=e.b,a=t,o=t+n;a>>23&255,n=8388607&e;return 0==n&&0==t?0:(1-(e>>>31<<1))*(1+Math.pow(2,-23)*n)*Math.pow(2,t-127)},Oa.floatToI32=function(e){if(0==e)return 0;var t=e<0?-e:e,n=Math.floor(Math.log(t)/.6931471805599453);n<-127?n=-127:128>20&2047)-1023,i=4294967296*(1048575&t)+2147483648*(e>>>31)+(2147483647&e);return 0==i&&-1023==n?0:(1-(t>>>31<<1))*(1+Math.pow(2,-52)*i)*Math.pow(2,n)},Oa.doubleToI64=function(e){var t=Oa.i64tmp;if(0==e)t.low=0,t.high=0;else if(isFinite(e)){var n=e<0?-e:e,i=Math.floor(Math.log(n)/.6931471805599453),r=Math.round(4503599627370496*(n/Math.pow(2,i)-1)),a=0|r,o=r/4294967296|0;t.low=a,t.high=(e<0?-2147483648:0)|i+1023<<20|o}else 0";var n=typeof e;switch("function"==n&&(e.__name__||e.__ename__)&&(n="object"),n){case"function":return"";case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];var i=e[0]+"(";t+="\t";for(var r=2,a=e.length;r>>16)<<16|0)|0},ca.USE_CACHE=!1,ca.USE_ENUM_INDEX=!1,ca.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",da.DEFAULT_RESOLVER=new ha,da.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",ya.count=0,Oa.i64tmp=new Hn(0,0),Fa.__toStr={}.toString,Ya.FLOAT_SINGLE_MIN=1401298464324817e-60,Ya.FLOAT_SINGLE_MAX=34028234663852886e22,Ya.FLOAT_DOUBLE_MIN=5e-324,Ya.FLOAT_DOUBLE_MAX=17976931348623157e292,r.main()}("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this); \ No newline at end of file +!function(e,t){"use strict";function s(){return Va.__string_rec(this,"")}var n={};function i(e,t){function n(){}n.prototype=e;var i=new n;for(var r in t)i[r]=t[r];return t.toString!==Object.prototype.toString&&(i.toString=t.toString),i}var r=e.DirectAPI=function(){this.eventEmitter=new o,require("unorm")};(n.DirectAPI=r).__name__=["DirectAPI"],r.getInstance=function(){return null==r.instance&&(r.instance=new r),r.instance},r.main=function(){},r.prototype={setOptions:function(e){null!=e&&(Eo.host=e.host,Eo.endpoint=e.endpoint,Eo.accessToken=e.access_token,Eo.proxyURL=e.proxyURL,Eo.account=e.account,Eo.talkWithBot=e.talkWithBot,Eo.acceptableEventTimeDiff=e.acceptableEventTimeDiff,Eo.name=e.name,Eo.storagePath=e.storage_path,Eo.storageQuota=e.storage_quota,Eo.wsConfig=e.ws_config),Gi._d("["+$e.dateStr(new Date)+"] ","current settings",Eo,"","",""),null==Eo.accessToken&&Gi._e("["+$e.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},announce:function(e,t){var n,i=e.room;if(null!=i){var r,a=i.split("_");if(2=e.length);){if(!this.matchSub(e,n)){i+=K.string($e.substr(e,n,null));break}var r=this.matchedPos();if(i+=K.string($e.substr(e,n,r.pos-n)),i+=K.string(t(this)),n=0==r.len?(i+=K.string($e.substr(e,r.pos,1)),r.pos+1):r.pos+r.len,!this.r.global)break}return!this.r.global&&0r.interval)r.basetime=n,r.count=1;else{if(!(0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},W.startsWith=function(e,t){return e.length>=t.length&&$e.substr(e,0,t.length)==t},W.isSpace=function(e,t){var n=$e.cca(e,t);return 8>>=4););if(null!=t)for(;n.lengthn;){var t=$e.substr(e,0,n);i.push(t),e=$e.substr(e,n,null)}0n&&(t(r),r=""),0>>16,l=65535&n.low,u=n.low>>>16,c=Sa._mul(o,l),_=Sa._mul(s,l),h=Sa._mul(o,u),d=c,f=(Sa._mul(s,u)+(h>>>16)|0)+(_>>>16)|0;if(d=d+(h<<=16)|0,Sa.ucompare(d,h)<0){f++;f|=0}if(d=d+(_<<=16)|0,Sa.ucompare(d,_)<0){f++;f|=0}f=f+(Sa._mul(t.low,n.high)+Sa._mul(t.high,n.low)|0)|0;var m=new Kn(f,d),p=new Kn(0,K.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(Sa.ucompare(v,m.low)<0){g++;g|=0}t=new Kn(g,v)}return t},tt.getHigh=function(e){return e.high},tt.getLow=function(e){return e.low},tt.idStr=function(e){return"_"+e.high+"_"+e.low},tt.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new Kn(K.parseInt(t.matched(1)),K.parseInt(t.matched(2))):null},tt.fromNullableIdStr=function(e){return null!=e?tt.makeFromIdStr(e):null},tt.toStr=function(e){return wa.toString(e)},tt.isNeg=function(e){return e.high<0},tt.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(Sa.ucompare(i,e.low)<0){n++;n|=0}return new Kn(n,i)},tt.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(Sa.ucompare(e.low,t.low)<0){n--;n|=0}return new Kn(n,i)},tt.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:Sa.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},tt.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},tt.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},tt.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},tt.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},tt.eqArray=function(e,t){if(e!=t){if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0,i=e.length;n>31,t);return e.filter(function(e){var t=it.map(n.userPresences.getUserPresence(e),function(e){return e.isExpired(i,r)});switch(t[1]){case 0:return t[2];case 1:return!0}})},updateIfNeedPerSub:function(n,e){for(var i=this,t=Promise.resolve([]),r=tt.splitUsingMaxCount(e,100),a=0;a>t,e.high<<32-t|e.low>>>t):new Kn(e.high>>31,e.high>>t-32):new Kn(e.high,e.low)},bt.subTimestampPart=function(e,t){var n=bt.timestamp(e),i=bt.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(Sa.ucompare(n.low,i.low)<0){r--;r|=0}return new Kn(r,a)},bt.createForTest=function(e){var t=bt.TIMESTAMP_SHIFT;return 0!=(t&=63)?t<32?new Kn(e.high<>>32-t,e.low<this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,Yi.localize("MessageStringMaker.achieve"),Yi.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?Yi.localize("MessageStringMaker.achieve"):Yi.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForBookmarkWithEllipsis:function(){var e=this.messageStringForBookmark();return e.length<100?e:e.substring(0,99)+"…"},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&0>>16,s=65535&t.low,l=t.low>>>16,u=Sa._mul(a,s),c=Sa._mul(o,s),_=Sa._mul(a,l),h=u,d=(Sa._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,Sa.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,Sa.ucompare(h,c)<0){d++;d|=0}d=d+(Sa._mul(e.low,t.high)+Sa._mul(e.high,t.low)|0)|0;var f=new Kn(d,h),m=new Kn(0,K.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,g=f.low+m.low|0;if(Sa.ucompare(g,f.low)<0){p++;p|=0}e=new Kn(p,g)}return e},__class__:vn};function yn(e,t,n){this.stampsetId=e,this.id=t,this.illust=n}(n["albero.entity.OriginalStamp"]=yn).__name__=["albero","entity","OriginalStamp"],yn.__interfaces__=[gn],yn.fromJson=function(e){if(null==e.originalStamp)return null;var t=e.originalStamp;if(null==t.stampsetIdStr||null==t.stampIdStr)return null;var n=tt.makeFromIdStr(t.stampsetIdStr),i=tt.makeFromIdStr(t.stampIdStr);return new yn(n,i,t.illust)},yn.fromPropsAndStampsetId=function(e,t){return new yn(t,tt.fromIntOrInt64(e.id),e.illust)},yn.createKey=function(e){return"original__"+e.high+"_"+e.low},yn.prototype={getImageUrl:function(){return this.illust},getKey:function(){return yn.createKey(this.id)},toJson:function(){var e=this.stampsetId,t=this.id;return{originalStamp:{stampsetIdStr:"_"+e.high+"_"+e.low,stampIdStr:"_"+t.high+"_"+t.low,illust:this.illust}}},createMessage:function(e,t){var n=new Ft;return n.talkId=e,n.type=xt.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:yn};function Sn(e,t,n,i){this.stampsetType=e,this.name=t,this.icon=n,this.version=i,this.stamps=[]}(n["albero.entity.Stampset"]=Sn).__name__=["albero","entity","Stampset"],Sn.historyStampset=function(){return new Sn(En.getHistoryStampsetType(),"stamp-history",null,0)},Sn.commonStampset=function(e,t,n){return new Sn(En.fromCommonStampCategoryIndex(e),t,"./images/stamp/3/"+n,0)},Sn.originalStampset=function(e){var t=tt.fromIntOrInt64(e.stampset_id),n=En.fromStampsetId(t),i=new Sn(n,e.name,e.icon,e.version);if(null!=e.stamps){var r=Va.__cast(e.stamps,Array).map(function(e){return yn.fromPropsAndStampsetId(e,t)});i.setStamps(r)}return i},Sn.fromStampsetInfo=function(e){var t=En.fromStampsetId(e.stampsetId);return new Sn(t,e.name,e.icon,e.version)},Sn.prototype={toTabId:function(){return this.stampsetType.toTabId()},getIconUrl:function(){return this.icon},isStampHistory:function(){return"stamp-history"==this.name},isOriginalStampset:function(){return this.stampsetType.isOriginalStampset()},isEmpty:function(){return 0==this.stamps.length},setStamps:function(e){this.stamps=e},getStamps:function(){return this.stamps},isOlderThan:function(e){return this.versione.version},__class__:wn};var Tn=function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(tt.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))};(n["albero.entity.StampsetSetting"]=Tn).__name__=["albero","entity","StampsetSetting"],Tn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new wn(e)})},isForwardForbidden:function(e){var t=e.getContentsForOriginalStamp(),n=null==t?null:t.stampsetId;return null!=n&&!this.containSendableStampset(n)},containSendableStampset:function(t){return null!=this.allowCreateMessageStampsetIds&&et.exists(this.allowCreateMessageStampsetIds,function(e){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})},containVisibleStampset:function(n){return et.exists(this.stampsetInfos,function(e){var t=e.stampsetId;return null!=n&&null!=t&&n.high==t.high&&n.low==t.low})},getSendableStampsetInfos:function(){var t=this;return null==this.stampsetInfos?[]:null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(e){return t.containSendableStampset(e.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(t){this.stampsetInfos=this.stampsetInfos.map(function(e){return t.eqStampsetId(e)&&t.isNewerThan(e)?t:e})},deleteStampsetInfo:function(n){this.stampsetInfos=this.stampsetInfos.filter(function(e){var t=e.stampsetId;return!(null!=t&&null!=n&&t.high==n.high&&t.low==n.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(e){return!(null!=e&&null!=n&&e.high==n.high&&e.low==n.low)})},getStampsetIdsDiff:function(e){for(var t=new xa,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i=Qi.HIRAGANA_SMALL_A&&o<=Qi.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(Qi.KATAKANA_SMALL_A-Qi.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},Qi.katakanaToRoman=function(e){return(new Bi).convert(e)},Qi.normalize=function(e){return new Ji(null).normalize(e)},Qi.normalizeForFile=function(e){return new Ji(null).normalizeForFile(e)},Qi.asyncAssureNormalize=function(){return Promise.resolve()},Qi.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Ji=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=Ji).__name__=["albero","js","Normalizer"],Ji.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof Wa&&(e=e.val),Gi._e("["+$e.dateStr(new Date)+"] ","invalid character:",e,"","",""),Yi.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof Wa&&(e=e.val),Gi._e("["+$e.dateStr(new Date)+"] ","invalid character:",e,"","",""),Yi.localize("TextCanonicalizer.invalid")}},__class__:Ji};function Xi(){}(n["albero.js.WebSocket"]=Xi).__name__=["albero","js","WebSocket"],Xi.prototype={__class__:Xi};function Zi(){}(n["albero.js.WebSocketFactory"]=Zi).__name__=["albero","js","WebSocketFactory"],Zi.newInstance=function(e,t){return new $i(e,t)};var $i=function(e,t){var n=this;this.onopen=t.onopen,this.onmessage=t.onmessage,this.onerror=null,this.onclose=t.onclose,this.onpong=t.onpong;var i=Eo.wsConfig,r=require("websocket").client;this.ws=new r(i),this.ws.on("connectFailed",go(this,this.onError)),this.ws.on("connect",function(e){(n.connection=e).on("error",go(n,n.onError)),e.on("close",go(n,n.onConnectionClose)),e.on("message",go(n,n.onMessage)),e.on("pong",go(n,n.onPong)),n.onOpen(null)});var a=null;null!=Eo.proxyURL&&(a={agent:Vi.createAgent(Eo.proxyURL)}),this.ws.connect(e,null,null,null,a)};(n["albero.js.WebSocketForNodeJs"]=$i).__name__=["albero","js","WebSocketForNodeJs"],$i.__interfaces__=[Xi],$i.prototype={onOpen:function(e){Gi._i("["+$e.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=this.getBinaryDataForHubot(e),this.onmessage(t)}},getBinaryDataForHubot:function(e){return Ua.ofData(e.binaryData)},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){Gi._e("["+$e.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){this.removeAllEventListenersForHubot();var t="WebSocket closed. "+K.string(e.code)+" "+K.string(e.reason)+" "+K.string(e.wasClean);Gi._i("["+$e.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},removeAllEventListenersForHubot:function(){null!=this.ws&&(this.ws.removeAllListeners(),this.ws=null),null!=this.connection&&(this.connection.removeAllListeners(),this.connection=null)},onConnectionClose:function(e,t){this.onClose({code:e,reason:t})},close:function(){if(this.onopen=null,this.onmessage=null,this.onerror=null,this.onclose=null,this.onpong=null,!this.isClosed()){var e=this.connection;this.onConnectionClose(1e3,"Normal connection closure"),e.close()}},send:function(e){this.isClosed()||this.connection.sendBytes(new $a(e.b.bufferValue))},ping:function(e){this.connection.ping(e)},isClosed:function(){return null==this.ws||null==this.connection||!this.connection.connected},__class__:$i};function er(){}(n["puremvc.interfaces.IProxy"]=er).__name__=["puremvc","interfaces","IProxy"],er.prototype={__class__:er};function tr(){}(n["albero.proxy.AccessTokenResolverProxy"]=tr).__name__=["albero","proxy","AccessTokenResolverProxy"],tr.__interfaces__=[er],tr.prototype={__class__:tr};var nr=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=nr).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],nr.newInstance=function(){return new rr("accessTokenResolver")};var ir=function(e,t){x.call(this),this.proxyName=null!=e?e:ir.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=ir).__name__=["puremvc","patterns","proxy","Proxy"],ir.__interfaces__=[er],ir.__super__=x,ir.prototype=i(x.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:ir});var rr=function(e){ir.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJsHubot"]=rr).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJsHubot"],rr.__interfaces__=[tr],rr.__super__=ir,rr.prototype=i(ir.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=Eo.account?Eo.account.split(":"):null;null==i||2!=i.length?null!=(e=null==e?this.accountLoader.load():e)&&(null!=e.accessToken?(this.settings.setAccessToken(e.accessToken),t(e.accessToken)):this.api.createAccessToken(e.email,e.pass,t)):this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:rr});function ar(){}(n["albero.proxy.AccountLoaderProxy"]=ar).__name__=["albero","proxy","AccountLoaderProxy"],ar.__interfaces__=[er],ar.prototype={__class__:ar};var or=function(){};(n["albero.proxy.AccountLoaderProxyFactory"]=or).__name__=["albero","proxy","AccountLoaderProxyFactory"],or.newInstance=function(){var e=ee.resolveClass("albero.debug.proxy.AccountLoaderProxyImpl");return null!=e?ee.createInstance(e,["accountLoader"]):new sr("accountLoader")};var sr=function(e){ir.call(this,e)};(n["albero.proxy.AccountLoaderProxyForHubot"]=sr).__name__=["albero","proxy","AccountLoaderProxyForHubot"],sr.__interfaces__=[ar],sr.__super__=ir,sr.prototype=i(ir.prototype,{load:function(){var i=this,t=require("read");return t({prompt:"Email: "},function(e,n){t({prompt:"Password: ",silent:!0},function(e,t){i.sendNotification("SignIn",new De(n,t))})}),null},__class__:sr});var lr=function(){ir.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=lr).__name__=["albero","proxy","AlberoBroadcastProxy"],lr.__super__=ir,lr.prototype=i(ir.prototype,{handleNotification:function(e,t,n){var i=this;switch(Gi._d("["+$e.dateStr(new Date)+"] ","Receive request from server. name:",e," body:",t,""),e){case"notify_add_account_control_request":var r=new ot(t);this.dataStore.setAccountControlRequest(r),this.sendNotification(e,r),n();break;case"notify_add_acquaintance":this.sendNotification(e,this.dataFactory.newAcquaintance(t[1])),n();break;case"notify_add_acquaintances":for(var a=t[1].map(go(mo=this.dataFactory,mo.newAcquaintance)),o=0;ot.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null!=t&&null!=t.maxMessage){var n=t.maxMessage.id,i=e.messageId;null!=n&&null!=i&&n.high==i.high&&n.low==i.low&&(t.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(t))}},updateTalkStatusByTalkPushNotificationEvent:function(e,t){var n=this.dataStore.getTalkStatus(t.talkId);if(null==n){var i=this.dataStore.getTalk(t.talkId);if(null==i)return void Gi._e("["+$e.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new Un).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Jt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new Un).id=e.id),null==t.talkOrderingTimestamp&&(t.talkOrderingTimestamp=e.updatedAt),this.dataStore.setTalkStatus(t),t},newTalkStatusByMessage:function(e){var t=this.dataStore.getTalkStatus(e.talkId);null==t&&((t=new Un).id=e.talkId);var n,i=this.dataStore,r=e.userId;if(null!=i.me){var a=i.me.id;n=null!=a&&null!=r&&a.high==r.high&&a.low==r.low}else n=!1;return t.updateByMessage(e,n),this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&t.updateByMessageDeletion(e)&&this.dataStore.setTalkStatus(t),t},updateTalkStatus:function(e){var i=this;if(!et.exists(e.readUserIds,function(e){var t=i.dataStore;if(null==t.me)return!1;var n=t.me.id;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}))return null;var t=this.dataStore.getTalkStatus(e.talkId);return null==t?(Gi._e("["+$e.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null):(t.updateByMessageReadStatusesUpdate(e)&&this.dataStore.setTalkStatus(t),t)},newAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e.domainId);return null==t&&((t=new Re).domainId=e.domainId),t.updateByAnnouncement(e),this.dataStore.setAnnouncementStatus(t),t},assureAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e);return null==t&&(t=this.dataFactory.newAnnouncementStatusForDomain(e)),t},__class__:lr});var ur=function(){ir.call(this,"api")};(n["albero.proxy.AlberoServiceProxy"]=ur).__name__=["albero","proxy","AlberoServiceProxy"],ur.__super__=ir,ur.prototype=i(ir.prototype,{getOSString:function(){return"bot"},createAccessToken:function(e,t,n){var i,r,a=this,o=this.settings.getOs(),s=this.settings.getIDFV(),l=e.split("$");r=-1==e.indexOf("@")&&2==l.length?(i="create_access_token_by_id",[l[1],l[0],t,s,o,""]):(i="create_access_token",[e,t,s,o,""]),this.apiCaller.callImmediately(i,r,function(e){Gi._d("["+$e.dateStr(new Date)+"] ","access token:",e,"","",""),a.settings.setAccessToken(e),n(e)},function(e){a.sendNotification("Url",be.FORWARD(V.error))})},authorizeDevice:function(e,t){var n=this.settings.getIDFV();this.apiCaller.call("authorize_device",[e,n],function(e){t()})},createSession:function(e,i){var r=this,t=[e,"1.114",this.getOSString()];this.apiCaller.onSessionClear(),this.apiCaller.callImmediatelyReliable("create_session",t,function(e){var t=new hn(e),n=I.nowAsInt64();t.passwordExpiration.isExpired(n)?r.sendNotification("password_expiration_overed"):(t.passwordExpiration.needWarning(n,r.settings.getPasswordWarningSkipUntil())&&(r.settings.setPasswordWarningSkipUntil(I.oneDayAfterAsInt64()),r.sendNotification("password_expiration_warned")),r.apiCaller.onSessionCreated(),i(t),r.apiCaller.fireCallbacksWaitingForSession())},function(e){if(null!=e){if(401==e.code&&"expired password"==e.message)return void r.sendNotification("password_expiration_overed");if(401==e.code&&"deleted account"==e.message)return void r.sendNotification("SignOut");if(401==e.code&&"unauthorized device"==e.message)return void r.sendNotification("Device",q.AUTHORIZE);r.apiCaller.handleServerErrorDefault(e)}r.settings.clearAccessToken(),r.sendNotification("Url",be.FORWARD(V.error))},function(e){return r.shouldRetryCreateSession(e)?Ra.Some(r.apiCaller.retryTimeForReplicationLag()):Ra.None})},shouldRetryCreateSession:function(e){return 401==e.code&&"invalid token"==e.message},startNotification:function(){var t=this;this.apiCaller.call("start_notification",[],function(e){e||(t.dataStore.clear(!0),t.sendNotification("start_notification_failed"))})},resetNotification:function(e){this.apiCaller.call("reset_notification",[],e)},sendDomainNotifications:function(e){for(var t=0;t=i.length)){var e=i[r],t=n.id,o=this.dataFactory.newDummyMessage(t,e.type,e.content);this.sendNotification("create_message_start",o),this.apiCaller.call("create_message",[t,Ft.enumIndex(e.type),e.content],function(e){var t=a.dataFactory.newMessage(e);a.sendNotification("create_message_complete",[t,o.id]),a.forwardMessages(n,i,r+1),a.fileInfoStore.removeMessageFileInfos(o.id),a.messageStore.removeMessage(o.id)},function(e){if(a.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=Fr.toLocalError(Ot.SendingMessageConflicted,e);a.sendNotification("error_occurred",t)}else a.sendNotification("error_occurred",e)})}},deleteMessage:function(n,i){var r=this;this.apiCaller.call("delete_message",[n,i],function(e){var t=new Ut;t.talkId=n,t.messageId=i,r.sendNotification("notify_delete_message",t)},function(e){if(null!=e){if(403==e.code&&"frozen domain"==e.message)return void r.sendNotification("error_occurred",e);if(409==e.code&&"conflict"==e.message){var t=Fr.toLocalError(Ot.DeletingMessageConflicted,e);return void r.sendNotification("error_occurred",t)}r.sendNotification("error_occurred",e)}})},updateReadStatuses:function(r,a){var o=this;this.apiCaller.callApiReliable("update_read_statuses",[r,a],function(e){var t,n=o.dataStore.getTalkStatus(r);if(null!=n){var i=n.maxReadMessageId;t=null!=i&&null!=a&&i.high==a.high&&i.low==a.low}else t=!1;t&&o.sendNotification("notify_update_local_talk_status",n)},null,function(e){return 429==e.code&&"too many requests"==e.message?Ra.Some(1e3*o.asInt(e.detail.retry_after)):Ra.None})},upload:function(t,n,i,r){var a=this,e=ri.getBlobFromUpdatableFile(i);this.fileService.asyncCreateThumbnail(e).catch(function(e){return null}).then(function(e){return{file:i,thumb:e}}).then(function(e){a.uploadV2(t,n,e,r)})},uploadV2:function(e,t,n,i){var r=this,a=this.dataFactory.newDummyFileMessage(t,n);this.sendNotification("create_message_start",a);var o=this.prepareMessageFileAsync(n.file,n.thumb,e);o.then(function(e){r.createMessageReliable(t,xt.file,e,a,i)}),o.catch(function(e){r.sendNotification("create_message_fail",[e,a],i)})},uploadForHubot:function(e,t,n){var i=this.dataStore.getTalk(e),r={file:t,thumb:null};if(null==i){var a=this.dataFactory.newDummyFileMessage(e,r),o={code:400,message:"invalid talk_id (deleted talk)"};return Gi._w("["+$e.dateStr(new Date)+"] ","WARNING method: upload",o,"","",""),void this.sendNotification("create_message_fail",[o,a],n)}this.uploadV2(i.domainId,i.id,r,n)},uploadMulti:function(n,i,r,e,a){var o=this,t=e.map(function(t){var e=ri.getBlobFromUpdatableFile(t);return o.fileService.asyncCreateThumbnail(e).catch(function(e){return null}).then(function(e){return{file:t,thumb:e}})});Promise.all(t).then(function(e){var t=e.map(function(e){return e});o.uploadMultiV2(n,i,r,t,a)})},uploadMultiV2:function(n,i,r,a,o){var s=this,l=this.dataFactory.newDummyMultipleFileMessage(i,r,a);this.sendNotification("create_message_start",l);for(var e=Promise.resolve([]),t=0;te.version)return r;var a=this.accountControlRequests;return null!=No[n]?a.setReserved(n,e):a.h[n]=e,this.storage.setDirtyFlag(),e},removeAccountControlRequest:function(e){var t="_"+e.high+"_"+e.low;this.accountControlRequests.remove(t),this.storage.setDirtyFlag()},removeAccountControlRequests:function(){this.accountControlRequests=new xa,this.storage.setDirtyFlag()},getAccountControlGroup:function(){return this.accountControlGroup},setAccountControlGroup:function(e){return this.accountControlGroup=e,this.storage.setDirtyFlag(),this.accountControlGroup},updateAccountControlGroup:function(e){if(null!=this.accountControlGroup){var t=this.accountControlGroup.id,n=e.id;if(null!=t&&null!=n&&t.high==n.high&&t.low==n.low){var i=e.group;null!=i&&this.accountControlGroup.group.version>>31,t.low<<1);if(63,u=new Kn(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new Kn(0,0);if(u.high==h.high&&u.low==h.low)break;var d=Sa.ucompare(n.high,t.high);if(0<=(0!=d?d:Sa.ucompare(n.low,t.low))){l=new Kn(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(Sa.ucompare(n.low,t.low)<0){f--;f|=0}n=new Kn(f,m)}63,u=new Kn(u.high>>>1,u.high<<31|u.low>>>1);63,t=new Kn(t.high>>>1,t.high<<31|t.low>>>1)}if(i){var p=~l.high,g=-l.low;if(0==g){p++;p|=0}l=new Kn(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new Kn(v,y)}return{quotient:l,modulus:n}};var Ta=function(){};(n["haxe.Int64Helper"]=Ta).__name__=["haxe","Int64Helper"],Ta.parseString=function(e){var t=new Kn(0,10),n=new Kn(0,0),i=new Kn(0,1),r=!1,a=W.trim(e);"-"==a.charAt(0)&&(r=!0,a=a.substring(1,a.length));for(var o=a.length,s=0,l=o;s>31,c);if(r){var h=65535&i.low,d=i.low>>>16,f=65535&_.low,m=_.low>>>16,p=Sa._mul(h,f),g=Sa._mul(d,f),v=Sa._mul(h,m),y=p,S=(Sa._mul(d,m)+(v>>>16)|0)+(g>>>16)|0;if(y=y+(v<<=16)|0,Sa.ucompare(y,v)<0){S++;S|=0}if(y=y+(g<<=16)|0,Sa.ucompare(y,g)<0){S++;S|=0}S=S+(Sa._mul(i.low,_.high)+Sa._mul(i.high,_.low)|0)|0;var w=new Kn(S,y),T=n.high-w.high|0,I=n.low-w.low|0;if(Sa.ucompare(n.low,w.low)<0){T--;T|=0}if(!((n=new Kn(T,I)).high<0))throw new Wa("NumberFormatError: Underflow")}else{var E=65535&i.low,N=i.low>>>16,A=65535&_.low,b=_.low>>>16,D=Sa._mul(E,A),k=Sa._mul(N,A),C=Sa._mul(E,b),O=D,M=(Sa._mul(N,b)+(C>>>16)|0)+(k>>>16)|0;if(O=O+(C<<=16)|0,Sa.ucompare(O,C)<0){M++;M|=0}if(O=O+(k<<=16)|0,Sa.ucompare(O,k)<0){M++;M|=0}M=M+(Sa._mul(i.low,_.high)+Sa._mul(i.high,_.low)|0)|0;var R=new Kn(M,O),F=n.high+R.high|0,x=n.low+R.low|0;if(Sa.ucompare(x,n.low)<0){F++;F|=0}if((n=new Kn(F,x)).high<0)throw new Wa("NumberFormatError: Overflow")}var U=65535&i.low,P=i.low>>>16,L=65535&t.low,B=t.low>>>16,H=Sa._mul(U,L),j=Sa._mul(P,L),Y=Sa._mul(U,B),G=H,z=(Sa._mul(P,B)+(Y>>>16)|0)+(j>>>16)|0;if(G=G+(Y<<=16)|0,Sa.ucompare(G,Y)<0){z++;z|=0}if(G=G+(j<<=16)|0,Sa.ucompare(G,j)<0){z++;z|=0}z=z+(Sa._mul(i.low,t.high)+Sa._mul(i.high,t.low)|0)|0,i=new Kn(z,G)}return n};var Ia=function(){this.buf=new T,this.cache=[],this.useCache=Ia.USE_CACHE,this.useEnumIndex=Ia.USE_ENUM_INDEX,this.shash=new xa,this.scount=0};(n["haxe.Serializer"]=Ia).__name__=["haxe","Serializer"],Ia.run=function(e){var t=new Ia;return t.serialize(e),t.toString()},Ia.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=No[e]?t.getReserved(e):t.h[e];if(null!=n)return this.buf.b+="R",void(this.buf.b+=null==n?"null":""+n);var i=this.shash,r=this.scount++;null!=No[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=K.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n>2]),this.buf.b+=String.fromCharCode(b[63&(M<<4|R>>4)]),this.buf.b+=String.fromCharCode(b[63&(R<<2|F>>6)]),this.buf.b+=String.fromCharCode(b[63&F])}if(N==A){var x=E.b[N++],U=E.b[N++];this.buf.b+=String.fromCharCode(b[x>>2]),this.buf.b+=String.fromCharCode(b[63&(x<<4|U>>4)]),this.buf.b+=String.fromCharCode(b[U<<2&63])}else if(N==1+A){var P=E.b[N++];this.buf.b+=String.fromCharCode(b[P>>2]),this.buf.b+=String.fromCharCode(b[P<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var L=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=K.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=K.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=K.string(B-2);for(var H=2,j=B;H=this.length)throw new Wa("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new Wa("Invalid object key");var n=this.unserialize();e[t]=n}this.pos++},unserializeEnum:function(e,t){if(58!=this.buf.charCodeAt(this.pos++))throw new Wa("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new Wa("Invalid string reference");return this.scache[u];case 97:this.buf;var c=[];for(this.cache.push(c);;){var _=this.buf.charCodeAt(this.pos);if(104==_){this.pos++;break}if(117==_){this.pos++;var h=this.readDigits();c[c.length+h-1]=null}else c.push(this.unserialize())}return c;case 98:var d=new xa;this.cache.push(d);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=No[f]?d.setReserved(f,m):d.h[f]=m}return this.pos++,d;case 99:var p=this.unserialize(),g=this.resolver.resolveClass(p);if(null==g)throw new Wa("Class not found "+p);var v=ee.createEmptyInstance(g);return this.cache.push(v),this.unserializeObject(v),v;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:var y=this.unserialize(),S=this.resolver.resolveEnum(y);if(null==S)throw new Wa("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new Wa("Unknown enum index "+y+"@"+w);var I=this.unserializeEnum(S,T);return this.cache.push(I),I;case 107:return NaN;case 108:var E=new $;this.cache.push(E);for(this.buf;104!=this.buf.charCodeAt(this.pos);)E.add(this.unserialize());return this.pos++,E;case 109:return-1/0;case 110:return null;case 111:var N={};return this.cache.push(N),this.unserializeObject(N),N;case 112:return 1/0;case 113:var A=new Oa;this.cache.push(A);this.buf;for(var b=this.buf.charCodeAt(this.pos++);58==b;){var D=this.readDigits(),k=this.unserialize();A.h[D]=k,b=this.buf.charCodeAt(this.pos++)}if(104!=b)throw new Wa("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new Wa("Invalid reference");return this.cache[C];case 115:var O=this.readDigits(),M=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(2<=x?x-1:0))),L=0;F>4);var j=R[M.charCodeAt(F++)];P.b[L++]=255&(H<<4|j>>2);var Y=R[M.charCodeAt(F++)];P.b[L++]=255&(j<<6|Y)}if(2<=x){var G=R[M.charCodeAt(F++)],z=R[M.charCodeAt(F++)];if(P.b[L++]=255&(G<<2|z>>4),3==x){var K=R[M.charCodeAt(F++)];P.b[L++]=255&(z<<4|K>>2)}}return this.pos+=O,this.cache.push(P),P;case 116:return!0;case 118:var W;if(48<=this.buf.charCodeAt(this.pos)&&this.buf.charCodeAt(this.pos)<=57&&48<=this.buf.charCodeAt(this.pos+1)&&this.buf.charCodeAt(this.pos+1)<=57&&48<=this.buf.charCodeAt(this.pos+2)&&this.buf.charCodeAt(this.pos+2)<=57&&48<=this.buf.charCodeAt(this.pos+3)&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4))W=$e.strDate($e.substr(this.buf,this.pos,19)),this.pos+=19;else{var V=this.readFloat();W=new Date(V)}return this.cache.push(W),W;case 119:var q=this.unserialize(),Q=this.resolver.resolveEnum(q);if(null==Q)throw new Wa("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw Wa.wrap(this.unserialize());case 121:var X=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos=(null==s?0:s._height)?new Da(e.left,e.key,e.value,new Da(e.right,t,n,i)):new Da(new Da(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Da(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new Da(new Da(e,t,n,i.left),i.key,i.value,i.right):new Da(new Da(e,t,n,i.left.left),i.left.key,i.left.value,new Da(i.left.right,i.key,i.value,i.right))}return new Da(e,t,n,i,(a(null==s?0:s._height)){var l=this.left;a=null==l?0:l._height}else{var u=this.right;a=null==u?0:u._height}this._height=a+1}else this._height=r};(n["haxe.ds.TreeNode"]=Da).__name__=["haxe","ds","TreeNode"],Da.prototype={__class__:Da};var ka=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};ka.Left=function(e){var t=["Left",0,e];return t.__enum__=ka,t.toString=s,t},ka.Right=function(e){var t=["Right",1,e];return t.__enum__=ka,t.toString=s,t},ka.__empty_constructs__=[];var Ca=function(){ba.call(this)};(n["haxe.ds.EnumValueMap"]=Ca).__name__=["haxe","ds","EnumValueMap"],Ca.__interfaces__=[ya],Ca.__super__=ba,Ca.prototype=i(ba.prototype,{compare:function(e,t){var n=e[1]-t[1];if(0!=n)return n;var i=e.slice(2),r=t.slice(2);return 0==i.length&&0==r.length?0:this.compareArgs(i,r)},compareArgs:function(e,t){var n=e.length-t.length;if(0!=n)return n;for(var i=0,r=e.length;i>6):(i<=65535?t.push(224|i>>12):(t.push(240|i>>18),t.push(128|i>>12&63)),t.push(128|i>>6&63)),t.push(128|63&i))}return new Ua(new Uint8Array(t).buffer)},Ua.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Ua(e)},Ua.fastGet=function(e,t){return e.bytes[t]},Ua.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new Wa(Ga.OutsideBounds);for(var n="",i=this.b,r=String.fromCharCode,a=e,o=e+t;a>10)),n+=r(1023&l|56320)}}return n},toString:function(){return this.getString(0,this.length)},__class__:Ua};function Pa(){this.b=[]}(n["haxe.io.BytesBuffer"]=Pa).__name__=["haxe","io","BytesBuffer"],Pa.prototype={getBytes:function(){var e=new Ua(new Uint8Array(this.b).buffer);return this.b=null,e},__class__:Pa};function La(){}(n["haxe.io.Input"]=La).__name__=["haxe","io","Input"],La.prototype={readByte:function(){throw new Wa("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new Wa(Ga.OutsideBounds);try{for(;0e.length)throw new Wa(Ga.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=Ba).__name__=["haxe","io","BytesInput"],Ba.__super__=La,Ba.prototype=i(La.prototype,{readByte:function(){if(0==this.len)throw new Wa(new Ya);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new Wa(Ga.OutsideBounds);if(0==this.len&&0e.length)throw new Wa(Ga.OutsideBounds);for(var i=e.b,r=n;0>8),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8))},writeInt32:function(e){this.bigEndian?(this.writeByte(e>>>24),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8&255),this.writeByte(e>>16&255),this.writeByte(e>>>24))},__class__:Ha};function ja(){this.b=new Pa}(n["haxe.io.BytesOutput"]=ja).__name__=["haxe","io","BytesOutput"],ja.__super__=Ha,ja.prototype=i(Ha.prototype,{writeByte:function(e){this.b.b.push(e)},writeBytes:function(e,t,n){var i=this.b;if(t<0||n<0||t+n>e.length)throw new Wa(Ga.OutsideBounds);i.b;for(var r=e.b,a=t,o=t+n;a>>23&255,n=8388607&e;return 0==n&&0==t?0:(1-(e>>>31<<1))*(1+Math.pow(2,-23)*n)*Math.pow(2,t-127)},za.floatToI32=function(e){if(0==e)return 0;var t=e<0?-e:e,n=Math.floor(Math.log(t)/.6931471805599453);n<-127?n=-127:128>20&2047)-1023,i=4294967296*(1048575&t)+2147483648*(e>>>31)+(2147483647&e);return 0==i&&-1023==n?0:(1-(t>>>31<<1))*(1+Math.pow(2,-52)*i)*Math.pow(2,n)},za.doubleToI64=function(e){var t=za.i64tmp;if(0==e)t.low=0,t.high=0;else if(isFinite(e)){var n=e<0?-e:e,i=Math.floor(Math.log(n)/.6931471805599453),r=Math.round(4503599627370496*(n/Math.pow(2,i)-1)),a=0|r,o=r/4294967296|0;t.low=a,t.high=(e<0?-2147483648:0)|i+1023<<20|o}else 0";var n=typeof e;switch("function"==n&&(e.__name__||e.__ename__)&&(n="object"),n){case"function":return"";case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];var i=e[0]+"(";t+="\t";for(var r=2,a=e.length;r>>16)<<16|0)|0},Ia.USE_CACHE=!1,Ia.USE_ENUM_INDEX=!1,Ia.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Aa.DEFAULT_RESOLVER=new Na,Aa.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Ma.count=0,za.i64tmp=new Kn(0,0),Va.__toStr={}.toString,to.FLOAT_SINGLE_MIN=1401298464324817e-60,to.FLOAT_SINGLE_MAX=34028234663852886e22,to.FLOAT_DOUBLE_MIN=5e-324,to.FLOAT_DOUBLE_MAX=17976931348623157e292,r.main()}("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this); \ No newline at end of file diff --git a/lib/direct.min.js b/lib/direct.min.js index fc5c62f..2ae8529 100755 --- a/lib/direct.min.js +++ b/lib/direct.min.js @@ -1 +1 @@ -!function(e,t){"use strict";function o(){return ga.__string_rec(this,"")}var n={};function i(e,t){function n(){}n.prototype=e;var i=new n;for(var r in t)i[r]=t[r];return t.toString!==Object.prototype.toString&&(i.toString=t.toString),i}var r=e.DirectAPI=function(){this.eventEmitter=new Ba};(n.DirectAPI=r).__name__=["DirectAPI"],r.getInstance=function(){return null==r.instance&&(r.instance=new r),r.instance},r.main=function(){},r.prototype={setOptions:function(e){null!=e&&(La.host=e.host,La.endpoint=e.endpoint,La.accessToken=e.access_token,La.proxyURL=e.proxyURL,La.account=e.account,La.talkWithBot=e.talkWithBot,La.acceptableEventTimeDiff=e.acceptableEventTimeDiff),Mi._d("["+qe.dateStr(new Date)+"] ","current settings",La,"","",""),null==La.accessToken&&Mi._e("["+qe.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},parseInt64:function(e){return 0=e.length);){if(!this.matchSub(e,n)){i+=K.string(qe.substr(e,n,null));break}var r=this.matchedPos();if(i+=K.string(qe.substr(e,n,r.pos-n)),i+=K.string(t(this)),n=0==r.len?(i+=K.string(qe.substr(e,r.pos,1)),r.pos+1):r.pos+r.len,!this.r.global)break}return!this.r.global&&0r.interval)r.basetime=n,r.count=1;else{if(!(0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},j.startsWith=function(e,t){return e.length>=t.length&&qe.substr(e,0,t.length)==t},j.isSpace=function(e,t){var n=qe.cca(e,t);return 8>>=4););if(null!=t)for(;n.length>>16,l=65535&n.low,u=n.low>>>16,c=Kr._mul(o,l),_=Kr._mul(s,l),h=Kr._mul(o,u),d=c,f=(Kr._mul(s,u)+(h>>>16)|0)+(_>>>16)|0;if(d=d+(h<<=16)|0,Kr.ucompare(d,h)<0){f++;f|=0}if(d=d+(_<<=16)|0,Kr.ucompare(d,_)<0){f++;f|=0}f=f+(Kr._mul(t.low,n.high)+Kr._mul(t.high,n.low)|0)|0;var m=new Pn(f,d),p=new Pn(0,K.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(Kr.ucompare(v,m.low)<0){g++;g|=0}t=new Pn(g,v)}return t},Je.getHigh=function(e){return e.high},Je.getLow=function(e){return e.low},Je.idStr=function(e){return"_"+e.high+"_"+e.low},Je.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new Pn(K.parseInt(t.matched(1)),K.parseInt(t.matched(2))):null},Je.toStr=function(e){return jr.toString(e)},Je.isNeg=function(e){return e.high<0},Je.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(Kr.ucompare(i,e.low)<0){n++;n|=0}return new Pn(n,i)},Je.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(Kr.ucompare(e.low,t.low)<0){n--;n|=0}return new Pn(n,i)},Je.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:Kr.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},Je.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Je.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Je.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},Je.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},Je.eqArray=function(e,t){if(e!=t){if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0,i=e.length;n>31,t);return e.filter(function(e){var t=Ze.map(n.userPresences.getUserPresence(e),function(e){return e.isExpired(i,r)});switch(t[1]){case 0:return t[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){var n=t.splice(0,100);0!=n.length&&this.api.getPresences(e,n),0!=t.length&&this.updateIfNeedPerSub(e,t)},__class__:ye});var Se=function(){F.call(this)};(n["albero.command.UrlCommand"]=Se).__name__=["albero","command","UrlCommand"],Se.__super__=F,Se.prototype=i(F.prototype,{execute:function(e){var t=e.getBody();switch(t[1]){case 0:var n=t[2];this.routing.forward(n);break;case 1:var i=t[2];this.routing.redirect(i);break;case 2:this.routing.back()}},__class__:Se});var we=n["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};we.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=we,t.toString=o,t},we.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=we,t.toString=o,t},we.BACK=["BACK",2],we.BACK.toString=o,(we.BACK.__enum__=we).__empty_constructs__=[we.BACK];function Te(e,t,n){this.email=e,this.pass=t,this.accessToken=n}(n["albero.entity.Account"]=Te).__name__=["albero","entity","Account"],Te.prototype={__class__:Te};function et(e){null!=e&&(this.id=e.id,this.group=new Ie(e.group),this.profilePolicy=new Ee(e.profile_policy))}(n["albero.entity.AccountControlGroup"]=et).__name__=["albero","entity","AccountControlGroup"],et.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:et};var Ie=function(e){null!=e&&(this.name=e.name,this.alias=e.alias,this.ownerName=e.owner_name,this.version=e.version)};(n["albero.entity.AccountControlGroupGroup"]=Ie).__name__=["albero","entity","AccountControlGroupGroup"],Ie.prototype={__class__:Ie};var Ee=function(e){null!=e&&(this.allowUpdateDisplayName=e.allow_update_display_name,this.allowUpdateProfileImage=e.allow_update_profile_image,this.version=e.version)};(n["albero.entity.AccountControlGroupProfilePolicy"]=Ee).__name__=["albero","entity","AccountControlGroupProfilePolicy"],Ee.prototype={__class__:Ee};function tt(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new Ie(e.group)),null!=e.profile_policy&&(this.profilePolicy=new Ee(e.profile_policy)))}(n["albero.entity.AccountControlGroupPartialUpdate"]=tt).__name__=["albero","entity","AccountControlGroupPartialUpdate"],tt.prototype={__class__:tt};function nt(e){null!=e&&(this.id=Je.fromIntOrInt64(e.id),this.groupName=e.group_name,this.groupOwnerName=e.group_owner_name,this.groupOwnerEmail=e.group_owner_email,this.hasDomainInvite=e.has_domain_invite,this.updatedAt=e.updated_at,this.version=e.version)}(n["albero.entity.AccountControlRequest"]=nt).__name__=["albero","entity","AccountControlRequest"],nt.prototype={__class__:nt};var Ne=n["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};Ne.ng=["ng",0],Ne.ng.toString=o,(Ne.ng.__enum__=Ne).ok=["ok",1],Ne.ok.toString=o,(Ne.ok.__enum__=Ne).image=["image",2],Ne.image.toString=o,(Ne.image.__enum__=Ne).imageOrVideo=["imageOrVideo",3],Ne.imageOrVideo.toString=o,(Ne.imageOrVideo.__enum__=Ne).imageOrVideoOrAudio=["imageOrVideoOrAudio",4],Ne.imageOrVideoOrAudio.toString=o,(Ne.imageOrVideoOrAudio.__enum__=Ne).other=["other",5],Ne.other.toString=o,(Ne.other.__enum__=Ne).__empty_constructs__=[Ne.ng,Ne.ok,Ne.image,Ne.imageOrVideo,Ne.imageOrVideoOrAudio,Ne.other];function Ae(e){this.value=e}(n["albero.entity.AllowAttachmentType"]=Ae).__name__=["albero","entity","AllowAttachmentType"],Ae.fromInt=function(e){if(null==e)return new Ae(Ne.other);var t;if(null==e)t=Ne.other;else switch(e){case 0:t=Ne.ng;break;case 1:t=Ne.ok;break;case 2:t=Ne.image;break;case 3:t=Ne.imageOrVideo;break;case 4:t=Ne.imageOrVideoOrAudio;break;default:t=Ne.other}return new Ae(t)},Ae.fromValue=function(e){return new Ae(e)},Ae.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),0>t,e.high<<32-t|e.low>>>t):new Pn(e.high>>31,e.high>>t-32):new Pn(e.high,e.low)},St.subTimestampPart=function(e,t){var n=St.timestamp(e),i=St.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(Kr.ucompare(n.low,i.low)<0){r--;r|=0}return new Pn(r,a)},St.createForTest=function(e){var t=St.TIMESTAMP_SHIFT;return 0!=(t&=63)?t<32?new Pn(e.high<>>32-t,e.low<this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,Oi.localize("MessageStringMaker.achieve"),Oi.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?Oi.localize("MessageStringMaker.achieve"):Oi.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForBookmarkWithEllipsis:function(){var e=this.messageStringForBookmark();return e.length<100?e:e.substring(0,99)+"…"},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&0>>16,s=65535&t.low,l=t.low>>>16,u=Kr._mul(a,s),c=Kr._mul(o,s),_=Kr._mul(a,l),h=u,d=(Kr._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,Kr.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,Kr.ucompare(h,c)<0){d++;d|=0}d=d+(Kr._mul(e.low,t.high)+Kr._mul(e.high,t.low)|0)|0;var f=new Pn(d,h),m=new Pn(0,K.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,g=f.low+m.low|0;if(Kr.ucompare(g,f.low)<0){p++;p|=0}e=new Pn(p,g)}return e},__class__:cn};function _n(e,t,n){this.stampsetId=e,this.id=t,this.illust=n}(n["albero.entity.OriginalStamp"]=_n).__name__=["albero","entity","OriginalStamp"],_n.__interfaces__=[un],_n.fromJson=function(e){if(null==e.originalStamp)return null;var t=e.originalStamp;if(null==t.stampsetIdStr||null==t.stampIdStr)return null;var n=Je.makeFromIdStr(t.stampsetIdStr),i=Je.makeFromIdStr(t.stampIdStr);return new _n(n,i,t.illust)},_n.fromPropsAndStampsetId=function(e,t){return new _n(t,Je.fromIntOrInt64(e.id),e.illust)},_n.createKey=function(e){return"original__"+e.high+"_"+e.low},_n.prototype={getImageUrl:function(){return this.illust},getKey:function(){return _n.createKey(this.id)},toJson:function(){var e=this.stampsetId,t=this.id;return{originalStamp:{stampsetIdStr:"_"+e.high+"_"+e.low,stampIdStr:"_"+t.high+"_"+t.low,illust:this.illust}}},createMessage:function(e,t){var n=new bt;return n.talkId=e,n.type=Dt.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:_n};function hn(e,t,n,i){this.stampsetType=e,this.name=t,this.icon=n,this.version=i,this.stamps=[]}(n["albero.entity.Stampset"]=hn).__name__=["albero","entity","Stampset"],hn.historyStampset=function(){return new hn(pn.getHistoryStampsetType(),"stamp-history",null,0)},hn.commonStampset=function(e,t,n){return new hn(pn.fromCommonStampCategoryIndex(e),t,"./images/stamp/3/"+n,0)},hn.originalStampset=function(e){var t=Je.fromIntOrInt64(e.stampset_id),n=pn.fromStampsetId(t),i=new hn(n,e.name,e.icon,e.version);if(null!=e.stamps){var r=ga.__cast(e.stamps,Array).map(function(e){return _n.fromPropsAndStampsetId(e,t)});i.setStamps(r)}return i},hn.fromStampsetInfo=function(e){var t=pn.fromStampsetId(e.stampsetId);return new hn(t,e.name,e.icon,e.version)},hn.prototype={toTabId:function(){return this.stampsetType.toTabId()},getIconUrl:function(){return this.icon},isStampHistory:function(){return"stamp-history"==this.name},isOriginalStampset:function(){return this.stampsetType.isOriginalStampset()},isEmpty:function(){return 0==this.stamps.length},setStamps:function(e){this.stamps=e},getStamps:function(){return this.stamps},isOlderThan:function(e){return this.versione.version},__class__:dn};var fn=function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(Je.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))};(n["albero.entity.StampsetSetting"]=fn).__name__=["albero","entity","StampsetSetting"],fn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new dn(e)})},isForwardForbidden:function(e){var t=e.getContentsForOriginalStamp(),n=null==t?null:t.stampsetId;return null!=n&&!this.containSendableStampset(n)},containSendableStampset:function(t){return null!=this.allowCreateMessageStampsetIds&&Qe.exists(this.allowCreateMessageStampsetIds,function(e){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})},containVisibleStampset:function(n){return Qe.exists(this.stampsetInfos,function(e){var t=e.stampsetId;return null!=n&&null!=t&&n.high==t.high&&n.low==t.low})},getSendableStampsetInfos:function(){var t=this;return null==this.stampsetInfos?[]:null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(e){return t.containSendableStampset(e.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(t){this.stampsetInfos=this.stampsetInfos.map(function(e){return t.eqStampsetId(e)&&t.isNewerThan(e)?t:e})},deleteStampsetInfo:function(n){this.stampsetInfos=this.stampsetInfos.filter(function(e){var t=e.stampsetId;return!(null!=t&&null!=n&&t.high==n.high&&t.low==n.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(e){return!(null!=e&&null!=n&&e.high==n.high&&e.low==n.low)})},getStampsetIdsDiff:function(e){for(var t=new aa,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i>2)),r+=K.string(a.charAt(63&(o<<4|s>>4))),r+=K.string(a.charAt(63&(s<<2|l>>6))),r+=K.string(a.charAt(63&l))}if(n==i){var u=t.b[n++],c=t.b[n++];r+=K.string(a.charAt(u>>2)),r+=K.string(a.charAt(63&(u<<4|c>>4))),r+=K.string(a.charAt(c<<2&63))}else if(n==1+i){var _=t.b[n++];r+=K.string(a.charAt(_>>2)),r+=K.string(a.charAt(_<<4&63))}var h=r;switch(h.length%4){case 2:h+="==";break;case 3:h+="="}return h},bi.decode=function(e){var t=e.length-1;"="==e.charAt(t)&&("="==e.charAt(t-1)&&--t,e=qe.substr(e,0,t));var n=e.length,i=e,r=bi.CODES;null==r&&(r=bi.initCodes(),bi.CODES=r);for(var a=0,o=3&n,s=a+(n-o),l=new oa(new $a(3*(n>>2)+(2<=o?o-1:0))),u=0;a>4);var h=r[i.charCodeAt(a++)];l.b[u++]=255&(_<<4|h>>2);var d=r[i.charCodeAt(a++)];l.b[u++]=255&(h<<6|d)}if(2<=o){var f=r[i.charCodeAt(a++)],m=r[i.charCodeAt(a++)];if(l.b[u++]=255&(f<<2|m>>4),3==o){var p=r[i.charCodeAt(a++)];l.b[u++]=255&(m<<4|p>>2)}}return l};function Di(){}(n["albero.js.KatakanaToRoman"]=Di).__name__=["albero","js","KatakanaToRoman"],Di.assureConvertTable=function(){return null!=Di.convertTable||(Di.convertTable=new aa,Qe.iter([["ア","A"],["イ","I"],["ウ","U"],["エ","E"],["オ","O"],["カ","KA"],["キ","KI"],["ク","KU"],["ケ","KE"],["コ","KO"],["キャ","KYA"],["キュ","KYU"],["キョ","KYO"],["サ","SA"],["シ","SI"],["ス","SU"],["セ","SE"],["ソ","SO"],["シャ","SHA"],["シュ","SHU"],["ショ","SHO"],["タ","TA"],["チ","TI"],["ツ","TU"],["テ","TE"],["ト","TO"],["チャ","THA"],["チュ","THU"],["チョ","THO"],["ナ","NA"],["ニ","NI"],["ヌ","NU"],["ネ","NE"],["ノ","NO"],["ニャ","NYA"],["ニュ","NYU"],["ニョ","NYO"],["ハ","HA"],["ヒ","HI"],["フ","FU"],["ヘ","HE"],["ホ","HO"],["ヒャ","HYA"],["ヒュ","HYU"],["ヒョ","HYO"],["マ","MA"],["ミ","MI"],["ム","MU"],["メ","ME"],["モ","MO"],["ミャ","MYA"],["ミュ","MYU"],["ミョ","MYO"],["ヤ","YA"],["ユ","YU"],["ヨ","YO"],["ラ","RA"],["リ","RI"],["ル","RU"],["レ","RE"],["ロ","RO"],["リャ","RYA"],["リュ","RYU"],["リョ","RYO"],["ワ","WA"],["ヲ","O"],["ン","N"],["ガ","GA"],["ギ","GI"],["グ","GU"],["ゲ","GE"],["ゴ","GO"],["ギャ","GYA"],["ギュ","GYU"],["ギョ","GYO"],["ザ","ZA"],["ジ","JI"],["ズ","ZU"],["ゼ","ZE"],["ゾ","ZO"],["ジャ","ZYA"],["ジュ","ZYU"],["ジョ","ZYO"],["ダ","DA"],["ヂ","JI"],["ヅ","ZU"],["デ","DE"],["ド","DO"],["バ","BA"],["ビ","BI"],["ブ","BU"],["ベ","BE"],["ボ","BO"],["ビャ","BYA"],["ビュ","BYU"],["ビョ","BYO"],["パ","PA"],["ピ","PI"],["プ","PU"],["ペ","PE"],["ポ","PO"],["ピャ","PYA"],["ピュ","PYU"],["ピョ","PYO"],["ー",""],["ッ","ッ"]],function(e){var t=Di.convertTable,n=e[0],i=e[1];null!=Za[n]?t.setReserved(n,i):t.h[n]=i})),Di.convertTable},Di.matchNext=function(e,t){var n=Di.assureConvertTable();if(t+1=Pi.HIRAGANA_SMALL_A&&o<=Pi.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(Pi.KATAKANA_SMALL_A-Pi.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},Pi.katakanaToRoman=function(e){return(new Di).convert(e)},Pi.normalize=function(e){return new Li(null).normalize(e)},Pi.normalizeForFile=function(e){return new Li(null).normalizeForFile(e)},Pi.asyncAssureNormalize=function(){return Promise.resolve()},Pi.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Li=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=Li).__name__=["albero","js","Normalizer"],Li.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof pa&&(e=e.val),Mi._e("["+qe.dateStr(new Date)+"] ","invalid character:",e,"","",""),Oi.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof pa&&(e=e.val),Mi._e("["+qe.dateStr(new Date)+"] ","invalid character:",e,"","",""),Oi.localize("TextCanonicalizer.invalid")}},__class__:Li};function Bi(e){this.ws=new WebSocket(e),Xa.websocketsbinary&&(this.ws.binaryType="arraybuffer"),this.ws.onopen=Pa(this,this.onOpen),this.ws.onmessage=Pa(this,this.onMessage),this.ws.onerror=Pa(this,this.onError),this.ws.onclose=Pa(this,this.onClose)}(n["albero.js.WebSocket"]=Bi).__name__=["albero","js","WebSocket"],Bi.prototype={onOpen:function(e){Mi._i("["+qe.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t=null;t=Xa.websocketsbinary?oa.ofData(new eo(e.data)):bi.decode(e.data),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){Mi._e("["+qe.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){var t="WebSocket closed. "+K.string(e.code)+" "+K.string(e.reason)+" "+K.string(e.wasClean);Mi._i("["+qe.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},close:function(){this.ws.close()},send:function(e){Xa.websocketsbinary?this.ws.send(new eo(e.b.bufferValue).buffer):this.ws.send(bi.encode(e))},ping:function(e){this.send(new oa(new $a(0)))},isClosed:function(){return null==this.ws||3==this.ws.readyState},__class__:Bi};function Yi(){}(n["puremvc.interfaces.IProxy"]=Yi).__name__=["puremvc","interfaces","IProxy"],Yi.prototype={__class__:Yi};function Hi(){}(n["albero.proxy.AccessTokenResolverProxy"]=Hi).__name__=["albero","proxy","AccessTokenResolverProxy"],Hi.__interfaces__=[Yi],Hi.prototype={__class__:Hi};var Gi=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=Gi).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Gi.newInstance=function(){return new Ki("accessTokenResolver")};var zi=function(e,t){O.call(this),this.proxyName=null!=e?e:zi.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=zi).__name__=["puremvc","patterns","proxy","Proxy"],zi.__interfaces__=[Yi],zi.__super__=O,zi.prototype=i(O.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:zi});var Ki=function(e){zi.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJs"]=Ki).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJs"],Ki.__interfaces__=[Hi],Ki.__super__=zi,Ki.prototype=i(zi.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=La.account?La.account.split(":"):null;null!=i&&2==i.length&&this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:Ki});var ji=function(){zi.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=ji).__name__=["albero","proxy","AlberoBroadcastProxy"],ji.__super__=zi,ji.prototype=i(zi.prototype,{handleNotification:function(n,e,i){var r=this;switch(n){case"notify_add_account_control_request":var t=new nt(e);this.dataStore.setAccountControlRequest(t),this.sendNotification(n,t),i();break;case"notify_add_acquaintance":var a=this.dataFactory.newAcquaintance(e[1]);this.sendNotification(n,a),i();break;case"notify_add_acquaintances":for(var o=e[1].map(Pa(xa=this.dataFactory,xa.newAcquaintance)),s=0;st.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null!=t&&null!=t.maxMessage){var n=t.maxMessage.id,i=e.messageId;null!=n&&null!=i&&n.high==i.high&&n.low==i.low&&(t.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(t))}},updateTalkStatusByTalkPushNotificationEvent:function(e,t){var n=this.dataStore.getTalkStatus(t.talkId);if(null==n){var i=this.dataStore.getTalk(t.talkId);if(null==i)return void Mi._e("["+qe.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new Dn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=zt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new Dn).id=e.id),null==t.talkOrderingTimestamp&&(t.talkOrderingTimestamp=e.updatedAt),this.dataStore.setTalkStatus(t),t},newTalkStatusByMessage:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t&&((t=new Dn).id=e.talkId),kn.isNewMax(t,e.id)&&(t.maxMessageId=e.id,t.maxMessage=e),e.isUnreadCountTarget){var n,i=this.dataStore,r=e.userId;if(null!=i.me){var a=i.me.id;n=null!=a&&null!=r&&a.high==r.high&&a.low==r.low}else n=!1;t.applyNewMessage(e,n)}return this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&(kn.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),kn.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=Dt.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var i=this;if(!Qe.exists(e.readUserIds,function(e){var t=i.dataStore;if(null==t.me)return!1;var n=t.me.id;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}))return null;var t=this.dataStore.getTalkStatus(e.talkId);if(null==t)return Mi._e("["+qe.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null;for(var n=e.messageIds[0],r=0,a=e.messageIds;r=i.length)){var e=i[r],t=n.id,o=this.dataFactory.newDummyMessage(t,e.type,e.content);this.sendNotification("create_message_start",o),this.apiCaller.call("create_message",[t,bt.enumIndex(e.type),e.content],function(e){var t=a.dataFactory.newMessage(e);a.sendNotification("create_message_complete",[t,o.id]),a.forwardMessages(n,i,r+1)},function(e){if(a.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=mr.toLocalError(Et.SendingMessageConflicted,e);a.sendNotification("error_occurred",t)}else a.sendNotification("error_occurred",e)})}},deleteMessage:function(n,i){var r=this;this.apiCaller.call("delete_message",[n,i],function(e){var t=new kt;t.talkId=n,t.messageId=i,r.sendNotification("notify_delete_message",t)},function(e){if(null!=e){if(403==e.code&&"frozen domain"==e.message)return void r.sendNotification("error_occurred",e);if(409==e.code&&"conflict"==e.message){var t=mr.toLocalError(Et.DeletingMessageConflicted,e);return void r.sendNotification("error_occurred",t)}r.sendNotification("error_occurred",e)}})},updateReadStatuses:function(r,a){var o=this;this.apiCaller.callApiReliable("update_read_statuses",[r,a],function(e){var t,n=o.dataStore.getTalkStatus(r);if(null!=n){var i=n.maxReadMessageId;t=null!=i&&null!=a&&i.high==a.high&&i.low==a.low}else t=!1;t&&o.sendNotification("notify_update_local_talk_status",n)},null,function(e){return 429==e.code&&"too many requests"==e.message?ia.Some(1e3*o.asInt(e.detail.retry_after)):ia.None})},upload:function(e,t,n){var i=this,r=this.dataFactory.newDummyFileMessage(t,n);this.sendNotification("create_message_start",r);var a=this.prepareMessageFileAsync(n,e);a.then(function(e){i.createMessageReliable(t,Dt.file,e,r)}),a.catch(function(e){i.sendNotification("create_message_fail",[e,r])})},uploadForHubot:function(e,t,n){var i=this.dataStore.getTalk(e);if(null==i){var r=this.dataFactory.newDummyFileMessage(e,t),a={code:400,message:"invalid talk_id (deleted talk)"};return Mi._w("["+qe.dateStr(new Date)+"] ","WARNING method: upload",a,"","",""),void this.sendNotification("create_message_fail",[a,r],n)}this.upload(i.domainId,i.id,t)},uploadMulti:function(n,i,r,a){var o=this,s=this.dataFactory.newDummyMultipleFileMessage(i,r,a);this.sendNotification("create_message_start",s);for(var e=Promise.resolve([]),t=0;te.version)return r;var a=this.accountControlRequests;return null!=Za[n]?a.setReserved(n,e):a.h[n]=e,this.storage.setDirtyFlag(),e},removeAccountControlRequest:function(e){var t="_"+e.high+"_"+e.low;this.accountControlRequests.remove(t),this.storage.setDirtyFlag()},removeAccountControlRequests:function(){this.accountControlRequests=new aa,this.storage.setDirtyFlag()},getAccountControlGroup:function(){return this.accountControlGroup},setAccountControlGroup:function(e){return this.accountControlGroup=e,this.storage.setDirtyFlag(),this.accountControlGroup},updateAccountControlGroup:function(e){if(null!=this.accountControlGroup){var t=this.accountControlGroup.id,n=e.id;if(null!=t&&null!=n&&t.high==n.high&&t.low==n.low){var i=e.group;null!=i&&this.accountControlGroup.group.version>31,e);return v.createByteSizeStringWithUnit(t)},nr.convertUploadableFile=function(e){var t=!1,n=e.name;E.isEmpty(n)&&(n="clipboard_"+p.getDateStringForFile()+".png",t=!0);var i=nr.getContentTypeByFileName(n,e.type);return i!=e.type&&(t=!0),t?{name:n,type:i,file:n,blob:e,size:e.size}:e},nr.getBlobFromUpdatableFile=function(e){return null==e.blob?e:e.blob},nr.getContentTypeByFileName=function(e,t){if(E.isNotEmpty(t))return"csv"==nr.getExtension(e)?"text/csv":t;switch(nr.getExtension(e)){case"csv":return"text/csv";case"doc":return"application/msword";case"docm":return"application/vnd.ms-word.document.macroenabled.12";case"docx":return"application/vnd.openxmlformats-officedocument.wordprocessingml.document";case"gif":return"image/gif";case"htm":case"html":return"text/html";case"jpeg":case"jpg":return"image/jpeg";case"md":return"text/markdown";case"pdf":return"application/pdf";case"png":return"image/png";case"ppt":return"application/vnd.ms-powerpoint";case"pptm":return"application/vnd.ms-powerpoint.presentation.macroenabled.12";case"pptx":return"application/vnd.openxmlformats-officedocument.presentationml.presentation";case"txt":return"text/plain";case"xls":return"application/vnd.ms-excel";case"xlsb":return"application/vnd.ms-excel.sheet.binary.macroenabled.12";case"xlsm":return"application/vnd.ms-excel.sheet.macroenabled.12";case"xlsx":return"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";case"xml":return"text/xml";default:return"application/octet-stream"}},nr.getExtension=function(e){if(null==e)return"";var t=e.split("."),n=t.length;return 0==n?"":t[n-1]},nr.__super__=zi,nr.prototype=i(zi.prototype,{getValidHost:function(){return"https://"+La.host},downloadUrl:function(e,t){if(null==t&&(t=!1),null==e||0==e.length)return"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(j.startsWith(e,this.validHost)){var n=this.settings.getAccessToken(),i=e;return-1!=e.indexOf("?")?i+="&":i+="?",i+="Authorization=ALB%20"+n,t&&(i+="&download=true"),i}return e},download:function(e,t,n){},upload:function(e,t,n){return this.uploadForBrowser(e,t,n)},uploadForBrowser:function(e,t,r){for(var a={},n=0,i=z.fields(e.post_form);n>>31,t.low<<1);if(63,u=new Pn(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new Pn(0,0);if(u.high==h.high&&u.low==h.low)break;var d=Kr.ucompare(n.high,t.high);if(0<=(0!=d?d:Kr.ucompare(n.low,t.low))){l=new Pn(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(Kr.ucompare(n.low,t.low)<0){f--;f|=0}n=new Pn(f,m)}63,u=new Pn(u.high>>>1,u.high<<31|u.low>>>1);63,t=new Pn(t.high>>>1,t.high<<31|t.low>>>1)}if(i){var p=~l.high,g=-l.low;if(0==g){p++;p|=0}l=new Pn(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new Pn(v,y)}return{quotient:l,modulus:n}};var Wr=function(){};(n["haxe.Int64Helper"]=Wr).__name__=["haxe","Int64Helper"],Wr.parseString=function(e){var t=new Pn(0,10),n=new Pn(0,0),i=new Pn(0,1),r=!1,a=j.trim(e);"-"==a.charAt(0)&&(r=!0,a=a.substring(1,a.length));for(var o=a.length,s=0,l=o;s>31,c);if(r){var h=65535&i.low,d=i.low>>>16,f=65535&_.low,m=_.low>>>16,p=Kr._mul(h,f),g=Kr._mul(d,f),v=Kr._mul(h,m),y=p,S=(Kr._mul(d,m)+(v>>>16)|0)+(g>>>16)|0;if(y=y+(v<<=16)|0,Kr.ucompare(y,v)<0){S++;S|=0}if(y=y+(g<<=16)|0,Kr.ucompare(y,g)<0){S++;S|=0}S=S+(Kr._mul(i.low,_.high)+Kr._mul(i.high,_.low)|0)|0;var w=new Pn(S,y),T=n.high-w.high|0,I=n.low-w.low|0;if(Kr.ucompare(n.low,w.low)<0){T--;T|=0}if(!((n=new Pn(T,I)).high<0))throw new pa("NumberFormatError: Underflow")}else{var E=65535&i.low,N=i.low>>>16,A=65535&_.low,b=_.low>>>16,D=Kr._mul(E,A),k=Kr._mul(N,A),C=Kr._mul(E,b),O=D,M=(Kr._mul(N,b)+(C>>>16)|0)+(k>>>16)|0;if(O=O+(C<<=16)|0,Kr.ucompare(O,C)<0){M++;M|=0}if(O=O+(k<<=16)|0,Kr.ucompare(O,k)<0){M++;M|=0}M=M+(Kr._mul(i.low,_.high)+Kr._mul(i.high,_.low)|0)|0;var R=new Pn(M,O),F=n.high+R.high|0,x=n.low+R.low|0;if(Kr.ucompare(x,n.low)<0){F++;F|=0}if((n=new Pn(F,x)).high<0)throw new pa("NumberFormatError: Overflow")}var U=65535&i.low,P=i.low>>>16,L=65535&t.low,B=t.low>>>16,Y=Kr._mul(U,L),H=Kr._mul(P,L),G=Kr._mul(U,B),z=Y,K=(Kr._mul(P,B)+(G>>>16)|0)+(H>>>16)|0;if(z=z+(G<<=16)|0,Kr.ucompare(z,G)<0){K++;K|=0}if(z=z+(H<<=16)|0,Kr.ucompare(z,H)<0){K++;K|=0}K=K+(Kr._mul(i.low,t.high)+Kr._mul(i.high,t.low)|0)|0,i=new Pn(K,z)}return n};var Vr=function(){this.buf=new T,this.cache=[],this.useCache=Vr.USE_CACHE,this.useEnumIndex=Vr.USE_ENUM_INDEX,this.shash=new aa,this.scount=0};(n["haxe.Serializer"]=Vr).__name__=["haxe","Serializer"],Vr.run=function(e){var t=new Vr;return t.serialize(e),t.toString()},Vr.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=Za[e]?t.getReserved(e):t.h[e];if(null!=n)return this.buf.b+="R",void(this.buf.b+=null==n?"null":""+n);var i=this.shash,r=this.scount++;null!=Za[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=K.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n>2]),this.buf.b+=String.fromCharCode(b[63&(M<<4|R>>4)]),this.buf.b+=String.fromCharCode(b[63&(R<<2|F>>6)]),this.buf.b+=String.fromCharCode(b[63&F])}if(N==A){var x=E.b[N++],U=E.b[N++];this.buf.b+=String.fromCharCode(b[x>>2]),this.buf.b+=String.fromCharCode(b[63&(x<<4|U>>4)]),this.buf.b+=String.fromCharCode(b[U<<2&63])}else if(N==1+A){var P=E.b[N++];this.buf.b+=String.fromCharCode(b[P>>2]),this.buf.b+=String.fromCharCode(b[P<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var L=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=K.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=K.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=K.string(B-2);for(var Y=2,H=B;Y=this.length)throw new pa("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new pa("Invalid object key");var n=this.unserialize();e[t]=n}this.pos++},unserializeEnum:function(e,t){if(58!=this.buf.charCodeAt(this.pos++))throw new pa("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new pa("Invalid string reference");return this.scache[u];case 97:this.buf;var c=[];for(this.cache.push(c);;){var _=this.buf.charCodeAt(this.pos);if(104==_){this.pos++;break}if(117==_){this.pos++;var h=this.readDigits();c[c.length+h-1]=null}else c.push(this.unserialize())}return c;case 98:var d=new aa;this.cache.push(d);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=Za[f]?d.setReserved(f,m):d.h[f]=m}return this.pos++,d;case 99:var p=this.unserialize(),g=this.resolver.resolveClass(p);if(null==g)throw new pa("Class not found "+p);var v=ee.createEmptyInstance(g);return this.cache.push(v),this.unserializeObject(v),v;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:var y=this.unserialize(),S=this.resolver.resolveEnum(y);if(null==S)throw new pa("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new pa("Unknown enum index "+y+"@"+w);var I=this.unserializeEnum(S,T);return this.cache.push(I),I;case 107:return NaN;case 108:var E=new $;this.cache.push(E);for(this.buf;104!=this.buf.charCodeAt(this.pos);)E.add(this.unserialize());return this.pos++,E;case 109:return-1/0;case 110:return null;case 111:var N={};return this.cache.push(N),this.unserializeObject(N),N;case 112:return 1/0;case 113:var A=new ta;this.cache.push(A);this.buf;for(var b=this.buf.charCodeAt(this.pos++);58==b;){var D=this.readDigits(),k=this.unserialize();A.h[D]=k,b=this.buf.charCodeAt(this.pos++)}if(104!=b)throw new pa("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new pa("Invalid reference");return this.cache[C];case 115:var O=this.readDigits(),M=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(2<=x?x-1:0))),L=0;F>4);var H=R[M.charCodeAt(F++)];P.b[L++]=255&(Y<<4|H>>2);var G=R[M.charCodeAt(F++)];P.b[L++]=255&(H<<6|G)}if(2<=x){var z=R[M.charCodeAt(F++)],K=R[M.charCodeAt(F++)];if(P.b[L++]=255&(z<<2|K>>4),3==x){var j=R[M.charCodeAt(F++)];P.b[L++]=255&(K<<4|j>>2)}}return this.pos+=O,this.cache.push(P),P;case 116:return!0;case 118:var W;if(48<=this.buf.charCodeAt(this.pos)&&this.buf.charCodeAt(this.pos)<=57&&48<=this.buf.charCodeAt(this.pos+1)&&this.buf.charCodeAt(this.pos+1)<=57&&48<=this.buf.charCodeAt(this.pos+2)&&this.buf.charCodeAt(this.pos+2)<=57&&48<=this.buf.charCodeAt(this.pos+3)&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4))W=qe.strDate(qe.substr(this.buf,this.pos,19)),this.pos+=19;else{var V=this.readFloat();W=new Date(V)}return this.cache.push(W),W;case 119:var q=this.unserialize(),Q=this.resolver.resolveEnum(q);if(null==Q)throw new pa("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw pa.wrap(this.unserialize());case 121:var X=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos=(null==s?0:s._height)?new Zr(e.left,e.key,e.value,new Zr(e.right,t,n,i)):new Zr(new Zr(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Zr(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new Zr(new Zr(e,t,n,i.left),i.key,i.value,i.right):new Zr(new Zr(e,t,n,i.left.left),i.left.key,i.left.value,new Zr(i.left.right,i.key,i.value,i.right))}return new Zr(e,t,n,i,(a(null==s?0:s._height)){var l=this.left;a=null==l?0:l._height}else{var u=this.right;a=null==u?0:u._height}this._height=a+1}else this._height=r};(n["haxe.ds.TreeNode"]=Zr).__name__=["haxe","ds","TreeNode"],Zr.prototype={__class__:Zr};var $r=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};$r.Left=function(e){var t=["Left",0,e];return t.__enum__=$r,t.toString=o,t},$r.Right=function(e){var t=["Right",1,e];return t.__enum__=$r,t.toString=o,t},$r.__empty_constructs__=[];var ea=function(){Xr.call(this)};(n["haxe.ds.EnumValueMap"]=ea).__name__=["haxe","ds","EnumValueMap"],ea.__interfaces__=[zr],ea.__super__=Xr,ea.prototype=i(Xr.prototype,{compare:function(e,t){var n=e[1]-t[1];if(0!=n)return n;var i=e.slice(2),r=t.slice(2);return 0==i.length&&0==r.length?0:this.compareArgs(i,r)},compareArgs:function(e,t){var n=e.length-t.length;if(0!=n)return n;for(var i=0,r=e.length;i>6):(i<=65535?t.push(224|i>>12):(t.push(240|i>>18),t.push(128|i>>12&63)),t.push(128|i>>6&63)),t.push(128|63&i))}return new oa(new eo(t).buffer)},oa.ofData=function(e){var t=e.hxBytes;return null!=t?t:new oa(e)},oa.fastGet=function(e,t){return e.bytes[t]},oa.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new pa(da.OutsideBounds);for(var n="",i=this.b,r=String.fromCharCode,a=e,o=e+t;a>10)),n+=r(1023&l|56320)}}return n},toString:function(){return this.getString(0,this.length)},__class__:oa};function sa(){this.b=[]}(n["haxe.io.BytesBuffer"]=sa).__name__=["haxe","io","BytesBuffer"],sa.prototype={getBytes:function(){var e=new oa(new eo(this.b).buffer);return this.b=null,e},__class__:sa};function la(){}(n["haxe.io.Input"]=la).__name__=["haxe","io","Input"],la.prototype={readByte:function(){throw new pa("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new pa(da.OutsideBounds);try{for(;0e.length)throw new pa(da.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=ua).__name__=["haxe","io","BytesInput"],ua.__super__=la,ua.prototype=i(la.prototype,{readByte:function(){if(0==this.len)throw new pa(new ha);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new pa(da.OutsideBounds);if(0==this.len&&0e.length)throw new pa(da.OutsideBounds);for(var i=e.b,r=n;0>8),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8))},writeInt32:function(e){this.bigEndian?(this.writeByte(e>>>24),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8&255),this.writeByte(e>>16&255),this.writeByte(e>>>24))},__class__:ca};function _a(){this.b=new sa}(n["haxe.io.BytesOutput"]=_a).__name__=["haxe","io","BytesOutput"],_a.__super__=ca,_a.prototype=i(ca.prototype,{writeByte:function(e){this.b.b.push(e)},writeBytes:function(e,t,n){var i=this.b;if(t<0||n<0||t+n>e.length)throw new pa(da.OutsideBounds);i.b;for(var r=e.b,a=t,o=t+n;a>>23&255,n=8388607&e;return 0==n&&0==t?0:(1-(e>>>31<<1))*(1+Math.pow(2,-23)*n)*Math.pow(2,t-127)},fa.floatToI32=function(e){if(0==e)return 0;var t=e<0?-e:e,n=Math.floor(Math.log(t)/.6931471805599453);n<-127?n=-127:128>20&2047)-1023,i=4294967296*(1048575&t)+2147483648*(e>>>31)+(2147483647&e);return 0==i&&-1023==n?0:(1-(t>>>31<<1))*(1+Math.pow(2,-52)*i)*Math.pow(2,n)},fa.doubleToI64=function(e){var t=fa.i64tmp;if(0==e)t.low=0,t.high=0;else if(isFinite(e)){var n=e<0?-e:e,i=Math.floor(Math.log(n)/.6931471805599453),r=Math.round(4503599627370496*(n/Math.pow(2,i)-1)),a=0|r,o=r/4294967296|0;t.low=a,t.high=(e<0?-2147483648:0)|i+1023<<20|o}else 0";var n=typeof e;switch("function"==n&&(e.__name__||e.__ename__)&&(n="object"),n){case"function":return"";case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];var i=e[0]+"(";t+="\t";for(var r=2,a=e.length;rthis.byteLength)throw new pa("set() outside of range");for(var i=0,r=e.byteLength;ithis.byteLength)throw new pa("set() outside of range");for(var s=0,l=o.length;sn&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},Ba.prototype.once=function(e,t){if(!Ya(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},Ba.prototype.removeListener=function(e,t){var n,i,r,a;if(!Ya(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=(n=this._events[e]).length,i=-1,n===t||Ya(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Ha(n)){for(a=r;0>>16)<<16|0)|0},Vr.USE_CACHE=!1,Vr.USE_ENUM_INDEX=!1,Vr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Jr.DEFAULT_RESOLVER=new Qr,Jr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",na.count=0,fa.i64tmp=new Pn(0,0),ga.__toStr={}.toString,Sa.BYTES_PER_ELEMENT=1,Ta.FLOAT_SINGLE_MIN=1401298464324817e-60,Ta.FLOAT_SINGLE_MAX=34028234663852886e22,Ta.FLOAT_DOUBLE_MIN=5e-324,Ta.FLOAT_DOUBLE_MAX=17976931348623157e292,r.main()}("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this); \ No newline at end of file +!function(e,t){"use strict";function o(){return Fa.__string_rec(this,"")}var n={};function i(e,t){function n(){}n.prototype=e;var i=new n;for(var r in t)i[r]=t[r];return t.toString!==Object.prototype.toString&&(i.toString=t.toString),i}var r=e.DirectAPI=function(){this.eventEmitter=new to};(n.DirectAPI=r).__name__=["DirectAPI"],r.getInstance=function(){return null==r.instance&&(r.instance=new r),r.instance},r.main=function(){},r.prototype={setOptions:function(e){null!=e&&(mo.host=e.host,mo.endpoint=e.endpoint,mo.accessToken=e.access_token,mo.proxyURL=e.proxyURL,mo.account=e.account,mo.talkWithBot=e.talkWithBot,mo.acceptableEventTimeDiff=e.acceptableEventTimeDiff),Yi._d("["+$e.dateStr(new Date)+"] ","current settings",mo,"","",""),null==mo.accessToken&&Yi._e("["+$e.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},parseInt64:function(e){return 0=e.length);){if(!this.matchSub(e,n)){i+=j.string($e.substr(e,n,null));break}var r=this.matchedPos();if(i+=j.string($e.substr(e,n,r.pos-n)),i+=j.string(t(this)),n=0==r.len?(i+=j.string($e.substr(e,r.pos,1)),r.pos+1):r.pos+r.len,!this.r.global)break}return!this.r.global&&0r.interval)r.basetime=n,r.count=1;else{if(!(0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},K.startsWith=function(e,t){return e.length>=t.length&&$e.substr(e,0,t.length)==t},K.isSpace=function(e,t){var n=$e.cca(e,t);return 8>>=4););if(null!=t)for(;n.length>>16,l=65535&n.low,u=n.low>>>16,c=sa._mul(o,l),_=sa._mul(s,l),h=sa._mul(o,u),d=c,f=(sa._mul(s,u)+(h>>>16)|0)+(_>>>16)|0;if(d=d+(h<<=16)|0,sa.ucompare(d,h)<0){f++;f|=0}if(d=d+(_<<=16)|0,sa.ucompare(d,_)<0){f++;f|=0}f=f+(sa._mul(t.low,n.high)+sa._mul(t.high,n.low)|0)|0;var m=new zn(f,d),p=new zn(0,j.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(sa.ucompare(v,m.low)<0){g++;g|=0}t=new zn(g,v)}return t},tt.getHigh=function(e){return e.high},tt.getLow=function(e){return e.low},tt.idStr=function(e){return"_"+e.high+"_"+e.low},tt.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new zn(j.parseInt(t.matched(1)),j.parseInt(t.matched(2))):null},tt.fromNullableIdStr=function(e){return null!=e?tt.makeFromIdStr(e):null},tt.toStr=function(e){return la.toString(e)},tt.isNeg=function(e){return e.high<0},tt.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(sa.ucompare(i,e.low)<0){n++;n|=0}return new zn(n,i)},tt.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(sa.ucompare(e.low,t.low)<0){n--;n|=0}return new zn(n,i)},tt.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:sa.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},tt.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},tt.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},tt.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},tt.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},tt.eqArray=function(e,t){if(e!=t){if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0,i=e.length;n>31,t);return e.filter(function(e){var t=it.map(n.userPresences.getUserPresence(e),function(e){return e.isExpired(i,r)});switch(t[1]){case 0:return t[2];case 1:return!0}})},updateIfNeedPerSub:function(n,e){for(var i=this,t=Promise.resolve([]),r=tt.splitUsingMaxCount(e,100),a=0;a>t,e.high<<32-t|e.low>>>t):new zn(e.high>>31,e.high>>t-32):new zn(e.high,e.low)},Et.subTimestampPart=function(e,t){var n=Et.timestamp(e),i=Et.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(sa.ucompare(n.low,i.low)<0){r--;r|=0}return new zn(r,a)},Et.createForTest=function(e){var t=Et.TIMESTAMP_SHIFT;return 0!=(t&=63)?t<32?new zn(e.high<>>32-t,e.low<this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,Hi.localize("MessageStringMaker.achieve"),Hi.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?Hi.localize("MessageStringMaker.achieve"):Hi.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForBookmarkWithEllipsis:function(){var e=this.messageStringForBookmark();return e.length<100?e:e.substring(0,99)+"…"},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&0>>16,s=65535&t.low,l=t.low>>>16,u=sa._mul(a,s),c=sa._mul(o,s),_=sa._mul(a,l),h=u,d=(sa._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,sa.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,sa.ucompare(h,c)<0){d++;d|=0}d=d+(sa._mul(e.low,t.high)+sa._mul(e.high,t.low)|0)|0;var f=new zn(d,h),m=new zn(0,j.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,g=f.low+m.low|0;if(sa.ucompare(g,f.low)<0){p++;p|=0}e=new zn(p,g)}return e},__class__:mn};function pn(e,t,n){this.stampsetId=e,this.id=t,this.illust=n}(n["albero.entity.OriginalStamp"]=pn).__name__=["albero","entity","OriginalStamp"],pn.__interfaces__=[fn],pn.fromJson=function(e){if(null==e.originalStamp)return null;var t=e.originalStamp;if(null==t.stampsetIdStr||null==t.stampIdStr)return null;var n=tt.makeFromIdStr(t.stampsetIdStr),i=tt.makeFromIdStr(t.stampIdStr);return new pn(n,i,t.illust)},pn.fromPropsAndStampsetId=function(e,t){return new pn(t,tt.fromIntOrInt64(e.id),e.illust)},pn.createKey=function(e){return"original__"+e.high+"_"+e.low},pn.prototype={getImageUrl:function(){return this.illust},getKey:function(){return pn.createKey(this.id)},toJson:function(){var e=this.stampsetId,t=this.id;return{originalStamp:{stampsetIdStr:"_"+e.high+"_"+e.low,stampIdStr:"_"+t.high+"_"+t.low,illust:this.illust}}},createMessage:function(e,t){var n=new Ot;return n.talkId=e,n.type=Mt.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:pn};function gn(e,t,n,i){this.stampsetType=e,this.name=t,this.icon=n,this.version=i,this.stamps=[]}(n["albero.entity.Stampset"]=gn).__name__=["albero","entity","Stampset"],gn.historyStampset=function(){return new gn(wn.getHistoryStampsetType(),"stamp-history",null,0)},gn.commonStampset=function(e,t,n){return new gn(wn.fromCommonStampCategoryIndex(e),t,"./images/stamp/3/"+n,0)},gn.originalStampset=function(e){var t=tt.fromIntOrInt64(e.stampset_id),n=wn.fromStampsetId(t),i=new gn(n,e.name,e.icon,e.version);if(null!=e.stamps){var r=Fa.__cast(e.stamps,Array).map(function(e){return pn.fromPropsAndStampsetId(e,t)});i.setStamps(r)}return i},gn.fromStampsetInfo=function(e){var t=wn.fromStampsetId(e.stampsetId);return new gn(t,e.name,e.icon,e.version)},gn.prototype={toTabId:function(){return this.stampsetType.toTabId()},getIconUrl:function(){return this.icon},isStampHistory:function(){return"stamp-history"==this.name},isOriginalStampset:function(){return this.stampsetType.isOriginalStampset()},isEmpty:function(){return 0==this.stamps.length},setStamps:function(e){this.stamps=e},getStamps:function(){return this.stamps},isOlderThan:function(e){return this.versione.version},__class__:vn};var yn=function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(tt.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))};(n["albero.entity.StampsetSetting"]=yn).__name__=["albero","entity","StampsetSetting"],yn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new vn(e)})},isForwardForbidden:function(e){var t=e.getContentsForOriginalStamp(),n=null==t?null:t.stampsetId;return null!=n&&!this.containSendableStampset(n)},containSendableStampset:function(t){return null!=this.allowCreateMessageStampsetIds&&et.exists(this.allowCreateMessageStampsetIds,function(e){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})},containVisibleStampset:function(n){return et.exists(this.stampsetInfos,function(e){var t=e.stampsetId;return null!=n&&null!=t&&n.high==t.high&&n.low==t.low})},getSendableStampsetInfos:function(){var t=this;return null==this.stampsetInfos?[]:null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(e){return t.containSendableStampset(e.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(t){this.stampsetInfos=this.stampsetInfos.map(function(e){return t.eqStampsetId(e)&&t.isNewerThan(e)?t:e})},deleteStampsetInfo:function(n){this.stampsetInfos=this.stampsetInfos.filter(function(e){var t=e.stampsetId;return!(null!=t&&null!=n&&t.high==n.high&&t.low==n.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(e){return!(null!=e&&null!=n&&e.high==n.high&&e.low==n.low)})},getStampsetIdsDiff:function(e){for(var t=new Ta,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i>2)),r+=j.string(a.charAt(63&(o<<4|s>>4))),r+=j.string(a.charAt(63&(s<<2|l>>6))),r+=j.string(a.charAt(63&l))}if(n==i){var u=t.b[n++],c=t.b[n++];r+=j.string(a.charAt(u>>2)),r+=j.string(a.charAt(63&(u<<4|c>>4))),r+=j.string(a.charAt(c<<2&63))}else if(n==1+i){var _=t.b[n++];r+=j.string(a.charAt(_>>2)),r+=j.string(a.charAt(_<<4&63))}var h=r;switch(h.length%4){case 2:h+="==";break;case 3:h+="="}return h},Ui.decode=function(e){var t=e.length-1;"="==e.charAt(t)&&("="==e.charAt(t-1)&&--t,e=$e.substr(e,0,t));var n=e.length,i=e,r=Ui.CODES;null==r&&(r=Ui.initCodes(),Ui.CODES=r);for(var a=0,o=3&n,s=a+(n-o),l=new Ia(new go(3*(n>>2)+(2<=o?o-1:0))),u=0;a>4);var h=r[i.charCodeAt(a++)];l.b[u++]=255&(_<<4|h>>2);var d=r[i.charCodeAt(a++)];l.b[u++]=255&(h<<6|d)}if(2<=o){var f=r[i.charCodeAt(a++)],m=r[i.charCodeAt(a++)];if(l.b[u++]=255&(f<<2|m>>4),3==o){var p=r[i.charCodeAt(a++)];l.b[u++]=255&(m<<4|p>>2)}}return l};function Pi(){}(n["albero.js.KatakanaToRoman"]=Pi).__name__=["albero","js","KatakanaToRoman"],Pi.assureConvertTable=function(){return null!=Pi.convertTable||(Pi.convertTable=new Ta,et.iter([["ア","A"],["イ","I"],["ウ","U"],["エ","E"],["オ","O"],["カ","KA"],["キ","KI"],["ク","KU"],["ケ","KE"],["コ","KO"],["キャ","KYA"],["キュ","KYU"],["キョ","KYO"],["サ","SA"],["シ","SI"],["ス","SU"],["セ","SE"],["ソ","SO"],["シャ","SHA"],["シュ","SHU"],["ショ","SHO"],["タ","TA"],["チ","TI"],["ツ","TU"],["テ","TE"],["ト","TO"],["チャ","THA"],["チュ","THU"],["チョ","THO"],["ナ","NA"],["ニ","NI"],["ヌ","NU"],["ネ","NE"],["ノ","NO"],["ニャ","NYA"],["ニュ","NYU"],["ニョ","NYO"],["ハ","HA"],["ヒ","HI"],["フ","FU"],["ヘ","HE"],["ホ","HO"],["ヒャ","HYA"],["ヒュ","HYU"],["ヒョ","HYO"],["マ","MA"],["ミ","MI"],["ム","MU"],["メ","ME"],["モ","MO"],["ミャ","MYA"],["ミュ","MYU"],["ミョ","MYO"],["ヤ","YA"],["ユ","YU"],["ヨ","YO"],["ラ","RA"],["リ","RI"],["ル","RU"],["レ","RE"],["ロ","RO"],["リャ","RYA"],["リュ","RYU"],["リョ","RYO"],["ワ","WA"],["ヲ","O"],["ン","N"],["ガ","GA"],["ギ","GI"],["グ","GU"],["ゲ","GE"],["ゴ","GO"],["ギャ","GYA"],["ギュ","GYU"],["ギョ","GYO"],["ザ","ZA"],["ジ","JI"],["ズ","ZU"],["ゼ","ZE"],["ゾ","ZO"],["ジャ","ZYA"],["ジュ","ZYU"],["ジョ","ZYO"],["ダ","DA"],["ヂ","JI"],["ヅ","ZU"],["デ","DE"],["ド","DO"],["バ","BA"],["ビ","BI"],["ブ","BU"],["ベ","BE"],["ボ","BO"],["ビャ","BYA"],["ビュ","BYU"],["ビョ","BYO"],["パ","PA"],["ピ","PI"],["プ","PU"],["ペ","PE"],["ポ","PO"],["ピャ","PYA"],["ピュ","PYU"],["ピョ","PYO"],["ー",""],["ッ","ッ"]],function(e){var t=Pi.convertTable,n=e[0],i=e[1];null!=po[n]?t.setReserved(n,i):t.h[n]=i})),Pi.convertTable},Pi.matchNext=function(e,t){var n=Pi.assureConvertTable();if(t+1=Vi.HIRAGANA_SMALL_A&&o<=Vi.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(Vi.KATAKANA_SMALL_A-Vi.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},Vi.katakanaToRoman=function(e){return(new Pi).convert(e)},Vi.normalize=function(e){return new qi(null).normalize(e)},Vi.normalizeForFile=function(e){return new qi(null).normalizeForFile(e)},Vi.asyncAssureNormalize=function(){return Promise.resolve()},Vi.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var qi=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=qi).__name__=["albero","js","Normalizer"],qi.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof Ra&&(e=e.val),Yi._e("["+$e.dateStr(new Date)+"] ","invalid character:",e,"","",""),Hi.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof Ra&&(e=e.val),Yi._e("["+$e.dateStr(new Date)+"] ","invalid character:",e,"","",""),Hi.localize("TextCanonicalizer.invalid")}},__class__:qi};function Qi(){}(n["albero.js.ThumbnailCreator"]=Qi).__name__=["albero","js","ThumbnailCreator"],Qi.prototype={asyncCreateThumbnail:function(e){return K.startsWith(e.type,"video/")?this.asyncCreateVideoThumbnail(e):K.startsWith(e.type,"image/")?this.asyncCreateImageThumbnail(e):Promise.reject(null)},asyncCreateImageThumbnail:function(e){var n=this;Yi._d("["+$e.dateStr(new Date)+"] ","createImageThumbnail","","","","");var i=this.createCanvasForThumbnail();return tr.asyncLoadImageFromBlob(e).then(function(t){if(null==t)return Yi._d("["+$e.dateStr(new Date)+"] ","imageEl is null","","","",""),Promise.reject("imageEl is null");try{n.normalizeImage(i,t.imageEl)}catch(e){return e instanceof Ra&&(e=e.val),t.release(),Yi._d("["+$e.dateStr(new Date)+"] ","failed to normalize Image",e,"","",""),Promise.reject("failed to normalize Image")}return t.release(),n.asyncCreateDummyFile(i)}).then(function(e){return new Un(e,i.width,i.height)})},asyncCreateVideoThumbnail:function(e){var t=this;Yi._d("["+$e.dateStr(new Date)+"] ","createVideoThumbnail","","","","");var n=this.createCanvasForThumbnail();return tr.asyncLoadVideoFromBlob(e).then(function(e){return null==e?Promise.reject("videoEl is null"):(t.captureVideo(n,e.videoEl),e.release(),t.asyncCreateDummyFile(n))}).then(function(e){return new Un(e,n.width,n.height)})},createCanvasForThumbnail:function(){var e=window.document.createElement("canvas");return e.width=600,e.height=600,e},captureVideo:function(e,t){var n=e.width,i=e.height,r=t.videoWidth,a=t.videoHeight;at.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null!=t&&null!=t.maxMessage){var n=t.maxMessage.id,i=e.messageId;null!=n&&null!=i&&n.high==i.high&&n.low==i.low&&(t.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(t))}},updateTalkStatusByTalkPushNotificationEvent:function(e,t){var n=this.dataStore.getTalkStatus(t.talkId);if(null==n){var i=this.dataStore.getTalk(t.talkId);if(null==i)return void Yi._e("["+$e.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new Rn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Vt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new Rn).id=e.id),null==t.talkOrderingTimestamp&&(t.talkOrderingTimestamp=e.updatedAt),this.dataStore.setTalkStatus(t),t},newTalkStatusByMessage:function(e){var t=this.dataStore.getTalkStatus(e.talkId);null==t&&((t=new Rn).id=e.talkId);var n,i=this.dataStore,r=e.userId;if(null!=i.me){var a=i.me.id;n=null!=a&&null!=r&&a.high==r.high&&a.low==r.low}else n=!1;return t.updateByMessage(e,n),this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&t.updateByMessageDeletion(e)&&this.dataStore.setTalkStatus(t),t},updateTalkStatus:function(e){var i=this;if(!et.exists(e.readUserIds,function(e){var t=i.dataStore;if(null==t.me)return!1;var n=t.me.id;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}))return null;var t=this.dataStore.getTalkStatus(e.talkId);return null==t?(Yi._e("["+$e.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null):(t.updateByMessageReadStatusesUpdate(e)&&this.dataStore.setTalkStatus(t),t)},newAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e.domainId);return null==t&&((t=new Ce).domainId=e.domainId),t.updateByAnnouncement(e),this.dataStore.setAnnouncementStatus(t),t},assureAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e);return null==t&&(t=this.dataFactory.newAnnouncementStatusForDomain(e)),t},__class__:or});var sr=function(){rr.call(this,"api")};(n["albero.proxy.AlberoServiceProxy"]=sr).__name__=["albero","proxy","AlberoServiceProxy"],sr.__super__=rr,sr.prototype=i(rr.prototype,{getOSString:function(){return"bot"},createAccessToken:function(e,t,n){var i,r,a=this,o=this.settings.getOs(),s=this.settings.getIDFV(),l=e.split("$");r=-1==e.indexOf("@")&&2==l.length?(i="create_access_token_by_id",[l[1],l[0],t,s,o,""]):(i="create_access_token",[e,t,s,o,""]),this.apiCaller.callImmediately(i,r,function(e){a.settings.setAccessToken(e),n(e)},function(e){a.sendNotification("Url",Ee.FORWARD(b.error))})},authorizeDevice:function(e,t){var n=this.settings.getIDFV();this.apiCaller.call("authorize_device",[e,n],function(e){t()})},createSession:function(e,i){var r=this,t=[e,"1.114"];this.apiCaller.onSessionClear(),this.apiCaller.callImmediatelyReliable("create_session",t,function(e){var t=new un(e),n=v.nowAsInt64();t.passwordExpiration.isExpired(n)?r.sendNotification("password_expiration_overed"):(t.passwordExpiration.needWarning(n,r.settings.getPasswordWarningSkipUntil())&&(r.settings.setPasswordWarningSkipUntil(v.oneDayAfterAsInt64()),r.sendNotification("password_expiration_warned")),r.apiCaller.onSessionCreated(),i(t),r.apiCaller.fireCallbacksWaitingForSession())},function(e){if(null!=e){if(401==e.code&&"expired password"==e.message)return void r.sendNotification("password_expiration_overed");if(401==e.code&&"deleted account"==e.message)return void r.sendNotification("SignOut");if(401==e.code&&"unauthorized device"==e.message)return void r.sendNotification("Device",z.AUTHORIZE);r.apiCaller.handleServerErrorDefault(e)}r.settings.clearAccessToken(),r.sendNotification("Url",Ee.FORWARD(b.error))},function(e){return r.shouldRetryCreateSession(e)?Sa.Some(r.apiCaller.retryTimeForReplicationLag()):Sa.None})},shouldRetryCreateSession:function(e){return 401==e.code&&"invalid token"==e.message},startNotification:function(){var t=this;this.apiCaller.call("start_notification",[],function(e){e||(t.dataStore.clear(!0),t.sendNotification("start_notification_failed"))})},resetNotification:function(e){this.apiCaller.call("reset_notification",[],e)},sendDomainNotifications:function(e){for(var t=0;t=i.length)){var e=i[r],t=n.id,o=this.dataFactory.newDummyMessage(t,e.type,e.content);this.sendNotification("create_message_start",o),this.apiCaller.call("create_message",[t,Ot.enumIndex(e.type),e.content],function(e){var t=a.dataFactory.newMessage(e);a.sendNotification("create_message_complete",[t,o.id]),a.forwardMessages(n,i,r+1),a.fileInfoStore.removeMessageFileInfos(o.id),a.messageStore.removeMessage(o.id)},function(e){if(a.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=Mr.toLocalError(Dt.SendingMessageConflicted,e);a.sendNotification("error_occurred",t)}else a.sendNotification("error_occurred",e)})}},deleteMessage:function(n,i){var r=this;this.apiCaller.call("delete_message",[n,i],function(e){var t=new Rt;t.talkId=n,t.messageId=i,r.sendNotification("notify_delete_message",t)},function(e){if(null!=e){if(403==e.code&&"frozen domain"==e.message)return void r.sendNotification("error_occurred",e);if(409==e.code&&"conflict"==e.message){var t=Mr.toLocalError(Dt.DeletingMessageConflicted,e);return void r.sendNotification("error_occurred",t)}r.sendNotification("error_occurred",e)}})},updateReadStatuses:function(r,a){var o=this;this.apiCaller.callApiReliable("update_read_statuses",[r,a],function(e){var t,n=o.dataStore.getTalkStatus(r);if(null!=n){var i=n.maxReadMessageId;t=null!=i&&null!=a&&i.high==a.high&&i.low==a.low}else t=!1;t&&o.sendNotification("notify_update_local_talk_status",n)},null,function(e){return 429==e.code&&"too many requests"==e.message?Sa.Some(1e3*o.asInt(e.detail.retry_after)):Sa.None})},upload:function(t,n,i,r){var a=this,e=ti.getBlobFromUpdatableFile(i);this.fileService.asyncCreateThumbnail(e).catch(function(e){return null}).then(function(e){return{file:i,thumb:e}}).then(function(e){a.uploadV2(t,n,e,r)})},uploadV2:function(e,t,n,i){var r=this,a=this.dataFactory.newDummyFileMessage(t,n);this.sendNotification("create_message_start",a);var o=this.prepareMessageFileAsync(n.file,n.thumb,e);o.then(function(e){r.createMessageReliable(t,Mt.file,e,a,i)}),o.catch(function(e){r.sendNotification("create_message_fail",[e,a],i)})},uploadForHubot:function(e,t,n){var i=this.dataStore.getTalk(e),r={file:t,thumb:null};if(null==i){var a=this.dataFactory.newDummyFileMessage(e,r),o={code:400,message:"invalid talk_id (deleted talk)"};return Yi._w("["+$e.dateStr(new Date)+"] ","WARNING method: upload",o,"","",""),void this.sendNotification("create_message_fail",[o,a],n)}this.uploadV2(i.domainId,i.id,r,n)},uploadMulti:function(n,i,r,e,a){var o=this,t=e.map(function(t){var e=ti.getBlobFromUpdatableFile(t);return o.fileService.asyncCreateThumbnail(e).catch(function(e){return null}).then(function(e){return{file:t,thumb:e}})});Promise.all(t).then(function(e){var t=e.map(function(e){return e});o.uploadMultiV2(n,i,r,t,a)})},uploadMultiV2:function(n,i,r,a,o){var s=this,l=this.dataFactory.newDummyMultipleFileMessage(i,r,a);this.sendNotification("create_message_start",l);for(var e=Promise.resolve([]),t=0;te.version)return r;var a=this.accountControlRequests;return null!=po[n]?a.setReserved(n,e):a.h[n]=e,this.storage.setDirtyFlag(),e},removeAccountControlRequest:function(e){var t="_"+e.high+"_"+e.low;this.accountControlRequests.remove(t),this.storage.setDirtyFlag()},removeAccountControlRequests:function(){this.accountControlRequests=new Ta,this.storage.setDirtyFlag()},getAccountControlGroup:function(){return this.accountControlGroup},setAccountControlGroup:function(e){return this.accountControlGroup=e,this.storage.setDirtyFlag(),this.accountControlGroup},updateAccountControlGroup:function(e){if(null!=this.accountControlGroup){var t=this.accountControlGroup.id,n=e.id;if(null!=t&&null!=n&&t.high==n.high&&t.low==n.low){var i=e.group;null!=i&&this.accountControlGroup.group.version>>31,t.low<<1);if(63,u=new zn(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new zn(0,0);if(u.high==h.high&&u.low==h.low)break;var d=sa.ucompare(n.high,t.high);if(0<=(0!=d?d:sa.ucompare(n.low,t.low))){l=new zn(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(sa.ucompare(n.low,t.low)<0){f--;f|=0}n=new zn(f,m)}63,u=new zn(u.high>>>1,u.high<<31|u.low>>>1);63,t=new zn(t.high>>>1,t.high<<31|t.low>>>1)}if(i){var p=~l.high,g=-l.low;if(0==g){p++;p|=0}l=new zn(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new zn(v,y)}return{quotient:l,modulus:n}};var ua=function(){};(n["haxe.Int64Helper"]=ua).__name__=["haxe","Int64Helper"],ua.parseString=function(e){var t=new zn(0,10),n=new zn(0,0),i=new zn(0,1),r=!1,a=K.trim(e);"-"==a.charAt(0)&&(r=!0,a=a.substring(1,a.length));for(var o=a.length,s=0,l=o;s>31,c);if(r){var h=65535&i.low,d=i.low>>>16,f=65535&_.low,m=_.low>>>16,p=sa._mul(h,f),g=sa._mul(d,f),v=sa._mul(h,m),y=p,S=(sa._mul(d,m)+(v>>>16)|0)+(g>>>16)|0;if(y=y+(v<<=16)|0,sa.ucompare(y,v)<0){S++;S|=0}if(y=y+(g<<=16)|0,sa.ucompare(y,g)<0){S++;S|=0}S=S+(sa._mul(i.low,_.high)+sa._mul(i.high,_.low)|0)|0;var w=new zn(S,y),T=n.high-w.high|0,I=n.low-w.low|0;if(sa.ucompare(n.low,w.low)<0){T--;T|=0}if(!((n=new zn(T,I)).high<0))throw new Ra("NumberFormatError: Underflow")}else{var E=65535&i.low,N=i.low>>>16,A=65535&_.low,b=_.low>>>16,D=sa._mul(E,A),k=sa._mul(N,A),C=sa._mul(E,b),O=D,M=(sa._mul(N,b)+(C>>>16)|0)+(k>>>16)|0;if(O=O+(C<<=16)|0,sa.ucompare(O,C)<0){M++;M|=0}if(O=O+(k<<=16)|0,sa.ucompare(O,k)<0){M++;M|=0}M=M+(sa._mul(i.low,_.high)+sa._mul(i.high,_.low)|0)|0;var R=new zn(M,O),F=n.high+R.high|0,x=n.low+R.low|0;if(sa.ucompare(x,n.low)<0){F++;F|=0}if((n=new zn(F,x)).high<0)throw new Ra("NumberFormatError: Overflow")}var U=65535&i.low,P=i.low>>>16,L=65535&t.low,B=t.low>>>16,H=sa._mul(U,L),Y=sa._mul(P,L),z=sa._mul(U,B),G=H,j=(sa._mul(P,B)+(z>>>16)|0)+(Y>>>16)|0;if(G=G+(z<<=16)|0,sa.ucompare(G,z)<0){j++;j|=0}if(G=G+(Y<<=16)|0,sa.ucompare(G,Y)<0){j++;j|=0}j=j+(sa._mul(i.low,t.high)+sa._mul(i.high,t.low)|0)|0,i=new zn(j,G)}return n};var ca=function(){this.buf=new T,this.cache=[],this.useCache=ca.USE_CACHE,this.useEnumIndex=ca.USE_ENUM_INDEX,this.shash=new Ta,this.scount=0};(n["haxe.Serializer"]=ca).__name__=["haxe","Serializer"],ca.run=function(e){var t=new ca;return t.serialize(e),t.toString()},ca.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=po[e]?t.getReserved(e):t.h[e];if(null!=n)return this.buf.b+="R",void(this.buf.b+=null==n?"null":""+n);var i=this.shash,r=this.scount++;null!=po[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=j.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n>2]),this.buf.b+=String.fromCharCode(b[63&(M<<4|R>>4)]),this.buf.b+=String.fromCharCode(b[63&(R<<2|F>>6)]),this.buf.b+=String.fromCharCode(b[63&F])}if(N==A){var x=E.b[N++],U=E.b[N++];this.buf.b+=String.fromCharCode(b[x>>2]),this.buf.b+=String.fromCharCode(b[63&(x<<4|U>>4)]),this.buf.b+=String.fromCharCode(b[U<<2&63])}else if(N==1+A){var P=E.b[N++];this.buf.b+=String.fromCharCode(b[P>>2]),this.buf.b+=String.fromCharCode(b[P<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var L=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=j.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=j.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=j.string(B-2);for(var H=2,Y=B;H=this.length)throw new Ra("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new Ra("Invalid object key");var n=this.unserialize();e[t]=n}this.pos++},unserializeEnum:function(e,t){if(58!=this.buf.charCodeAt(this.pos++))throw new Ra("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new Ra("Invalid string reference");return this.scache[u];case 97:this.buf;var c=[];for(this.cache.push(c);;){var _=this.buf.charCodeAt(this.pos);if(104==_){this.pos++;break}if(117==_){this.pos++;var h=this.readDigits();c[c.length+h-1]=null}else c.push(this.unserialize())}return c;case 98:var d=new Ta;this.cache.push(d);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=po[f]?d.setReserved(f,m):d.h[f]=m}return this.pos++,d;case 99:var p=this.unserialize(),g=this.resolver.resolveClass(p);if(null==g)throw new Ra("Class not found "+p);var v=ee.createEmptyInstance(g);return this.cache.push(v),this.unserializeObject(v),v;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:var y=this.unserialize(),S=this.resolver.resolveEnum(y);if(null==S)throw new Ra("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new Ra("Unknown enum index "+y+"@"+w);var I=this.unserializeEnum(S,T);return this.cache.push(I),I;case 107:return NaN;case 108:var E=new $;this.cache.push(E);for(this.buf;104!=this.buf.charCodeAt(this.pos);)E.add(this.unserialize());return this.pos++,E;case 109:return-1/0;case 110:return null;case 111:var N={};return this.cache.push(N),this.unserializeObject(N),N;case 112:return 1/0;case 113:var A=new va;this.cache.push(A);this.buf;for(var b=this.buf.charCodeAt(this.pos++);58==b;){var D=this.readDigits(),k=this.unserialize();A.h[D]=k,b=this.buf.charCodeAt(this.pos++)}if(104!=b)throw new Ra("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new Ra("Invalid reference");return this.cache[C];case 115:var O=this.readDigits(),M=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(2<=x?x-1:0))),L=0;F>4);var Y=R[M.charCodeAt(F++)];P.b[L++]=255&(H<<4|Y>>2);var z=R[M.charCodeAt(F++)];P.b[L++]=255&(Y<<6|z)}if(2<=x){var G=R[M.charCodeAt(F++)],j=R[M.charCodeAt(F++)];if(P.b[L++]=255&(G<<2|j>>4),3==x){var K=R[M.charCodeAt(F++)];P.b[L++]=255&(j<<4|K>>2)}}return this.pos+=O,this.cache.push(P),P;case 116:return!0;case 118:var W;if(48<=this.buf.charCodeAt(this.pos)&&this.buf.charCodeAt(this.pos)<=57&&48<=this.buf.charCodeAt(this.pos+1)&&this.buf.charCodeAt(this.pos+1)<=57&&48<=this.buf.charCodeAt(this.pos+2)&&this.buf.charCodeAt(this.pos+2)<=57&&48<=this.buf.charCodeAt(this.pos+3)&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4))W=$e.strDate($e.substr(this.buf,this.pos,19)),this.pos+=19;else{var V=this.readFloat();W=new Date(V)}return this.cache.push(W),W;case 119:var q=this.unserialize(),Q=this.resolver.resolveEnum(q);if(null==Q)throw new Ra("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw Ra.wrap(this.unserialize());case 121:var X=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos=(null==s?0:s._height)?new ma(e.left,e.key,e.value,new ma(e.right,t,n,i)):new ma(new ma(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new ma(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new ma(new ma(e,t,n,i.left),i.key,i.value,i.right):new ma(new ma(e,t,n,i.left.left),i.left.key,i.left.value,new ma(i.left.right,i.key,i.value,i.right))}return new ma(e,t,n,i,(a(null==s?0:s._height)){var l=this.left;a=null==l?0:l._height}else{var u=this.right;a=null==u?0:u._height}this._height=a+1}else this._height=r};(n["haxe.ds.TreeNode"]=ma).__name__=["haxe","ds","TreeNode"],ma.prototype={__class__:ma};var pa=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};pa.Left=function(e){var t=["Left",0,e];return t.__enum__=pa,t.toString=o,t},pa.Right=function(e){var t=["Right",1,e];return t.__enum__=pa,t.toString=o,t},pa.__empty_constructs__=[];var ga=function(){fa.call(this)};(n["haxe.ds.EnumValueMap"]=ga).__name__=["haxe","ds","EnumValueMap"],ga.__interfaces__=[oa],ga.__super__=fa,ga.prototype=i(fa.prototype,{compare:function(e,t){var n=e[1]-t[1];if(0!=n)return n;var i=e.slice(2),r=t.slice(2);return 0==i.length&&0==r.length?0:this.compareArgs(i,r)},compareArgs:function(e,t){var n=e.length-t.length;if(0!=n)return n;for(var i=0,r=e.length;i>6):(i<=65535?t.push(224|i>>12):(t.push(240|i>>18),t.push(128|i>>12&63)),t.push(128|i>>6&63)),t.push(128|63&i))}return new Ia(new vo(t).buffer)},Ia.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Ia(e)},Ia.fastGet=function(e,t){return e.bytes[t]},Ia.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new Ra(Ca.OutsideBounds);for(var n="",i=this.b,r=String.fromCharCode,a=e,o=e+t;a>10)),n+=r(1023&l|56320)}}return n},toString:function(){return this.getString(0,this.length)},__class__:Ia};function Ea(){this.b=[]}(n["haxe.io.BytesBuffer"]=Ea).__name__=["haxe","io","BytesBuffer"],Ea.prototype={getBytes:function(){var e=new Ia(new vo(this.b).buffer);return this.b=null,e},__class__:Ea};function Na(){}(n["haxe.io.Input"]=Na).__name__=["haxe","io","Input"],Na.prototype={readByte:function(){throw new Ra("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new Ra(Ca.OutsideBounds);try{for(;0e.length)throw new Ra(Ca.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=Aa).__name__=["haxe","io","BytesInput"],Aa.__super__=Na,Aa.prototype=i(Na.prototype,{readByte:function(){if(0==this.len)throw new Ra(new ka);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new Ra(Ca.OutsideBounds);if(0==this.len&&0e.length)throw new Ra(Ca.OutsideBounds);for(var i=e.b,r=n;0>8),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8))},writeInt32:function(e){this.bigEndian?(this.writeByte(e>>>24),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8&255),this.writeByte(e>>16&255),this.writeByte(e>>>24))},__class__:ba};function Da(){this.b=new Ea}(n["haxe.io.BytesOutput"]=Da).__name__=["haxe","io","BytesOutput"],Da.__super__=ba,Da.prototype=i(ba.prototype,{writeByte:function(e){this.b.b.push(e)},writeBytes:function(e,t,n){var i=this.b;if(t<0||n<0||t+n>e.length)throw new Ra(Ca.OutsideBounds);i.b;for(var r=e.b,a=t,o=t+n;a>>23&255,n=8388607&e;return 0==n&&0==t?0:(1-(e>>>31<<1))*(1+Math.pow(2,-23)*n)*Math.pow(2,t-127)},Oa.floatToI32=function(e){if(0==e)return 0;var t=e<0?-e:e,n=Math.floor(Math.log(t)/.6931471805599453);n<-127?n=-127:128>20&2047)-1023,i=4294967296*(1048575&t)+2147483648*(e>>>31)+(2147483647&e);return 0==i&&-1023==n?0:(1-(t>>>31<<1))*(1+Math.pow(2,-52)*i)*Math.pow(2,n)},Oa.doubleToI64=function(e){var t=Oa.i64tmp;if(0==e)t.low=0,t.high=0;else if(isFinite(e)){var n=e<0?-e:e,i=Math.floor(Math.log(n)/.6931471805599453),r=Math.round(4503599627370496*(n/Math.pow(2,i)-1)),a=0|r,o=r/4294967296|0;t.low=a,t.high=(e<0?-2147483648:0)|i+1023<<20|o}else 0";var n=typeof e;switch("function"==n&&(e.__name__||e.__ename__)&&(n="object"),n){case"function":return"";case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];var i=e[0]+"(";t+="\t";for(var r=2,a=e.length;rthis.byteLength)throw new Ra("set() outside of range");for(var i=0,r=e.byteLength;ithis.byteLength)throw new Ra("set() outside of range");for(var s=0,l=o.length;sn&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},to.prototype.once=function(e,t){if(!no(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},to.prototype.removeListener=function(e,t){var n,i,r,a;if(!no(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=(n=this._events[e]).length,i=-1,n===t||no(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(io(n)){for(a=r;0>>16)<<16|0)|0},ca.USE_CACHE=!1,ca.USE_ENUM_INDEX=!1,ca.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",da.DEFAULT_RESOLVER=new ha,da.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",ya.count=0,Oa.i64tmp=new zn(0,0),Fa.__toStr={}.toString,Pa.BYTES_PER_ELEMENT=1,Ba.FLOAT_SINGLE_MIN=1401298464324817e-60,Ba.FLOAT_SINGLE_MAX=34028234663852886e22,Ba.FLOAT_DOUBLE_MIN=5e-324,Ba.FLOAT_DOUBLE_MAX=17976931348623157e292,r.main()}("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this); \ No newline at end of file diff --git a/package.json b/package.json index ab4bc76..5e9f1b5 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,12 @@ { "name": "direct-js", - "version": "1.111.6", + "version": "1.114.8", "description": "Low-level javascript library for direct", "main": "./lib/direct-node.min.js", + "engines": { + "node": ">=12", + "npm": ">=7" + }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" },