mario-core 2.0.32-release → 2.0.33-release
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Dashboard-BIhv8car.js +1 -0
- package/dist/Dashboard-BY5BVLIW.mjs +206 -0
- package/dist/Dashboard-BYXh-LYm.mjs +206 -0
- package/dist/Dashboard-Bp0ko4Nx.js +1 -0
- package/dist/Dashboard-BxX4EZkL.mjs +206 -0
- package/dist/Dashboard-CLvLdCvD.mjs +206 -0
- package/dist/Dashboard-CjDPZlwI.js +1 -0
- package/dist/Dashboard-D4yeROnn.mjs +206 -0
- package/dist/Dashboard-D6igZd4M.js +1 -0
- package/dist/Dashboard-D7X8bg8t.mjs +206 -0
- package/dist/Dashboard-DRaSlZLc.js +1 -0
- package/dist/Dashboard-DbI4E9od.js +1 -0
- package/dist/EmailTemplateDetail-B-Kab5TK.mjs +443 -0
- package/dist/EmailTemplateDetail-BJGaN7uh.js +1 -0
- package/dist/EmailTemplateDetail-BOqn4rkr.mjs +417 -0
- package/dist/EmailTemplateDetail-BlhCa_EF.mjs +443 -0
- package/dist/EmailTemplateDetail-CW0ymDWF.mjs +443 -0
- package/dist/EmailTemplateDetail-CZKvX-_q.js +1 -0
- package/dist/EmailTemplateDetail-D4EupjNO.js +1 -0
- package/dist/EmailTemplateDetail-DDbJbMWn.js +1 -0
- package/dist/EmailTemplateDetail-DP04M6QH.js +1 -0
- package/dist/EmailTemplateDetail-DSeAyn-F.mjs +443 -0
- package/dist/EmailTemplateDetail-J5R0X631.mjs +443 -0
- package/dist/EmailTemplateDetail-c2RcFzG5.js +1 -0
- package/dist/EmailTemplateList-BAVOo58z.js +1 -0
- package/dist/EmailTemplateList-BMCpm7sf.js +1 -0
- package/dist/EmailTemplateList-BQCcXdif.mjs +170 -0
- package/dist/EmailTemplateList-BVB1lsW7.mjs +170 -0
- package/dist/EmailTemplateList-BVfQCPzA.js +1 -0
- package/dist/EmailTemplateList-C-aj1Pl0.mjs +170 -0
- package/dist/EmailTemplateList-C5c2T4_M.mjs +170 -0
- package/dist/EmailTemplateList-D3G-A7Jo.js +1 -0
- package/dist/EmailTemplateList-DPQTaV4-.js +1 -0
- package/dist/EmailTemplateList-JRLV6pZW.mjs +170 -0
- package/dist/EmailTemplateList-ZTs0DmjS.js +1 -0
- package/dist/EmailTemplateList-gwkheOgx.mjs +168 -0
- package/dist/GalleryList-BU1m_MP_.js +1 -0
- package/dist/GalleryList-BftIdfu8.js +1 -0
- package/dist/GalleryList-Bl4FojYJ.mjs +329 -0
- package/dist/GalleryList-ByJ1_7Qx.mjs +329 -0
- package/dist/GalleryList-CVzc1xGW.js +1 -0
- package/dist/GalleryList-D5E7p3kE.mjs +329 -0
- package/dist/GalleryList-D5ZydfSV.js +1 -0
- package/dist/GalleryList-DHblERzG.js +1 -0
- package/dist/GalleryList-DXnU-Aou.mjs +329 -0
- package/dist/GalleryList-DpM906eg.mjs +329 -0
- package/dist/GalleryList-ZJ_mdpVZ.js +1 -0
- package/dist/GalleryList-oJNXivHy.mjs +329 -0
- package/dist/Login-A2cXwovI.mjs +1380 -0
- package/dist/Login-B69XhtIm.mjs +1380 -0
- package/dist/Login-BLyikyni.mjs +1380 -0
- package/dist/Login-Bwr0h4GC.js +1 -0
- package/dist/Login-C12Whvdx.js +1 -0
- package/dist/Login-CIcbHD7-.mjs +1380 -0
- package/dist/Login-D7gUoYyV.js +1 -0
- package/dist/Login-DEMe7ra6.js +1 -0
- package/dist/Login-Dcwb-HaZ.js +1 -0
- package/dist/Login-Rwbmk--s.js +1 -0
- package/dist/Login-h3o1lUKK.mjs +1380 -0
- package/dist/Login-xn2j4Jqq.mjs +1380 -0
- package/dist/NotificationList--DZcYUS5.js +2 -0
- package/dist/NotificationList-D26jJ6Wc.mjs +3969 -0
- package/dist/NotificationList-DZ1epO3L.mjs +3969 -0
- package/dist/NotificationList-D_lGCmIS.js +2 -0
- package/dist/NotificationList-Da-pWu35.js +2 -0
- package/dist/NotificationList-Dogczlgr.mjs +3969 -0
- package/dist/NotificationList-Dv0JIP69.js +2 -0
- package/dist/NotificationList-DygQSzwE.mjs +3969 -0
- package/dist/NotificationList-Ku1m25fI.mjs +3969 -0
- package/dist/NotificationList-Ml4QiyAE.mjs +3969 -0
- package/dist/NotificationList-_AHdv4bs.js +2 -0
- package/dist/NotificationList-rKx7xooX.js +2 -0
- package/dist/SkillList-BUDiP8Ba.mjs +386 -0
- package/dist/SkillList-Btum0zIE.js +1 -0
- package/dist/SkillList-C-dw1122.js +1 -0
- package/dist/SkillList-C0ZfIxCl.js +1 -0
- package/dist/SkillList-CZTd0oz_.mjs +386 -0
- package/dist/SkillList-DPU-l8aA.js +1 -0
- package/dist/SkillList-DTxT0Hbn.js +1 -0
- package/dist/SkillList-DVXAACsz.mjs +386 -0
- package/dist/SkillList-DX530KHp.mjs +386 -0
- package/dist/SkillList-DahOq8Os.mjs +386 -0
- package/dist/SkillList-DivkFIrP.mjs +386 -0
- package/dist/SkillList-yosFFVsc.js +1 -0
- package/dist/TeacherSelector-5UVov2Wf.mjs +30 -0
- package/dist/TeacherSelector-Bi582rEx.mjs +30 -0
- package/dist/TeacherSelector-BmmfQxU8.js +1 -0
- package/dist/TeacherSelector-BngXAzRe.mjs +30 -0
- package/dist/TeacherSelector-C7-XuXfb.mjs +30 -0
- package/dist/TeacherSelector-C9Z5JX-P.js +1 -0
- package/dist/TeacherSelector-CZ1DrLUk.js +1 -0
- package/dist/TeacherSelector-CbJ1kPyV.js +1 -0
- package/dist/TeacherSelector-CkGdl96R.js +1 -0
- package/dist/TeacherSelector-CxDiVyno.mjs +30 -0
- package/dist/TeacherSelector-DomtJIQi.js +1 -0
- package/dist/TeacherSelector-mjBcHGJF.mjs +30 -0
- package/dist/TheContent-B42qwDUV.mjs +38 -0
- package/dist/TheContent-BW03X6oT.mjs +38 -0
- package/dist/TheContent-CayaQR9C.js +1 -0
- package/dist/TheContent-CiU0FBTA.mjs +38 -0
- package/dist/TheContent-D5Qx4QXe.js +1 -0
- package/dist/TheContent-DHWnB8WX.js +1 -0
- package/dist/TheContent-DPy5BFuN.js +1 -0
- package/dist/TheContent-Dl7_h11H.mjs +38 -0
- package/dist/TheContent-DxN9-GIu.mjs +38 -0
- package/dist/TheContent-H-Hg7kIq.js +1 -0
- package/dist/TheContent-aEfXKW_H.mjs +38 -0
- package/dist/TheContent-xUKaH5bl.js +1 -0
- package/dist/UserContainer-3dOz3yZF.js +5 -0
- package/dist/UserContainer-B-abn6--.js +5 -0
- package/dist/UserContainer-BIl8c0yJ.js +5 -0
- package/dist/UserContainer-BjYrV0kt.mjs +2783 -0
- package/dist/UserContainer-BoJ73Ko9.js +5 -0
- package/dist/UserContainer-CFnSfW2A.js +5 -0
- package/dist/UserContainer-CGlDCED1.mjs +2771 -0
- package/dist/UserContainer-CqTUtCe6.mjs +2770 -0
- package/dist/UserContainer-CtYpysOo.mjs +2771 -0
- package/dist/UserContainer-Cu6koTiw.mjs +2771 -0
- package/dist/UserContainer-Dz991Fto.mjs +2770 -0
- package/dist/UserContainer-d3ywqdWh.js +5 -0
- package/dist/UserDetail-BCLssfN6.mjs +902 -0
- package/dist/UserDetail-BRCOabYu.mjs +902 -0
- package/dist/UserDetail-BsWWKLof.js +1 -0
- package/dist/UserDetail-CkMU6eej.js +1 -0
- package/dist/UserDetail-Cl6y6AtA.js +1 -0
- package/dist/UserDetail-CqBaMe5l.mjs +902 -0
- package/dist/UserDetail-D36q7Em-.mjs +902 -0
- package/dist/UserDetail-DFjYZZOc.js +1 -0
- package/dist/UserDetail-DIGlXdot.mjs +914 -0
- package/dist/UserDetail-DizNdqsR.mjs +902 -0
- package/dist/UserDetail-DwNEJ0kC.js +1 -0
- package/dist/UserDetail-Wn1wTs2Z.js +1 -0
- package/dist/UserList-4XLAsuI5.mjs +1205 -0
- package/dist/UserList-B9_Ok-O-.js +5 -0
- package/dist/UserList-BAirPxDM.js +7 -0
- package/dist/UserList-BFRsUwHp.js +5 -0
- package/dist/UserList-BgtFj_YA.mjs +1171 -0
- package/dist/UserList-BjEBqEMi.mjs +1205 -0
- package/dist/UserList-C6MCzl4Q.js +7 -0
- package/dist/UserList-CLDgmfZl.mjs +1171 -0
- package/dist/UserList-CRqA2Kvb.js +7 -0
- package/dist/UserList-D-5W9tzb.mjs +1205 -0
- package/dist/UserList-D63-z7TV.mjs +1205 -0
- package/dist/UserList-DX_DRp8l.js +7 -0
- package/dist/constants-1VW88-cg.mjs +320 -0
- package/dist/constants-B09dcc2W.js +1 -0
- package/dist/constants-BSg1aI4R.js +1 -0
- package/dist/constants-BXFDJA-1.js +1 -0
- package/dist/constants-BdoFiMvT.mjs +320 -0
- package/dist/constants-BrOUFw2c.js +1 -0
- package/dist/constants-ClfPwBI0.mjs +320 -0
- package/dist/constants-D3RqPPqz.mjs +320 -0
- package/dist/constants-D5ZWXomx.js +1 -0
- package/dist/constants-DiRwIQ5M.mjs +320 -0
- package/dist/constants-bWeajrBe.js +1 -0
- package/dist/constants-dgRR32rI.mjs +320 -0
- package/dist/containers/EmailTemplate/hooks/useEmailTemplateDetail.d.ts +1 -0
- package/dist/containers/User/constants/types.d.ts +1 -0
- package/dist/containers/User/hooks/useExportUsersCsv.d.ts +1 -0
- package/dist/index-B3Kqv7dj.mjs +17787 -0
- package/dist/index-BTWI5jDz.js +15 -0
- package/dist/index-C1gw45bw.mjs +17792 -0
- package/dist/index-CFAFmJ4F.mjs +17782 -0
- package/dist/index-D6pNkzlV.mjs +17787 -0
- package/dist/index-DDw_4X4u.js +15 -0
- package/dist/index-DVZt7HdB.js +15 -0
- package/dist/index-Di2zNE1O.mjs +17792 -0
- package/dist/index-DzHydV61.js +15 -0
- package/dist/index-Ihdym4EQ.js +15 -0
- package/dist/index-UpEZLqQV.js +15 -0
- package/dist/index-cuQPyXoT.mjs +17772 -0
- package/dist/index.js +1 -1
- package/dist/index.modern.js +1 -1
- package/dist/mailCategoryService-BbqIjbpT.mjs +11 -0
- package/dist/mailCategoryService-C1sorb9h.js +1 -0
- package/dist/mailCategoryService-CZ9m51K4.js +1 -0
- package/dist/mailCategoryService-C_Lq0Uks.mjs +11 -0
- package/dist/mailCategoryService-DcwLjTWD.mjs +11 -0
- package/dist/mailCategoryService-DexSxwen.js +1 -0
- package/dist/mailCategoryService-DrZXrEp2.js +1 -0
- package/dist/mailCategoryService-DyLMoDxP.mjs +11 -0
- package/dist/mailCategoryService-LumZqQLL.mjs +11 -0
- package/dist/mailCategoryService-MyMGdKSl.mjs +11 -0
- package/dist/mailCategoryService-Pl31B1JT.js +1 -0
- package/dist/mailCategoryService-lvLdr9b4.js +1 -0
- package/dist/mario-core.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("react/jsx-runtime"),he=require("reactstrap"),Mt=require("./index-DzHydV61.js"),le=require("react"),be=require("react-redux"),li=require("react-router-dom"),di=require("react-i18next");function pi(yt){return Mt.GenIcon({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M103.77,185.94C103.38,187.49,93.63,224,40,224a8,8,0,0,1-8-8c0-53.63,36.51-63.38,38.06-63.77a8,8,0,0,1,3.88,15.53c-.9.25-22.42,6.54-25.56,39.86C81.7,204.48,88,183,88.26,182a8,8,0,0,1,15.51,4Zm93-67.4L192,123.31v58.33A15.91,15.91,0,0,1,187.32,193L153,227.3A15.91,15.91,0,0,1,141.7,232a16.11,16.11,0,0,1-5.1-.83,15.94,15.94,0,0,1-10.78-12.92l-5.37-38.49L76.24,135.55l-38.47-5.37A16,16,0,0,1,28.7,103L63,68.68A15.91,15.91,0,0,1,74.36,64h58.33l4.77-4.77c26.68-26.67,58.83-27.82,71.41-27.07a16,16,0,0,1,15,15C224.6,59.71,223.45,91.86,196.78,118.54ZM40,114.34l37.15,5.18L116.69,80H74.36ZM91.32,128,128,164.68l57.45-57.45a76.46,76.46,0,0,0,22.42-59.16,76.65,76.65,0,0,0-59.11,22.47ZM176,139.31l-39.53,39.53L141.67,216,176,181.64Z"}}]})(yt)}const xi=[{value:!0,label:"Read"},{value:!1,label:"Unread"}],vi=({value:yt,onChange:$t})=>{const At={menu:rt=>({...rt,zIndex:10}),control:(rt,pt)=>({...rt,borderRadius:"24px",borderColor:(pt.isFocused,"#e5e7eb"),boxShadow:"none",minHeight:"42px","&:hover":{borderColor:"#e5e7eb"}}),valueContainer:rt=>({...rt,padding:"0 16px"}),indicatorSeparator:()=>({display:"none"}),dropdownIndicator:rt=>({...rt,padding:"0 12px 0 0",color:"#9ca3af"})};return K.jsx(Mt.CustomSelector,{defaultValue:yt,options:xi,onChange:$t,styles:At})},yi=le.memo(vi);function gi(yt){return yt&&yt.__esModule&&Object.prototype.hasOwnProperty.call(yt,"default")?yt.default:yt}var gn={exports:{}};var Un;function _i(){return Un||(Un=1,(function(yt,$t){(function(rt,pt){yt.exports=pt()})(window,function(){return(function(At){var rt={};function pt(S){if(rt[S])return rt[S].exports;var y=rt[S]={i:S,l:!1,exports:{}};return At[S].call(y.exports,y,y.exports,pt),y.l=!0,y.exports}return pt.m=At,pt.c=rt,pt.d=function(S,y,Pt){pt.o(S,y)||Object.defineProperty(S,y,{enumerable:!0,get:Pt})},pt.r=function(S){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(S,"__esModule",{value:!0})},pt.t=function(S,y){if(y&1&&(S=pt(S)),y&8||y&4&&typeof S=="object"&&S&&S.__esModule)return S;var Pt=Object.create(null);if(pt.r(Pt),Object.defineProperty(Pt,"default",{enumerable:!0,value:S}),y&2&&typeof S!="string")for(var ot in S)pt.d(Pt,ot,(function(Ht){return S[Ht]}).bind(null,ot));return Pt},pt.n=function(S){var y=S&&S.__esModule?function(){return S.default}:function(){return S};return pt.d(y,"a",y),y},pt.o=function(S,y){return Object.prototype.hasOwnProperty.call(S,y)},pt.p="",pt(pt.s=3)})([(function(At,rt,pt){var S=this&&this.__extends||(function(){var H=function(T,P){return H=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(V,D){V.__proto__=D}||function(V,D){for(var Ct in D)D.hasOwnProperty(Ct)&&(V[Ct]=D[Ct])},H(T,P)};return function(T,P){H(T,P);function V(){this.constructor=T}T.prototype=P===null?Object.create(P):(V.prototype=P.prototype,new V)}})();Object.defineProperty(rt,"__esModule",{value:!0});var y=256,Pt=(function(){function H(T){T===void 0&&(T="="),this._paddingCharacter=T}return H.prototype.encodedLength=function(T){return this._paddingCharacter?(T+2)/3*4|0:(T*8+5)/6|0},H.prototype.encode=function(T){for(var P="",V=0;V<T.length-2;V+=3){var D=T[V]<<16|T[V+1]<<8|T[V+2];P+=this._encodeByte(D>>>18&63),P+=this._encodeByte(D>>>12&63),P+=this._encodeByte(D>>>6&63),P+=this._encodeByte(D>>>0&63)}var Ct=T.length-V;if(Ct>0){var D=T[V]<<16|(Ct===2?T[V+1]<<8:0);P+=this._encodeByte(D>>>18&63),P+=this._encodeByte(D>>>12&63),Ct===2?P+=this._encodeByte(D>>>6&63):P+=this._paddingCharacter||"",P+=this._paddingCharacter||""}return P},H.prototype.maxDecodedLength=function(T){return this._paddingCharacter?T/4*3|0:(T*6+7)/8|0},H.prototype.decodedLength=function(T){return this.maxDecodedLength(T.length-this._getPaddingLength(T))},H.prototype.decode=function(T){if(T.length===0)return new Uint8Array(0);for(var P=this._getPaddingLength(T),V=T.length-P,D=new Uint8Array(this.maxDecodedLength(V)),Ct=0,ft=0,Ft=0,Xt=0,qt=0,Bt=0,It=0;ft<V-4;ft+=4)Xt=this._decodeChar(T.charCodeAt(ft+0)),qt=this._decodeChar(T.charCodeAt(ft+1)),Bt=this._decodeChar(T.charCodeAt(ft+2)),It=this._decodeChar(T.charCodeAt(ft+3)),D[Ct++]=Xt<<2|qt>>>4,D[Ct++]=qt<<4|Bt>>>2,D[Ct++]=Bt<<6|It,Ft|=Xt&y,Ft|=qt&y,Ft|=Bt&y,Ft|=It&y;if(ft<V-1&&(Xt=this._decodeChar(T.charCodeAt(ft)),qt=this._decodeChar(T.charCodeAt(ft+1)),D[Ct++]=Xt<<2|qt>>>4,Ft|=Xt&y,Ft|=qt&y),ft<V-2&&(Bt=this._decodeChar(T.charCodeAt(ft+2)),D[Ct++]=qt<<4|Bt>>>2,Ft|=Bt&y),ft<V-3&&(It=this._decodeChar(T.charCodeAt(ft+3)),D[Ct++]=Bt<<6|It,Ft|=It&y),Ft!==0)throw new Error("Base64Coder: incorrect characters for decoding");return D},H.prototype._encodeByte=function(T){var P=T;return P+=65,P+=25-T>>>8&6,P+=51-T>>>8&-75,P+=61-T>>>8&-15,P+=62-T>>>8&3,String.fromCharCode(P)},H.prototype._decodeChar=function(T){var P=y;return P+=(42-T&T-44)>>>8&-y+T-43+62,P+=(46-T&T-48)>>>8&-y+T-47+63,P+=(47-T&T-58)>>>8&-y+T-48+52,P+=(64-T&T-91)>>>8&-y+T-65+0,P+=(96-T&T-123)>>>8&-y+T-97+26,P},H.prototype._getPaddingLength=function(T){var P=0;if(this._paddingCharacter){for(var V=T.length-1;V>=0&&T[V]===this._paddingCharacter;V--)P++;if(T.length<4||P>2)throw new Error("Base64Coder: incorrect padding")}return P},H})();rt.Coder=Pt;var ot=new Pt;function Ht(H){return ot.encode(H)}rt.encode=Ht;function R(H){return ot.decode(H)}rt.decode=R;var ut=(function(H){S(T,H);function T(){return H!==null&&H.apply(this,arguments)||this}return T.prototype._encodeByte=function(P){var V=P;return V+=65,V+=25-P>>>8&6,V+=51-P>>>8&-75,V+=61-P>>>8&-13,V+=62-P>>>8&49,String.fromCharCode(V)},T.prototype._decodeChar=function(P){var V=y;return V+=(44-P&P-46)>>>8&-y+P-45+62,V+=(94-P&P-96)>>>8&-y+P-95+63,V+=(47-P&P-58)>>>8&-y+P-48+52,V+=(64-P&P-91)>>>8&-y+P-65+0,V+=(96-P&P-123)>>>8&-y+P-97+26,V},T})(Pt);rt.URLSafeCoder=ut;var tt=new ut;function $(H){return tt.encode(H)}rt.encodeURLSafe=$;function bt(H){return tt.decode(H)}rt.decodeURLSafe=bt,rt.encodedLength=function(H){return ot.encodedLength(H)},rt.maxDecodedLength=function(H){return ot.maxDecodedLength(H)},rt.decodedLength=function(H){return ot.decodedLength(H)}}),(function(At,rt,pt){Object.defineProperty(rt,"__esModule",{value:!0});var S="utf8: invalid string",y="utf8: invalid source encoding";function Pt(R){for(var ut=new Uint8Array(ot(R)),tt=0,$=0;$<R.length;$++){var bt=R.charCodeAt($);bt<128?ut[tt++]=bt:bt<2048?(ut[tt++]=192|bt>>6,ut[tt++]=128|bt&63):bt<55296?(ut[tt++]=224|bt>>12,ut[tt++]=128|bt>>6&63,ut[tt++]=128|bt&63):($++,bt=(bt&1023)<<10,bt|=R.charCodeAt($)&1023,bt+=65536,ut[tt++]=240|bt>>18,ut[tt++]=128|bt>>12&63,ut[tt++]=128|bt>>6&63,ut[tt++]=128|bt&63)}return ut}rt.encode=Pt;function ot(R){for(var ut=0,tt=0;tt<R.length;tt++){var $=R.charCodeAt(tt);if($<128)ut+=1;else if($<2048)ut+=2;else if($<55296)ut+=3;else if($<=57343){if(tt>=R.length-1)throw new Error(S);tt++,ut+=4}else throw new Error(S)}return ut}rt.encodedLength=ot;function Ht(R){for(var ut=[],tt=0;tt<R.length;tt++){var $=R[tt];if($&128){var bt=void 0;if($<224){if(tt>=R.length)throw new Error(y);var H=R[++tt];if((H&192)!==128)throw new Error(y);$=($&31)<<6|H&63,bt=128}else if($<240){if(tt>=R.length-1)throw new Error(y);var H=R[++tt],T=R[++tt];if((H&192)!==128||(T&192)!==128)throw new Error(y);$=($&15)<<12|(H&63)<<6|T&63,bt=2048}else if($<248){if(tt>=R.length-2)throw new Error(y);var H=R[++tt],T=R[++tt],P=R[++tt];if((H&192)!==128||(T&192)!==128||(P&192)!==128)throw new Error(y);$=($&15)<<18|(H&63)<<12|(T&63)<<6|P&63,bt=65536}else throw new Error(y);if($<bt||$>=55296&&$<=57343)throw new Error(y);if($>=65536){if($>1114111)throw new Error(y);$-=65536,ut.push(String.fromCharCode(55296|$>>10)),$=56320|$&1023}}ut.push(String.fromCharCode($))}return ut.join("")}rt.decode=Ht}),(function(At,rt,pt){(function(S){var y=function(o){var f,a=new Float64Array(16);if(o)for(f=0;f<o.length;f++)a[f]=o[f];return a},Pt=function(){throw new Error("no PRNG")},ot=new Uint8Array(16),Ht=new Uint8Array(32);Ht[0]=9;var R=y(),ut=y([1]),tt=y([56129,1]),$=y([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),bt=y([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),H=y([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),T=y([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),P=y([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function V(o,f,a,r){o[f]=a>>24&255,o[f+1]=a>>16&255,o[f+2]=a>>8&255,o[f+3]=a&255,o[f+4]=r>>24&255,o[f+5]=r>>16&255,o[f+6]=r>>8&255,o[f+7]=r&255}function D(o,f,a,r,c){var l,d=0;for(l=0;l<c;l++)d|=o[f+l]^a[r+l];return(1&d-1>>>8)-1}function Ct(o,f,a,r){return D(o,f,a,r,16)}function ft(o,f,a,r){return D(o,f,a,r,32)}function Ft(o,f,a,r){for(var c=r[0]&255|(r[1]&255)<<8|(r[2]&255)<<16|(r[3]&255)<<24,l=a[0]&255|(a[1]&255)<<8|(a[2]&255)<<16|(a[3]&255)<<24,d=a[4]&255|(a[5]&255)<<8|(a[6]&255)<<16|(a[7]&255)<<24,_=a[8]&255|(a[9]&255)<<8|(a[10]&255)<<16|(a[11]&255)<<24,C=a[12]&255|(a[13]&255)<<8|(a[14]&255)<<16|(a[15]&255)<<24,M=r[4]&255|(r[5]&255)<<8|(r[6]&255)<<16|(r[7]&255)<<24,O=f[0]&255|(f[1]&255)<<8|(f[2]&255)<<16|(f[3]&255)<<24,gt=f[4]&255|(f[5]&255)<<8|(f[6]&255)<<16|(f[7]&255)<<24,N=f[8]&255|(f[9]&255)<<8|(f[10]&255)<<16|(f[11]&255)<<24,J=f[12]&255|(f[13]&255)<<8|(f[14]&255)<<16|(f[15]&255)<<24,X=r[8]&255|(r[9]&255)<<8|(r[10]&255)<<16|(r[11]&255)<<24,Q=a[16]&255|(a[17]&255)<<8|(a[18]&255)<<16|(a[19]&255)<<24,F=a[20]&255|(a[21]&255)<<8|(a[22]&255)<<16|(a[23]&255)<<24,W=a[24]&255|(a[25]&255)<<8|(a[26]&255)<<16|(a[27]&255)<<24,Z=a[28]&255|(a[29]&255)<<8|(a[30]&255)<<16|(a[31]&255)<<24,G=r[12]&255|(r[13]&255)<<8|(r[14]&255)<<16|(r[15]&255)<<24,j=c,B=l,k=d,I=_,U=C,E=M,p=O,x=gt,m=N,g=J,b=X,w=Q,q=F,et=W,it=Z,nt=G,h,ct=0;ct<20;ct+=2)h=j+q|0,U^=h<<7|h>>>25,h=U+j|0,m^=h<<9|h>>>23,h=m+U|0,q^=h<<13|h>>>19,h=q+m|0,j^=h<<18|h>>>14,h=E+B|0,g^=h<<7|h>>>25,h=g+E|0,et^=h<<9|h>>>23,h=et+g|0,B^=h<<13|h>>>19,h=B+et|0,E^=h<<18|h>>>14,h=b+p|0,it^=h<<7|h>>>25,h=it+b|0,k^=h<<9|h>>>23,h=k+it|0,p^=h<<13|h>>>19,h=p+k|0,b^=h<<18|h>>>14,h=nt+w|0,I^=h<<7|h>>>25,h=I+nt|0,x^=h<<9|h>>>23,h=x+I|0,w^=h<<13|h>>>19,h=w+x|0,nt^=h<<18|h>>>14,h=j+I|0,B^=h<<7|h>>>25,h=B+j|0,k^=h<<9|h>>>23,h=k+B|0,I^=h<<13|h>>>19,h=I+k|0,j^=h<<18|h>>>14,h=E+U|0,p^=h<<7|h>>>25,h=p+E|0,x^=h<<9|h>>>23,h=x+p|0,U^=h<<13|h>>>19,h=U+x|0,E^=h<<18|h>>>14,h=b+g|0,w^=h<<7|h>>>25,h=w+b|0,m^=h<<9|h>>>23,h=m+w|0,g^=h<<13|h>>>19,h=g+m|0,b^=h<<18|h>>>14,h=nt+it|0,q^=h<<7|h>>>25,h=q+nt|0,et^=h<<9|h>>>23,h=et+q|0,it^=h<<13|h>>>19,h=it+et|0,nt^=h<<18|h>>>14;j=j+c|0,B=B+l|0,k=k+d|0,I=I+_|0,U=U+C|0,E=E+M|0,p=p+O|0,x=x+gt|0,m=m+N|0,g=g+J|0,b=b+X|0,w=w+Q|0,q=q+F|0,et=et+W|0,it=it+Z|0,nt=nt+G|0,o[0]=j>>>0&255,o[1]=j>>>8&255,o[2]=j>>>16&255,o[3]=j>>>24&255,o[4]=B>>>0&255,o[5]=B>>>8&255,o[6]=B>>>16&255,o[7]=B>>>24&255,o[8]=k>>>0&255,o[9]=k>>>8&255,o[10]=k>>>16&255,o[11]=k>>>24&255,o[12]=I>>>0&255,o[13]=I>>>8&255,o[14]=I>>>16&255,o[15]=I>>>24&255,o[16]=U>>>0&255,o[17]=U>>>8&255,o[18]=U>>>16&255,o[19]=U>>>24&255,o[20]=E>>>0&255,o[21]=E>>>8&255,o[22]=E>>>16&255,o[23]=E>>>24&255,o[24]=p>>>0&255,o[25]=p>>>8&255,o[26]=p>>>16&255,o[27]=p>>>24&255,o[28]=x>>>0&255,o[29]=x>>>8&255,o[30]=x>>>16&255,o[31]=x>>>24&255,o[32]=m>>>0&255,o[33]=m>>>8&255,o[34]=m>>>16&255,o[35]=m>>>24&255,o[36]=g>>>0&255,o[37]=g>>>8&255,o[38]=g>>>16&255,o[39]=g>>>24&255,o[40]=b>>>0&255,o[41]=b>>>8&255,o[42]=b>>>16&255,o[43]=b>>>24&255,o[44]=w>>>0&255,o[45]=w>>>8&255,o[46]=w>>>16&255,o[47]=w>>>24&255,o[48]=q>>>0&255,o[49]=q>>>8&255,o[50]=q>>>16&255,o[51]=q>>>24&255,o[52]=et>>>0&255,o[53]=et>>>8&255,o[54]=et>>>16&255,o[55]=et>>>24&255,o[56]=it>>>0&255,o[57]=it>>>8&255,o[58]=it>>>16&255,o[59]=it>>>24&255,o[60]=nt>>>0&255,o[61]=nt>>>8&255,o[62]=nt>>>16&255,o[63]=nt>>>24&255}function Xt(o,f,a,r){for(var c=r[0]&255|(r[1]&255)<<8|(r[2]&255)<<16|(r[3]&255)<<24,l=a[0]&255|(a[1]&255)<<8|(a[2]&255)<<16|(a[3]&255)<<24,d=a[4]&255|(a[5]&255)<<8|(a[6]&255)<<16|(a[7]&255)<<24,_=a[8]&255|(a[9]&255)<<8|(a[10]&255)<<16|(a[11]&255)<<24,C=a[12]&255|(a[13]&255)<<8|(a[14]&255)<<16|(a[15]&255)<<24,M=r[4]&255|(r[5]&255)<<8|(r[6]&255)<<16|(r[7]&255)<<24,O=f[0]&255|(f[1]&255)<<8|(f[2]&255)<<16|(f[3]&255)<<24,gt=f[4]&255|(f[5]&255)<<8|(f[6]&255)<<16|(f[7]&255)<<24,N=f[8]&255|(f[9]&255)<<8|(f[10]&255)<<16|(f[11]&255)<<24,J=f[12]&255|(f[13]&255)<<8|(f[14]&255)<<16|(f[15]&255)<<24,X=r[8]&255|(r[9]&255)<<8|(r[10]&255)<<16|(r[11]&255)<<24,Q=a[16]&255|(a[17]&255)<<8|(a[18]&255)<<16|(a[19]&255)<<24,F=a[20]&255|(a[21]&255)<<8|(a[22]&255)<<16|(a[23]&255)<<24,W=a[24]&255|(a[25]&255)<<8|(a[26]&255)<<16|(a[27]&255)<<24,Z=a[28]&255|(a[29]&255)<<8|(a[30]&255)<<16|(a[31]&255)<<24,G=r[12]&255|(r[13]&255)<<8|(r[14]&255)<<16|(r[15]&255)<<24,j=c,B=l,k=d,I=_,U=C,E=M,p=O,x=gt,m=N,g=J,b=X,w=Q,q=F,et=W,it=Z,nt=G,h,ct=0;ct<20;ct+=2)h=j+q|0,U^=h<<7|h>>>25,h=U+j|0,m^=h<<9|h>>>23,h=m+U|0,q^=h<<13|h>>>19,h=q+m|0,j^=h<<18|h>>>14,h=E+B|0,g^=h<<7|h>>>25,h=g+E|0,et^=h<<9|h>>>23,h=et+g|0,B^=h<<13|h>>>19,h=B+et|0,E^=h<<18|h>>>14,h=b+p|0,it^=h<<7|h>>>25,h=it+b|0,k^=h<<9|h>>>23,h=k+it|0,p^=h<<13|h>>>19,h=p+k|0,b^=h<<18|h>>>14,h=nt+w|0,I^=h<<7|h>>>25,h=I+nt|0,x^=h<<9|h>>>23,h=x+I|0,w^=h<<13|h>>>19,h=w+x|0,nt^=h<<18|h>>>14,h=j+I|0,B^=h<<7|h>>>25,h=B+j|0,k^=h<<9|h>>>23,h=k+B|0,I^=h<<13|h>>>19,h=I+k|0,j^=h<<18|h>>>14,h=E+U|0,p^=h<<7|h>>>25,h=p+E|0,x^=h<<9|h>>>23,h=x+p|0,U^=h<<13|h>>>19,h=U+x|0,E^=h<<18|h>>>14,h=b+g|0,w^=h<<7|h>>>25,h=w+b|0,m^=h<<9|h>>>23,h=m+w|0,g^=h<<13|h>>>19,h=g+m|0,b^=h<<18|h>>>14,h=nt+it|0,q^=h<<7|h>>>25,h=q+nt|0,et^=h<<9|h>>>23,h=et+q|0,it^=h<<13|h>>>19,h=it+et|0,nt^=h<<18|h>>>14;o[0]=j>>>0&255,o[1]=j>>>8&255,o[2]=j>>>16&255,o[3]=j>>>24&255,o[4]=E>>>0&255,o[5]=E>>>8&255,o[6]=E>>>16&255,o[7]=E>>>24&255,o[8]=b>>>0&255,o[9]=b>>>8&255,o[10]=b>>>16&255,o[11]=b>>>24&255,o[12]=nt>>>0&255,o[13]=nt>>>8&255,o[14]=nt>>>16&255,o[15]=nt>>>24&255,o[16]=p>>>0&255,o[17]=p>>>8&255,o[18]=p>>>16&255,o[19]=p>>>24&255,o[20]=x>>>0&255,o[21]=x>>>8&255,o[22]=x>>>16&255,o[23]=x>>>24&255,o[24]=m>>>0&255,o[25]=m>>>8&255,o[26]=m>>>16&255,o[27]=m>>>24&255,o[28]=g>>>0&255,o[29]=g>>>8&255,o[30]=g>>>16&255,o[31]=g>>>24&255}function qt(o,f,a,r){Ft(o,f,a,r)}function Bt(o,f,a,r){Xt(o,f,a,r)}var It=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function Xe(o,f,a,r,c,l,d){var _=new Uint8Array(16),C=new Uint8Array(64),M,O;for(O=0;O<16;O++)_[O]=0;for(O=0;O<8;O++)_[O]=l[O];for(;c>=64;){for(qt(C,_,d,It),O=0;O<64;O++)o[f+O]=a[r+O]^C[O];for(M=1,O=8;O<16;O++)M=M+(_[O]&255)|0,_[O]=M&255,M>>>=8;c-=64,f+=64,r+=64}if(c>0)for(qt(C,_,d,It),O=0;O<c;O++)o[f+O]=a[r+O]^C[O];return 0}function We(o,f,a,r,c){var l=new Uint8Array(16),d=new Uint8Array(64),_,C;for(C=0;C<16;C++)l[C]=0;for(C=0;C<8;C++)l[C]=r[C];for(;a>=64;){for(qt(d,l,c,It),C=0;C<64;C++)o[f+C]=d[C];for(_=1,C=8;C<16;C++)_=_+(l[C]&255)|0,l[C]=_&255,_>>>=8;a-=64,f+=64}if(a>0)for(qt(d,l,c,It),C=0;C<a;C++)o[f+C]=d[C];return 0}function Ge(o,f,a,r,c){var l=new Uint8Array(32);Bt(l,r,c,It);for(var d=new Uint8Array(8),_=0;_<8;_++)d[_]=r[_+16];return We(o,f,a,d,l)}function ee(o,f,a,r,c,l,d){var _=new Uint8Array(32);Bt(_,l,d,It);for(var C=new Uint8Array(8),M=0;M<8;M++)C[M]=l[M+16];return Xe(o,f,a,r,c,C,_)}var ne=function(o){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var f,a,r,c,l,d,_,C;f=o[0]&255|(o[1]&255)<<8,this.r[0]=f&8191,a=o[2]&255|(o[3]&255)<<8,this.r[1]=(f>>>13|a<<3)&8191,r=o[4]&255|(o[5]&255)<<8,this.r[2]=(a>>>10|r<<6)&7939,c=o[6]&255|(o[7]&255)<<8,this.r[3]=(r>>>7|c<<9)&8191,l=o[8]&255|(o[9]&255)<<8,this.r[4]=(c>>>4|l<<12)&255,this.r[5]=l>>>1&8190,d=o[10]&255|(o[11]&255)<<8,this.r[6]=(l>>>14|d<<2)&8191,_=o[12]&255|(o[13]&255)<<8,this.r[7]=(d>>>11|_<<5)&8065,C=o[14]&255|(o[15]&255)<<8,this.r[8]=(_>>>8|C<<8)&8191,this.r[9]=C>>>5&127,this.pad[0]=o[16]&255|(o[17]&255)<<8,this.pad[1]=o[18]&255|(o[19]&255)<<8,this.pad[2]=o[20]&255|(o[21]&255)<<8,this.pad[3]=o[22]&255|(o[23]&255)<<8,this.pad[4]=o[24]&255|(o[25]&255)<<8,this.pad[5]=o[26]&255|(o[27]&255)<<8,this.pad[6]=o[28]&255|(o[29]&255)<<8,this.pad[7]=o[30]&255|(o[31]&255)<<8};ne.prototype.blocks=function(o,f,a){for(var r=this.fin?0:2048,c,l,d,_,C,M,O,gt,N,J,X,Q,F,W,Z,G,j,B,k,I=this.h[0],U=this.h[1],E=this.h[2],p=this.h[3],x=this.h[4],m=this.h[5],g=this.h[6],b=this.h[7],w=this.h[8],q=this.h[9],et=this.r[0],it=this.r[1],nt=this.r[2],h=this.r[3],ct=this.r[4],lt=this.r[5],_t=this.r[6],st=this.r[7],xt=this.r[8],vt=this.r[9];a>=16;)c=o[f+0]&255|(o[f+1]&255)<<8,I+=c&8191,l=o[f+2]&255|(o[f+3]&255)<<8,U+=(c>>>13|l<<3)&8191,d=o[f+4]&255|(o[f+5]&255)<<8,E+=(l>>>10|d<<6)&8191,_=o[f+6]&255|(o[f+7]&255)<<8,p+=(d>>>7|_<<9)&8191,C=o[f+8]&255|(o[f+9]&255)<<8,x+=(_>>>4|C<<12)&8191,m+=C>>>1&8191,M=o[f+10]&255|(o[f+11]&255)<<8,g+=(C>>>14|M<<2)&8191,O=o[f+12]&255|(o[f+13]&255)<<8,b+=(M>>>11|O<<5)&8191,gt=o[f+14]&255|(o[f+15]&255)<<8,w+=(O>>>8|gt<<8)&8191,q+=gt>>>5|r,N=0,J=N,J+=I*et,J+=U*(5*vt),J+=E*(5*xt),J+=p*(5*st),J+=x*(5*_t),N=J>>>13,J&=8191,J+=m*(5*lt),J+=g*(5*ct),J+=b*(5*h),J+=w*(5*nt),J+=q*(5*it),N+=J>>>13,J&=8191,X=N,X+=I*it,X+=U*et,X+=E*(5*vt),X+=p*(5*xt),X+=x*(5*st),N=X>>>13,X&=8191,X+=m*(5*_t),X+=g*(5*lt),X+=b*(5*ct),X+=w*(5*h),X+=q*(5*nt),N+=X>>>13,X&=8191,Q=N,Q+=I*nt,Q+=U*it,Q+=E*et,Q+=p*(5*vt),Q+=x*(5*xt),N=Q>>>13,Q&=8191,Q+=m*(5*st),Q+=g*(5*_t),Q+=b*(5*lt),Q+=w*(5*ct),Q+=q*(5*h),N+=Q>>>13,Q&=8191,F=N,F+=I*h,F+=U*nt,F+=E*it,F+=p*et,F+=x*(5*vt),N=F>>>13,F&=8191,F+=m*(5*xt),F+=g*(5*st),F+=b*(5*_t),F+=w*(5*lt),F+=q*(5*ct),N+=F>>>13,F&=8191,W=N,W+=I*ct,W+=U*h,W+=E*nt,W+=p*it,W+=x*et,N=W>>>13,W&=8191,W+=m*(5*vt),W+=g*(5*xt),W+=b*(5*st),W+=w*(5*_t),W+=q*(5*lt),N+=W>>>13,W&=8191,Z=N,Z+=I*lt,Z+=U*ct,Z+=E*h,Z+=p*nt,Z+=x*it,N=Z>>>13,Z&=8191,Z+=m*et,Z+=g*(5*vt),Z+=b*(5*xt),Z+=w*(5*st),Z+=q*(5*_t),N+=Z>>>13,Z&=8191,G=N,G+=I*_t,G+=U*lt,G+=E*ct,G+=p*h,G+=x*nt,N=G>>>13,G&=8191,G+=m*it,G+=g*et,G+=b*(5*vt),G+=w*(5*xt),G+=q*(5*st),N+=G>>>13,G&=8191,j=N,j+=I*st,j+=U*_t,j+=E*lt,j+=p*ct,j+=x*h,N=j>>>13,j&=8191,j+=m*nt,j+=g*it,j+=b*et,j+=w*(5*vt),j+=q*(5*xt),N+=j>>>13,j&=8191,B=N,B+=I*xt,B+=U*st,B+=E*_t,B+=p*lt,B+=x*ct,N=B>>>13,B&=8191,B+=m*h,B+=g*nt,B+=b*it,B+=w*et,B+=q*(5*vt),N+=B>>>13,B&=8191,k=N,k+=I*vt,k+=U*xt,k+=E*st,k+=p*_t,k+=x*lt,N=k>>>13,k&=8191,k+=m*ct,k+=g*h,k+=b*nt,k+=w*it,k+=q*et,N+=k>>>13,k&=8191,N=(N<<2)+N|0,N=N+J|0,J=N&8191,N=N>>>13,X+=N,I=J,U=X,E=Q,p=F,x=W,m=Z,g=G,b=j,w=B,q=k,f+=16,a-=16;this.h[0]=I,this.h[1]=U,this.h[2]=E,this.h[3]=p,this.h[4]=x,this.h[5]=m,this.h[6]=g,this.h[7]=b,this.h[8]=w,this.h[9]=q},ne.prototype.finish=function(o,f){var a=new Uint16Array(10),r,c,l,d;if(this.leftover){for(d=this.leftover,this.buffer[d++]=1;d<16;d++)this.buffer[d]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,d=2;d<10;d++)this.h[d]+=r,r=this.h[d]>>>13,this.h[d]&=8191;for(this.h[0]+=r*5,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,d=1;d<10;d++)a[d]=this.h[d]+r,r=a[d]>>>13,a[d]&=8191;for(a[9]-=8192,c=(r^1)-1,d=0;d<10;d++)a[d]&=c;for(c=~c,d=0;d<10;d++)this.h[d]=this.h[d]&c|a[d];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,l=this.h[0]+this.pad[0],this.h[0]=l&65535,d=1;d<8;d++)l=(this.h[d]+this.pad[d]|0)+(l>>>16)|0,this.h[d]=l&65535;o[f+0]=this.h[0]>>>0&255,o[f+1]=this.h[0]>>>8&255,o[f+2]=this.h[1]>>>0&255,o[f+3]=this.h[1]>>>8&255,o[f+4]=this.h[2]>>>0&255,o[f+5]=this.h[2]>>>8&255,o[f+6]=this.h[3]>>>0&255,o[f+7]=this.h[3]>>>8&255,o[f+8]=this.h[4]>>>0&255,o[f+9]=this.h[4]>>>8&255,o[f+10]=this.h[5]>>>0&255,o[f+11]=this.h[5]>>>8&255,o[f+12]=this.h[6]>>>0&255,o[f+13]=this.h[6]>>>8&255,o[f+14]=this.h[7]>>>0&255,o[f+15]=this.h[7]>>>8&255},ne.prototype.update=function(o,f,a){var r,c;if(this.leftover){for(c=16-this.leftover,c>a&&(c=a),r=0;r<c;r++)this.buffer[this.leftover+r]=o[f+r];if(a-=c,f+=c,this.leftover+=c,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(a>=16&&(c=a-a%16,this.blocks(o,f,c),f+=c,a-=c),a){for(r=0;r<a;r++)this.buffer[this.leftover+r]=o[f+r];this.leftover+=a}};function ke(o,f,a,r,c,l){var d=new ne(l);return d.update(a,r,c),d.finish(o,f),0}function Ke(o,f,a,r,c,l){var d=new Uint8Array(16);return ke(d,0,a,r,c,l),Ct(o,f,d,0)}function Le(o,f,a,r,c){var l;if(a<32)return-1;for(ee(o,0,f,0,a,r,c),ke(o,16,o,32,a-32,o),l=0;l<16;l++)o[l]=0;return 0}function Ne(o,f,a,r,c){var l,d=new Uint8Array(32);if(a<32||(Ge(d,0,32,r,c),Ke(f,16,f,32,a-32,d)!==0))return-1;for(ee(o,0,f,0,a,r,c),l=0;l<32;l++)o[l]=0;return 0}function Wt(o,f){var a;for(a=0;a<16;a++)o[a]=f[a]|0}function me(o){var f,a,r=1;for(f=0;f<16;f++)a=o[f]+r+65535,r=Math.floor(a/65536),o[f]=a-r*65536;o[0]+=r-1+37*(r-1)}function re(o,f,a){for(var r,c=~(a-1),l=0;l<16;l++)r=c&(o[l]^f[l]),o[l]^=r,f[l]^=r}function ae(o,f){var a,r,c,l=y(),d=y();for(a=0;a<16;a++)d[a]=f[a];for(me(d),me(d),me(d),r=0;r<2;r++){for(l[0]=d[0]-65517,a=1;a<15;a++)l[a]=d[a]-65535-(l[a-1]>>16&1),l[a-1]&=65535;l[15]=d[15]-32767-(l[14]>>16&1),c=l[15]>>16&1,l[14]&=65535,re(d,l,1-c)}for(a=0;a<16;a++)o[2*a]=d[a]&255,o[2*a+1]=d[a]>>8}function Ze(o,f){var a=new Uint8Array(32),r=new Uint8Array(32);return ae(a,o),ae(r,f),ft(a,0,r,0)}function Zt(o){var f=new Uint8Array(32);return ae(f,o),f[0]&1}function je(o,f){var a;for(a=0;a<16;a++)o[a]=f[2*a]+(f[2*a+1]<<8);o[15]&=32767}function Yt(o,f,a){for(var r=0;r<16;r++)o[r]=f[r]+a[r]}function St(o,f,a){for(var r=0;r<16;r++)o[r]=f[r]-a[r]}function Y(o,f,a){var r,c,l=0,d=0,_=0,C=0,M=0,O=0,gt=0,N=0,J=0,X=0,Q=0,F=0,W=0,Z=0,G=0,j=0,B=0,k=0,I=0,U=0,E=0,p=0,x=0,m=0,g=0,b=0,w=0,q=0,et=0,it=0,nt=0,h=a[0],ct=a[1],lt=a[2],_t=a[3],st=a[4],xt=a[5],vt=a[6],Lt=a[7],mt=a[8],Et=a[9],Ot=a[10],kt=a[11],Nt=a[12],Tt=a[13],Ut=a[14],Rt=a[15];r=f[0],l+=r*h,d+=r*ct,_+=r*lt,C+=r*_t,M+=r*st,O+=r*xt,gt+=r*vt,N+=r*Lt,J+=r*mt,X+=r*Et,Q+=r*Ot,F+=r*kt,W+=r*Nt,Z+=r*Tt,G+=r*Ut,j+=r*Rt,r=f[1],d+=r*h,_+=r*ct,C+=r*lt,M+=r*_t,O+=r*st,gt+=r*xt,N+=r*vt,J+=r*Lt,X+=r*mt,Q+=r*Et,F+=r*Ot,W+=r*kt,Z+=r*Nt,G+=r*Tt,j+=r*Ut,B+=r*Rt,r=f[2],_+=r*h,C+=r*ct,M+=r*lt,O+=r*_t,gt+=r*st,N+=r*xt,J+=r*vt,X+=r*Lt,Q+=r*mt,F+=r*Et,W+=r*Ot,Z+=r*kt,G+=r*Nt,j+=r*Tt,B+=r*Ut,k+=r*Rt,r=f[3],C+=r*h,M+=r*ct,O+=r*lt,gt+=r*_t,N+=r*st,J+=r*xt,X+=r*vt,Q+=r*Lt,F+=r*mt,W+=r*Et,Z+=r*Ot,G+=r*kt,j+=r*Nt,B+=r*Tt,k+=r*Ut,I+=r*Rt,r=f[4],M+=r*h,O+=r*ct,gt+=r*lt,N+=r*_t,J+=r*st,X+=r*xt,Q+=r*vt,F+=r*Lt,W+=r*mt,Z+=r*Et,G+=r*Ot,j+=r*kt,B+=r*Nt,k+=r*Tt,I+=r*Ut,U+=r*Rt,r=f[5],O+=r*h,gt+=r*ct,N+=r*lt,J+=r*_t,X+=r*st,Q+=r*xt,F+=r*vt,W+=r*Lt,Z+=r*mt,G+=r*Et,j+=r*Ot,B+=r*kt,k+=r*Nt,I+=r*Tt,U+=r*Ut,E+=r*Rt,r=f[6],gt+=r*h,N+=r*ct,J+=r*lt,X+=r*_t,Q+=r*st,F+=r*xt,W+=r*vt,Z+=r*Lt,G+=r*mt,j+=r*Et,B+=r*Ot,k+=r*kt,I+=r*Nt,U+=r*Tt,E+=r*Ut,p+=r*Rt,r=f[7],N+=r*h,J+=r*ct,X+=r*lt,Q+=r*_t,F+=r*st,W+=r*xt,Z+=r*vt,G+=r*Lt,j+=r*mt,B+=r*Et,k+=r*Ot,I+=r*kt,U+=r*Nt,E+=r*Tt,p+=r*Ut,x+=r*Rt,r=f[8],J+=r*h,X+=r*ct,Q+=r*lt,F+=r*_t,W+=r*st,Z+=r*xt,G+=r*vt,j+=r*Lt,B+=r*mt,k+=r*Et,I+=r*Ot,U+=r*kt,E+=r*Nt,p+=r*Tt,x+=r*Ut,m+=r*Rt,r=f[9],X+=r*h,Q+=r*ct,F+=r*lt,W+=r*_t,Z+=r*st,G+=r*xt,j+=r*vt,B+=r*Lt,k+=r*mt,I+=r*Et,U+=r*Ot,E+=r*kt,p+=r*Nt,x+=r*Tt,m+=r*Ut,g+=r*Rt,r=f[10],Q+=r*h,F+=r*ct,W+=r*lt,Z+=r*_t,G+=r*st,j+=r*xt,B+=r*vt,k+=r*Lt,I+=r*mt,U+=r*Et,E+=r*Ot,p+=r*kt,x+=r*Nt,m+=r*Tt,g+=r*Ut,b+=r*Rt,r=f[11],F+=r*h,W+=r*ct,Z+=r*lt,G+=r*_t,j+=r*st,B+=r*xt,k+=r*vt,I+=r*Lt,U+=r*mt,E+=r*Et,p+=r*Ot,x+=r*kt,m+=r*Nt,g+=r*Tt,b+=r*Ut,w+=r*Rt,r=f[12],W+=r*h,Z+=r*ct,G+=r*lt,j+=r*_t,B+=r*st,k+=r*xt,I+=r*vt,U+=r*Lt,E+=r*mt,p+=r*Et,x+=r*Ot,m+=r*kt,g+=r*Nt,b+=r*Tt,w+=r*Ut,q+=r*Rt,r=f[13],Z+=r*h,G+=r*ct,j+=r*lt,B+=r*_t,k+=r*st,I+=r*xt,U+=r*vt,E+=r*Lt,p+=r*mt,x+=r*Et,m+=r*Ot,g+=r*kt,b+=r*Nt,w+=r*Tt,q+=r*Ut,et+=r*Rt,r=f[14],G+=r*h,j+=r*ct,B+=r*lt,k+=r*_t,I+=r*st,U+=r*xt,E+=r*vt,p+=r*Lt,x+=r*mt,m+=r*Et,g+=r*Ot,b+=r*kt,w+=r*Nt,q+=r*Tt,et+=r*Ut,it+=r*Rt,r=f[15],j+=r*h,B+=r*ct,k+=r*lt,I+=r*_t,U+=r*st,E+=r*xt,p+=r*vt,x+=r*Lt,m+=r*mt,g+=r*Et,b+=r*Ot,w+=r*kt,q+=r*Nt,et+=r*Tt,it+=r*Ut,nt+=r*Rt,l+=38*B,d+=38*k,_+=38*I,C+=38*U,M+=38*E,O+=38*p,gt+=38*x,N+=38*m,J+=38*g,X+=38*b,Q+=38*w,F+=38*q,W+=38*et,Z+=38*it,G+=38*nt,c=1,r=l+c+65535,c=Math.floor(r/65536),l=r-c*65536,r=d+c+65535,c=Math.floor(r/65536),d=r-c*65536,r=_+c+65535,c=Math.floor(r/65536),_=r-c*65536,r=C+c+65535,c=Math.floor(r/65536),C=r-c*65536,r=M+c+65535,c=Math.floor(r/65536),M=r-c*65536,r=O+c+65535,c=Math.floor(r/65536),O=r-c*65536,r=gt+c+65535,c=Math.floor(r/65536),gt=r-c*65536,r=N+c+65535,c=Math.floor(r/65536),N=r-c*65536,r=J+c+65535,c=Math.floor(r/65536),J=r-c*65536,r=X+c+65535,c=Math.floor(r/65536),X=r-c*65536,r=Q+c+65535,c=Math.floor(r/65536),Q=r-c*65536,r=F+c+65535,c=Math.floor(r/65536),F=r-c*65536,r=W+c+65535,c=Math.floor(r/65536),W=r-c*65536,r=Z+c+65535,c=Math.floor(r/65536),Z=r-c*65536,r=G+c+65535,c=Math.floor(r/65536),G=r-c*65536,r=j+c+65535,c=Math.floor(r/65536),j=r-c*65536,l+=c-1+37*(c-1),c=1,r=l+c+65535,c=Math.floor(r/65536),l=r-c*65536,r=d+c+65535,c=Math.floor(r/65536),d=r-c*65536,r=_+c+65535,c=Math.floor(r/65536),_=r-c*65536,r=C+c+65535,c=Math.floor(r/65536),C=r-c*65536,r=M+c+65535,c=Math.floor(r/65536),M=r-c*65536,r=O+c+65535,c=Math.floor(r/65536),O=r-c*65536,r=gt+c+65535,c=Math.floor(r/65536),gt=r-c*65536,r=N+c+65535,c=Math.floor(r/65536),N=r-c*65536,r=J+c+65535,c=Math.floor(r/65536),J=r-c*65536,r=X+c+65535,c=Math.floor(r/65536),X=r-c*65536,r=Q+c+65535,c=Math.floor(r/65536),Q=r-c*65536,r=F+c+65535,c=Math.floor(r/65536),F=r-c*65536,r=W+c+65535,c=Math.floor(r/65536),W=r-c*65536,r=Z+c+65535,c=Math.floor(r/65536),Z=r-c*65536,r=G+c+65535,c=Math.floor(r/65536),G=r-c*65536,r=j+c+65535,c=Math.floor(r/65536),j=r-c*65536,l+=c-1+37*(c-1),o[0]=l,o[1]=d,o[2]=_,o[3]=C,o[4]=M,o[5]=O,o[6]=gt,o[7]=N,o[8]=J,o[9]=X,o[10]=Q,o[11]=F,o[12]=W,o[13]=Z,o[14]=G,o[15]=j}function zt(o,f){Y(o,f,f)}function Re(o,f){var a=y(),r;for(r=0;r<16;r++)a[r]=f[r];for(r=253;r>=0;r--)zt(a,a),r!==2&&r!==4&&Y(a,a,f);for(r=0;r<16;r++)o[r]=a[r]}function Jt(o,f){var a=y(),r;for(r=0;r<16;r++)a[r]=f[r];for(r=250;r>=0;r--)zt(a,a),r!==1&&Y(a,a,f);for(r=0;r<16;r++)o[r]=a[r]}function de(o,f,a){var r=new Uint8Array(32),c=new Float64Array(80),l,d,_=y(),C=y(),M=y(),O=y(),gt=y(),N=y();for(d=0;d<31;d++)r[d]=f[d];for(r[31]=f[31]&127|64,r[0]&=248,je(c,a),d=0;d<16;d++)C[d]=c[d],O[d]=_[d]=M[d]=0;for(_[0]=O[0]=1,d=254;d>=0;--d)l=r[d>>>3]>>>(d&7)&1,re(_,C,l),re(M,O,l),Yt(gt,_,M),St(_,_,M),Yt(M,C,O),St(C,C,O),zt(O,gt),zt(N,_),Y(_,M,_),Y(M,C,gt),Yt(gt,_,M),St(_,_,M),zt(C,_),St(M,O,N),Y(_,M,tt),Yt(_,_,O),Y(M,M,_),Y(_,O,N),Y(O,C,c),zt(C,gt),re(_,C,l),re(M,O,l);for(d=0;d<16;d++)c[d+16]=_[d],c[d+32]=M[d],c[d+48]=C[d],c[d+64]=O[d];var J=c.subarray(32),X=c.subarray(16);return Re(J,J),Y(X,X,J),ae(o,X),0}function we(o,f){return de(o,f,Ht)}function fe(o,f){return Pt(f,32),we(o,f)}function pe(o,f,a){var r=new Uint8Array(32);return de(r,a,f),Bt(o,ot,r,It)}var Ve=Le,Qe=Ne;function tn(o,f,a,r,c,l){var d=new Uint8Array(32);return pe(d,c,l),Ve(o,f,a,r,d)}function cn(o,f,a,r,c,l){var d=new Uint8Array(32);return pe(d,c,l),Qe(o,f,a,r,d)}var Ie=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function en(o,f,a,r){for(var c=new Int32Array(16),l=new Int32Array(16),d,_,C,M,O,gt,N,J,X,Q,F,W,Z,G,j,B,k,I,U,E,p,x,m,g,b,w,q=o[0],et=o[1],it=o[2],nt=o[3],h=o[4],ct=o[5],lt=o[6],_t=o[7],st=f[0],xt=f[1],vt=f[2],Lt=f[3],mt=f[4],Et=f[5],Ot=f[6],kt=f[7],Nt=0;r>=128;){for(U=0;U<16;U++)E=8*U+Nt,c[U]=a[E+0]<<24|a[E+1]<<16|a[E+2]<<8|a[E+3],l[U]=a[E+4]<<24|a[E+5]<<16|a[E+6]<<8|a[E+7];for(U=0;U<80;U++)if(d=q,_=et,C=it,M=nt,O=h,gt=ct,N=lt,J=_t,X=st,Q=xt,F=vt,W=Lt,Z=mt,G=Et,j=Ot,B=kt,p=_t,x=kt,m=x&65535,g=x>>>16,b=p&65535,w=p>>>16,p=(h>>>14|mt<<18)^(h>>>18|mt<<14)^(mt>>>9|h<<23),x=(mt>>>14|h<<18)^(mt>>>18|h<<14)^(h>>>9|mt<<23),m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,p=h&ct^~h<,x=mt&Et^~mt&Ot,m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,p=Ie[U*2],x=Ie[U*2+1],m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,p=c[U%16],x=l[U%16],m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,k=b&65535|w<<16,I=m&65535|g<<16,p=k,x=I,m=x&65535,g=x>>>16,b=p&65535,w=p>>>16,p=(q>>>28|st<<4)^(st>>>2|q<<30)^(st>>>7|q<<25),x=(st>>>28|q<<4)^(q>>>2|st<<30)^(q>>>7|st<<25),m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,p=q&et^q&it^et&it,x=st&xt^st&vt^xt&vt,m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,J=b&65535|w<<16,B=m&65535|g<<16,p=M,x=W,m=x&65535,g=x>>>16,b=p&65535,w=p>>>16,p=k,x=I,m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,M=b&65535|w<<16,W=m&65535|g<<16,et=d,it=_,nt=C,h=M,ct=O,lt=gt,_t=N,q=J,xt=X,vt=Q,Lt=F,mt=W,Et=Z,Ot=G,kt=j,st=B,U%16===15)for(E=0;E<16;E++)p=c[E],x=l[E],m=x&65535,g=x>>>16,b=p&65535,w=p>>>16,p=c[(E+9)%16],x=l[(E+9)%16],m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,k=c[(E+1)%16],I=l[(E+1)%16],p=(k>>>1|I<<31)^(k>>>8|I<<24)^k>>>7,x=(I>>>1|k<<31)^(I>>>8|k<<24)^(I>>>7|k<<25),m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,k=c[(E+14)%16],I=l[(E+14)%16],p=(k>>>19|I<<13)^(I>>>29|k<<3)^k>>>6,x=(I>>>19|k<<13)^(k>>>29|I<<3)^(I>>>6|k<<26),m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,c[E]=b&65535|w<<16,l[E]=m&65535|g<<16;p=q,x=st,m=x&65535,g=x>>>16,b=p&65535,w=p>>>16,p=o[0],x=f[0],m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,o[0]=q=b&65535|w<<16,f[0]=st=m&65535|g<<16,p=et,x=xt,m=x&65535,g=x>>>16,b=p&65535,w=p>>>16,p=o[1],x=f[1],m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,o[1]=et=b&65535|w<<16,f[1]=xt=m&65535|g<<16,p=it,x=vt,m=x&65535,g=x>>>16,b=p&65535,w=p>>>16,p=o[2],x=f[2],m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,o[2]=it=b&65535|w<<16,f[2]=vt=m&65535|g<<16,p=nt,x=Lt,m=x&65535,g=x>>>16,b=p&65535,w=p>>>16,p=o[3],x=f[3],m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,o[3]=nt=b&65535|w<<16,f[3]=Lt=m&65535|g<<16,p=h,x=mt,m=x&65535,g=x>>>16,b=p&65535,w=p>>>16,p=o[4],x=f[4],m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,o[4]=h=b&65535|w<<16,f[4]=mt=m&65535|g<<16,p=ct,x=Et,m=x&65535,g=x>>>16,b=p&65535,w=p>>>16,p=o[5],x=f[5],m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,o[5]=ct=b&65535|w<<16,f[5]=Et=m&65535|g<<16,p=lt,x=Ot,m=x&65535,g=x>>>16,b=p&65535,w=p>>>16,p=o[6],x=f[6],m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,o[6]=lt=b&65535|w<<16,f[6]=Ot=m&65535|g<<16,p=_t,x=kt,m=x&65535,g=x>>>16,b=p&65535,w=p>>>16,p=o[7],x=f[7],m+=x&65535,g+=x>>>16,b+=p&65535,w+=p>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,o[7]=_t=b&65535|w<<16,f[7]=kt=m&65535|g<<16,Nt+=128,r-=128}return r}function ie(o,f,a){var r=new Int32Array(8),c=new Int32Array(8),l=new Uint8Array(256),d,_=a;for(r[0]=1779033703,r[1]=3144134277,r[2]=1013904242,r[3]=2773480762,r[4]=1359893119,r[5]=2600822924,r[6]=528734635,r[7]=1541459225,c[0]=4089235720,c[1]=2227873595,c[2]=4271175723,c[3]=1595750129,c[4]=2917565137,c[5]=725511199,c[6]=4215389547,c[7]=327033209,en(r,c,f,a),a%=128,d=0;d<a;d++)l[d]=f[_-a+d];for(l[a]=128,a=256-128*(a<112?1:0),l[a-9]=0,V(l,a-8,_/536870912|0,_<<3),en(r,c,l,a),d=0;d<8;d++)V(o,8*d,r[d],c[d]);return 0}function Se(o,f){var a=y(),r=y(),c=y(),l=y(),d=y(),_=y(),C=y(),M=y(),O=y();St(a,o[1],o[0]),St(O,f[1],f[0]),Y(a,a,O),Yt(r,o[0],o[1]),Yt(O,f[0],f[1]),Y(r,r,O),Y(c,o[3],f[3]),Y(c,c,bt),Y(l,o[2],f[2]),Yt(l,l,l),St(d,r,a),St(_,l,c),Yt(C,l,c),Yt(M,r,a),Y(o[0],d,_),Y(o[1],M,C),Y(o[2],C,_),Y(o[3],d,M)}function nn(o,f,a){var r;for(r=0;r<4;r++)re(o[r],f[r],a)}function ce(o,f){var a=y(),r=y(),c=y();Re(c,f[2]),Y(a,f[0],c),Y(r,f[1],c),ae(o,r),o[31]^=Zt(a)<<7}function Ue(o,f,a){var r,c;for(Wt(o[0],R),Wt(o[1],ut),Wt(o[2],ut),Wt(o[3],R),c=255;c>=0;--c)r=a[c/8|0]>>(c&7)&1,nn(o,f,r),Se(f,o),Se(o,o),nn(o,f,r)}function wt(o,f){var a=[y(),y(),y(),y()];Wt(a[0],H),Wt(a[1],T),Wt(a[2],ut),Y(a[3],H,T),Ue(o,a,f)}function Me(o,f,a){var r=new Uint8Array(64),c=[y(),y(),y(),y()],l;for(a||Pt(f,32),ie(r,f,32),r[0]&=248,r[31]&=127,r[31]|=64,wt(c,r),ce(o,c),l=0;l<32;l++)f[l+32]=o[l];return 0}var Ce=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Be(o,f){var a,r,c,l;for(r=63;r>=32;--r){for(a=0,c=r-32,l=r-12;c<l;++c)f[c]+=a-16*f[r]*Ce[c-(r-32)],a=Math.floor((f[c]+128)/256),f[c]-=a*256;f[c]+=a,f[r]=0}for(a=0,c=0;c<32;c++)f[c]+=a-(f[31]>>4)*Ce[c],a=f[c]>>8,f[c]&=255;for(c=0;c<32;c++)f[c]-=a*Ce[c];for(r=0;r<32;r++)f[r+1]+=f[r]>>8,o[r]=f[r]&255}function De(o){var f=new Float64Array(64),a;for(a=0;a<64;a++)f[a]=o[a];for(a=0;a<64;a++)o[a]=0;Be(o,f)}function rn(o,f,a,r){var c=new Uint8Array(64),l=new Uint8Array(64),d=new Uint8Array(64),_,C,M=new Float64Array(64),O=[y(),y(),y(),y()];ie(c,r,32),c[0]&=248,c[31]&=127,c[31]|=64;var gt=a+64;for(_=0;_<a;_++)o[64+_]=f[_];for(_=0;_<32;_++)o[32+_]=c[32+_];for(ie(d,o.subarray(32),a+32),De(d),wt(O,d),ce(o,O),_=32;_<64;_++)o[_]=r[_];for(ie(l,o,a+64),De(l),_=0;_<64;_++)M[_]=0;for(_=0;_<32;_++)M[_]=d[_];for(_=0;_<32;_++)for(C=0;C<32;C++)M[_+C]+=l[_]*c[C];return Be(o.subarray(32),M),gt}function un(o,f){var a=y(),r=y(),c=y(),l=y(),d=y(),_=y(),C=y();return Wt(o[2],ut),je(o[1],f),zt(c,o[1]),Y(l,c,$),St(c,c,o[2]),Yt(l,o[2],l),zt(d,l),zt(_,d),Y(C,_,d),Y(a,C,c),Y(a,a,l),Jt(a,a),Y(a,a,c),Y(a,a,l),Y(a,a,l),Y(o[0],a,l),zt(r,o[0]),Y(r,r,l),Ze(r,c)&&Y(o[0],o[0],P),zt(r,o[0]),Y(r,r,l),Ze(r,c)?-1:(Zt(o[0])===f[31]>>7&&St(o[0],R,o[0]),Y(o[3],o[0],o[1]),0)}function He(o,f,a,r){var c,l=new Uint8Array(32),d=new Uint8Array(64),_=[y(),y(),y(),y()],C=[y(),y(),y(),y()];if(a<64||un(C,r))return-1;for(c=0;c<a;c++)o[c]=f[c];for(c=0;c<32;c++)o[c+32]=r[c];if(ie(d,o,a),De(d),Ue(_,C,d),wt(C,f.subarray(32)),Se(_,C),ce(l,_),a-=64,ft(f,0,l,0)){for(c=0;c<a;c++)o[c]=0;return-1}for(c=0;c<a;c++)o[c]=f[c+64];return a}var qe=32,Te=24,oe=32,Vt=16,xe=32,Ae=32,ve=32,ye=32,ze=32,Pe=Te,hn=oe,Gt=Vt,Kt=64,se=32,ue=64,Fe=32,Qt=64;S.lowlevel={crypto_core_hsalsa20:Bt,crypto_stream_xor:ee,crypto_stream:Ge,crypto_stream_salsa20_xor:Xe,crypto_stream_salsa20:We,crypto_onetimeauth:ke,crypto_onetimeauth_verify:Ke,crypto_verify_16:Ct,crypto_verify_32:ft,crypto_secretbox:Le,crypto_secretbox_open:Ne,crypto_scalarmult:de,crypto_scalarmult_base:we,crypto_box_beforenm:pe,crypto_box_afternm:Ve,crypto_box:tn,crypto_box_open:cn,crypto_box_keypair:fe,crypto_hash:ie,crypto_sign:rn,crypto_sign_keypair:Me,crypto_sign_open:He,crypto_secretbox_KEYBYTES:qe,crypto_secretbox_NONCEBYTES:Te,crypto_secretbox_ZEROBYTES:oe,crypto_secretbox_BOXZEROBYTES:Vt,crypto_scalarmult_BYTES:xe,crypto_scalarmult_SCALARBYTES:Ae,crypto_box_PUBLICKEYBYTES:ve,crypto_box_SECRETKEYBYTES:ye,crypto_box_BEFORENMBYTES:ze,crypto_box_NONCEBYTES:Pe,crypto_box_ZEROBYTES:hn,crypto_box_BOXZEROBYTES:Gt,crypto_sign_BYTES:Kt,crypto_sign_PUBLICKEYBYTES:se,crypto_sign_SECRETKEYBYTES:ue,crypto_sign_SEEDBYTES:Fe,crypto_hash_BYTES:Qt,gf:y,D:$,L:Ce,pack25519:ae,unpack25519:je,M:Y,A:Yt,S:zt,Z:St,pow2523:Jt,add:Se,set25519:Wt,modL:Be,scalarmult:Ue,scalarbase:wt};function on(o,f){if(o.length!==qe)throw new Error("bad key size");if(f.length!==Te)throw new Error("bad nonce size")}function sn(o,f){if(o.length!==ve)throw new Error("bad public key size");if(f.length!==ye)throw new Error("bad secret key size")}function Dt(){for(var o=0;o<arguments.length;o++)if(!(arguments[o]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function Ye(o){for(var f=0;f<o.length;f++)o[f]=0}S.randomBytes=function(o){var f=new Uint8Array(o);return Pt(f,o),f},S.secretbox=function(o,f,a){Dt(o,f,a),on(a,f);for(var r=new Uint8Array(oe+o.length),c=new Uint8Array(r.length),l=0;l<o.length;l++)r[l+oe]=o[l];return Le(c,r,r.length,f,a),c.subarray(Vt)},S.secretbox.open=function(o,f,a){Dt(o,f,a),on(a,f);for(var r=new Uint8Array(Vt+o.length),c=new Uint8Array(r.length),l=0;l<o.length;l++)r[l+Vt]=o[l];return r.length<32||Ne(c,r,r.length,f,a)!==0?null:c.subarray(oe)},S.secretbox.keyLength=qe,S.secretbox.nonceLength=Te,S.secretbox.overheadLength=Vt,S.scalarMult=function(o,f){if(Dt(o,f),o.length!==Ae)throw new Error("bad n size");if(f.length!==xe)throw new Error("bad p size");var a=new Uint8Array(xe);return de(a,o,f),a},S.scalarMult.base=function(o){if(Dt(o),o.length!==Ae)throw new Error("bad n size");var f=new Uint8Array(xe);return we(f,o),f},S.scalarMult.scalarLength=Ae,S.scalarMult.groupElementLength=xe,S.box=function(o,f,a,r){var c=S.box.before(a,r);return S.secretbox(o,f,c)},S.box.before=function(o,f){Dt(o,f),sn(o,f);var a=new Uint8Array(ze);return pe(a,o,f),a},S.box.after=S.secretbox,S.box.open=function(o,f,a,r){var c=S.box.before(a,r);return S.secretbox.open(o,f,c)},S.box.open.after=S.secretbox.open,S.box.keyPair=function(){var o=new Uint8Array(ve),f=new Uint8Array(ye);return fe(o,f),{publicKey:o,secretKey:f}},S.box.keyPair.fromSecretKey=function(o){if(Dt(o),o.length!==ye)throw new Error("bad secret key size");var f=new Uint8Array(ve);return we(f,o),{publicKey:f,secretKey:new Uint8Array(o)}},S.box.publicKeyLength=ve,S.box.secretKeyLength=ye,S.box.sharedKeyLength=ze,S.box.nonceLength=Pe,S.box.overheadLength=S.secretbox.overheadLength,S.sign=function(o,f){if(Dt(o,f),f.length!==ue)throw new Error("bad secret key size");var a=new Uint8Array(Kt+o.length);return rn(a,o,o.length,f),a},S.sign.open=function(o,f){if(Dt(o,f),f.length!==se)throw new Error("bad public key size");var a=new Uint8Array(o.length),r=He(a,o,o.length,f);if(r<0)return null;for(var c=new Uint8Array(r),l=0;l<c.length;l++)c[l]=a[l];return c},S.sign.detached=function(o,f){for(var a=S.sign(o,f),r=new Uint8Array(Kt),c=0;c<r.length;c++)r[c]=a[c];return r},S.sign.detached.verify=function(o,f,a){if(Dt(o,f,a),f.length!==Kt)throw new Error("bad signature size");if(a.length!==se)throw new Error("bad public key size");var r=new Uint8Array(Kt+o.length),c=new Uint8Array(Kt+o.length),l;for(l=0;l<Kt;l++)r[l]=f[l];for(l=0;l<o.length;l++)r[l+Kt]=o[l];return He(c,r,r.length,a)>=0},S.sign.keyPair=function(){var o=new Uint8Array(se),f=new Uint8Array(ue);return Me(o,f),{publicKey:o,secretKey:f}},S.sign.keyPair.fromSecretKey=function(o){if(Dt(o),o.length!==ue)throw new Error("bad secret key size");for(var f=new Uint8Array(se),a=0;a<f.length;a++)f[a]=o[32+a];return{publicKey:f,secretKey:new Uint8Array(o)}},S.sign.keyPair.fromSeed=function(o){if(Dt(o),o.length!==Fe)throw new Error("bad seed size");for(var f=new Uint8Array(se),a=new Uint8Array(ue),r=0;r<32;r++)a[r]=o[r];return Me(f,a,!0),{publicKey:f,secretKey:a}},S.sign.publicKeyLength=se,S.sign.secretKeyLength=ue,S.sign.seedLength=Fe,S.sign.signatureLength=Kt,S.hash=function(o){Dt(o);var f=new Uint8Array(Qt);return ie(f,o,o.length),f},S.hash.hashLength=Qt,S.verify=function(o,f){return Dt(o,f),o.length===0||f.length===0||o.length!==f.length?!1:D(o,0,f,0,o.length)===0},S.setPRNG=function(o){Pt=o},(function(){var o=typeof self<"u"?self.crypto||self.msCrypto:null;if(o&&o.getRandomValues){var f=65536;S.setPRNG(function(a,r){var c,l=new Uint8Array(r);for(c=0;c<r;c+=f)o.getRandomValues(l.subarray(c,c+Math.min(r-c,f)));for(c=0;c<r;c++)a[c]=l[c];Ye(l)})}else o=pt(4),o&&o.randomBytes&&S.setPRNG(function(a,r){var c,l=o.randomBytes(r);for(c=0;c<r;c++)a[c]=l[c];Ye(l)})})()})(At.exports?At.exports:self.nacl=self.nacl||{})}),(function(At,rt,pt){At.exports=pt(5).default}),(function(At,rt){}),(function(At,rt,pt){pt.r(rt);var S=(function(){function e(t,n){this.lastId=0,this.prefix=t,this.name=n}return e.prototype.create=function(t){this.lastId++;var n=this.lastId,i=this.prefix+n,s=this.name+"["+n+"]",u=!1,v=function(){u||(t.apply(null,arguments),u=!0)};return this[n]=v,{number:n,id:i,name:s,callback:v}},e.prototype.remove=function(t){delete this[t.number]},e})(),y=new S("_pusher_script_","Pusher.ScriptReceivers"),Pt={VERSION:"7.6.0",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,cluster:"mt1",userAuthentication:{endpoint:"/pusher/user-auth",transport:"ajax"},channelAuthorization:{endpoint:"/pusher/auth",transport:"ajax"},cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},ot=Pt,Ht=(function(){function e(t){this.options=t,this.receivers=t.receivers||y,this.loading={}}return e.prototype.load=function(t,n,i){var s=this;if(s.loading[t]&&s.loading[t].length>0)s.loading[t].push(i);else{s.loading[t]=[i];var u=at.createScriptRequest(s.getPath(t,n)),v=s.receivers.create(function(A){if(s.receivers.remove(v),s.loading[t]){var z=s.loading[t];delete s.loading[t];for(var L=function(jt){jt||u.cleanup()},dt=0;dt<z.length;dt++)z[dt](A,L)}});u.send(v)}},e.prototype.getRoot=function(t){var n,i=at.getDocument().location.protocol;return t&&t.useTLS||i==="https:"?n=this.options.cdn_https:n=this.options.cdn_http,n.replace(/\/*$/,"")+"/"+this.options.version},e.prototype.getPath=function(t,n){return this.getRoot(n)+"/"+t+this.options.suffix+".js"},e})(),R=Ht,ut=new S("_pusher_dependencies","Pusher.DependenciesReceivers"),tt=new R({cdn_http:ot.cdn_http,cdn_https:ot.cdn_https,version:ot.VERSION,suffix:ot.dependency_suffix,receivers:ut}),$={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}},bt=function(e){var t="See:",n=$.urls[e];if(!n)return"";var i;return n.fullUrl?i=n.fullUrl:n.path&&(i=$.baseUrl+n.path),i?t+" "+i:""},H={buildLogSuffix:bt},T;(function(e){e.UserAuthentication="user-authentication",e.ChannelAuthorization="channel-authorization"})(T||(T={}));var P=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var u in s)s.hasOwnProperty(u)&&(i[u]=s[u])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})(),V=(function(e){P(t,e);function t(n){var i=this.constructor,s=e.call(this,n)||this;return Object.setPrototypeOf(s,i.prototype),s}return t})(Error),D=(function(e){P(t,e);function t(n){var i=this.constructor,s=e.call(this,n)||this;return Object.setPrototypeOf(s,i.prototype),s}return t})(Error),Ct=(function(e){P(t,e);function t(n){var i=this.constructor,s=e.call(this,n)||this;return Object.setPrototypeOf(s,i.prototype),s}return t})(Error),ft=(function(e){P(t,e);function t(n){var i=this.constructor,s=e.call(this,n)||this;return Object.setPrototypeOf(s,i.prototype),s}return t})(Error),Ft=(function(e){P(t,e);function t(n){var i=this.constructor,s=e.call(this,n)||this;return Object.setPrototypeOf(s,i.prototype),s}return t})(Error),Xt=(function(e){P(t,e);function t(n){var i=this.constructor,s=e.call(this,n)||this;return Object.setPrototypeOf(s,i.prototype),s}return t})(Error),qt=(function(e){P(t,e);function t(n){var i=this.constructor,s=e.call(this,n)||this;return Object.setPrototypeOf(s,i.prototype),s}return t})(Error),Bt=(function(e){P(t,e);function t(n){var i=this.constructor,s=e.call(this,n)||this;return Object.setPrototypeOf(s,i.prototype),s}return t})(Error),It=(function(e){P(t,e);function t(n,i){var s=this.constructor,u=e.call(this,i)||this;return u.status=n,Object.setPrototypeOf(u,s.prototype),u}return t})(Error),Xe=function(e,t,n,i,s){var u=at.createXHR();u.open("POST",n.endpoint,!0),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var v in n.headers)u.setRequestHeader(v,n.headers[v]);if(n.headersProvider!=null){var A=n.headersProvider();for(var v in A)u.setRequestHeader(v,A[v])}return u.onreadystatechange=function(){if(u.readyState===4)if(u.status===200){var z=void 0,L=!1;try{z=JSON.parse(u.responseText),L=!0}catch{s(new It(200,"JSON returned from "+i.toString()+" endpoint was invalid, yet status code was 200. Data was: "+u.responseText),null)}L&&s(null,z)}else{var dt="";switch(i){case T.UserAuthentication:dt=H.buildLogSuffix("authenticationEndpoint");break;case T.ChannelAuthorization:dt="Clients must be authorized to join private or presence channels. "+H.buildLogSuffix("authorizationEndpoint");break}s(new It(u.status,"Unable to retrieve auth string from "+i.toString()+" endpoint - "+("received status: "+u.status+" from "+n.endpoint+". "+dt)),null)}},u.send(t),u},We=Xe;function Ge(e){return Ne(Ke(e))}var ee=String.fromCharCode,ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ke=function(e){var t=e.charCodeAt(0);return t<128?e:t<2048?ee(192|t>>>6)+ee(128|t&63):ee(224|t>>>12&15)+ee(128|t>>>6&63)+ee(128|t&63)},Ke=function(e){return e.replace(/[^\x00-\x7F]/g,ke)},Le=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0),i=[ne.charAt(n>>>18),ne.charAt(n>>>12&63),t>=2?"=":ne.charAt(n>>>6&63),t>=1?"=":ne.charAt(n&63)];return i.join("")},Ne=window.btoa||function(e){return e.replace(/[\s\S]{1,3}/g,Le)},Wt=(function(){function e(t,n,i,s){var u=this;this.clear=n,this.timer=t(function(){u.timer&&(u.timer=s(u.timer))},i)}return e.prototype.isRunning=function(){return this.timer!==null},e.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},e})(),me=Wt,re=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var u in s)s.hasOwnProperty(u)&&(i[u]=s[u])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})();function ae(e){window.clearTimeout(e)}function Ze(e){window.clearInterval(e)}var Zt=(function(e){re(t,e);function t(n,i){return e.call(this,setTimeout,ae,n,function(s){return i(),null})||this}return t})(me),je=(function(e){re(t,e);function t(n,i){return e.call(this,setInterval,Ze,n,function(s){return i(),s})||this}return t})(me),Yt={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(e){return new Zt(0,e)},method:function(e){var t=Array.prototype.slice.call(arguments,1);return function(n){return n[e].apply(n,t.concat(arguments))}}},St=Yt;function Y(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=0;i<t.length;i++){var s=t[i];for(var u in s)s[u]&&s[u].constructor&&s[u].constructor===Object?e[u]=Y(e[u]||{},s[u]):e[u]=s[u]}return e}function zt(){for(var e=["Pusher"],t=0;t<arguments.length;t++)typeof arguments[t]=="string"?e.push(arguments[t]):e.push(ce(arguments[t]));return e.join(" : ")}function Re(e,t){var n=Array.prototype.indexOf;if(e===null)return-1;if(n&&e.indexOf===n)return e.indexOf(t);for(var i=0,s=e.length;i<s;i++)if(e[i]===t)return i;return-1}function Jt(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(e[n],n,e)}function de(e){var t=[];return Jt(e,function(n,i){t.push(i)}),t}function we(e){var t=[];return Jt(e,function(n){t.push(n)}),t}function fe(e,t,n){for(var i=0;i<e.length;i++)t.call(n||window,e[i],i,e)}function pe(e,t){for(var n=[],i=0;i<e.length;i++)n.push(t(e[i],i,e,n));return n}function Ve(e,t){var n={};return Jt(e,function(i,s){n[s]=t(i)}),n}function Qe(e,t){t=t||function(s){return!!s};for(var n=[],i=0;i<e.length;i++)t(e[i],i,e,n)&&n.push(e[i]);return n}function tn(e,t){var n={};return Jt(e,function(i,s){(t&&t(i,s,e,n)||i)&&(n[s]=i)}),n}function cn(e){var t=[];return Jt(e,function(n,i){t.push([i,n])}),t}function Ie(e,t){for(var n=0;n<e.length;n++)if(t(e[n],n,e))return!0;return!1}function en(e,t){for(var n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0}function ie(e){return Ve(e,function(t){return typeof t=="object"&&(t=ce(t)),encodeURIComponent(Ge(t.toString()))})}function Se(e){var t=tn(e,function(i){return i!==void 0}),n=pe(cn(ie(t)),St.method("join","=")).join("&");return n}function nn(e){var t=[],n=[];return(function i(s,u){var v,A,z;switch(typeof s){case"object":if(!s)return null;for(v=0;v<t.length;v+=1)if(t[v]===s)return{$ref:n[v]};if(t.push(s),n.push(u),Object.prototype.toString.apply(s)==="[object Array]")for(z=[],v=0;v<s.length;v+=1)z[v]=i(s[v],u+"["+v+"]");else{z={};for(A in s)Object.prototype.hasOwnProperty.call(s,A)&&(z[A]=i(s[A],u+"["+JSON.stringify(A)+"]"))}return z;case"number":case"string":case"boolean":return s}})(e,"$")}function ce(e){try{return JSON.stringify(e)}catch{return JSON.stringify(nn(e))}}var Ue=(function(){function e(){this.globalLog=function(t){window.console&&window.console.log&&window.console.log(t)}}return e.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.log(this.globalLog,t)},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.log(this.globalLogWarn,t)},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.log(this.globalLogError,t)},e.prototype.globalLogWarn=function(t){window.console&&window.console.warn?window.console.warn(t):this.globalLog(t)},e.prototype.globalLogError=function(t){window.console&&window.console.error?window.console.error(t):this.globalLogWarn(t)},e.prototype.log=function(t){var n=zt.apply(this,arguments);if(Oe.log)Oe.log(n);else if(Oe.logToConsole){var i=t.bind(this);i(n)}},e})(),wt=new Ue,Me=function(e,t,n,i,s){(n.headers!==void 0||n.headersProvider!=null)&&wt.warn("To send headers with the "+i.toString()+" request, you must use AJAX, rather than JSONP.");var u=e.nextAuthCallbackID.toString();e.nextAuthCallbackID++;var v=e.getDocument(),A=v.createElement("script");e.auth_callbacks[u]=function(dt){s(null,dt)};var z="Pusher.auth_callbacks['"+u+"']";A.src=n.endpoint+"?callback="+encodeURIComponent(z)+"&"+t;var L=v.getElementsByTagName("head")[0]||v.documentElement;L.insertBefore(A,L.firstChild)},Ce=Me,Be=(function(){function e(t){this.src=t}return e.prototype.send=function(t){var n=this,i="Error loading "+n.src;n.script=document.createElement("script"),n.script.id=t.id,n.script.src=n.src,n.script.type="text/javascript",n.script.charset="UTF-8",n.script.addEventListener?(n.script.onerror=function(){t.callback(i)},n.script.onload=function(){t.callback(null)}):n.script.onreadystatechange=function(){(n.script.readyState==="loaded"||n.script.readyState==="complete")&&t.callback(null)},n.script.async===void 0&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(n.errorScript=document.createElement("script"),n.errorScript.id=t.id+"_error",n.errorScript.text=t.name+"('"+i+"');",n.script.async=n.errorScript.async=!1):n.script.async=!0;var s=document.getElementsByTagName("head")[0];s.insertBefore(n.script,s.firstChild),n.errorScript&&s.insertBefore(n.errorScript,n.script.nextSibling)},e.prototype.cleanup=function(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null},e})(),De=Be,rn=(function(){function e(t,n){this.url=t,this.data=n}return e.prototype.send=function(t){if(!this.request){var n=Se(this.data),i=this.url+"/"+t.number+"?"+n;this.request=at.createScriptRequest(i),this.request.send(t)}},e.prototype.cleanup=function(){this.request&&this.request.cleanup()},e})(),un=rn,He=function(e,t){return function(n,i){var s="http"+(t?"s":"")+"://",u=s+(e.host||e.options.host)+e.options.path,v=at.createJSONPRequest(u,n),A=at.ScriptReceivers.create(function(z,L){y.remove(A),v.cleanup(),L&&L.host&&(e.host=L.host),i&&i(z,L)});v.send(A)}},qe={name:"jsonp",getAgent:He},Te=qe;function oe(e,t,n){var i=e+(t.useTLS?"s":""),s=t.useTLS?t.hostTLS:t.hostNonTLS;return i+"://"+s+n}function Vt(e,t){var n="/app/"+e,i="?protocol="+ot.PROTOCOL+"&client=js&version="+ot.VERSION+(t?"&"+t:"");return n+i}var xe={getInitial:function(e,t){var n=(t.httpPath||"")+Vt(e,"flash=false");return oe("ws",t,n)}},Ae={getInitial:function(e,t){var n=(t.httpPath||"/pusher")+Vt(e);return oe("http",t,n)}},ve={getInitial:function(e,t){return oe("http",t,t.httpPath||"/pusher")},getPath:function(e,t){return Vt(e)}},ye=(function(){function e(){this._callbacks={}}return e.prototype.get=function(t){return this._callbacks[Pe(t)]},e.prototype.add=function(t,n,i){var s=Pe(t);this._callbacks[s]=this._callbacks[s]||[],this._callbacks[s].push({fn:n,context:i})},e.prototype.remove=function(t,n,i){if(!t&&!n&&!i){this._callbacks={};return}var s=t?[Pe(t)]:de(this._callbacks);n||i?this.removeCallback(s,n,i):this.removeAllCallbacks(s)},e.prototype.removeCallback=function(t,n,i){fe(t,function(s){this._callbacks[s]=Qe(this._callbacks[s]||[],function(u){return n&&n!==u.fn||i&&i!==u.context}),this._callbacks[s].length===0&&delete this._callbacks[s]},this)},e.prototype.removeAllCallbacks=function(t){fe(t,function(n){delete this._callbacks[n]},this)},e})(),ze=ye;function Pe(e){return"_"+e}var hn=(function(){function e(t){this.callbacks=new ze,this.global_callbacks=[],this.failThrough=t}return e.prototype.bind=function(t,n,i){return this.callbacks.add(t,n,i),this},e.prototype.bind_global=function(t){return this.global_callbacks.push(t),this},e.prototype.unbind=function(t,n,i){return this.callbacks.remove(t,n,i),this},e.prototype.unbind_global=function(t){return t?(this.global_callbacks=Qe(this.global_callbacks||[],function(n){return n!==t}),this):(this.global_callbacks=[],this)},e.prototype.unbind_all=function(){return this.unbind(),this.unbind_global(),this},e.prototype.emit=function(t,n,i){for(var s=0;s<this.global_callbacks.length;s++)this.global_callbacks[s](t,n);var u=this.callbacks.get(t),v=[];if(i?v.push(n,i):n&&v.push(n),u&&u.length>0)for(var s=0;s<u.length;s++)u[s].fn.apply(u[s].context||window,v);else this.failThrough&&this.failThrough(t,n);return this},e})(),Gt=hn,Kt=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var u in s)s.hasOwnProperty(u)&&(i[u]=s[u])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})(),se=(function(e){Kt(t,e);function t(n,i,s,u,v){var A=e.call(this)||this;return A.initialize=at.transportConnectionInitializer,A.hooks=n,A.name=i,A.priority=s,A.key=u,A.options=v,A.state="new",A.timeline=v.timeline,A.activityTimeout=v.activityTimeout,A.id=A.timeline.generateUniqueID(),A}return t.prototype.handlesActivityChecks=function(){return!!this.hooks.handlesActivityChecks},t.prototype.supportsPing=function(){return!!this.hooks.supportsPing},t.prototype.connect=function(){var n=this;if(this.socket||this.state!=="initialized")return!1;var i=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(i,this.options)}catch(s){return St.defer(function(){n.onError(s),n.changeState("closed")}),!1}return this.bindListeners(),wt.debug("Connecting",{transport:this.name,url:i}),this.changeState("connecting"),!0},t.prototype.close=function(){return this.socket?(this.socket.close(),!0):!1},t.prototype.send=function(n){var i=this;return this.state==="open"?(St.defer(function(){i.socket&&i.socket.send(n)}),!0):!1},t.prototype.ping=function(){this.state==="open"&&this.supportsPing()&&this.socket.ping()},t.prototype.onOpen=function(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0},t.prototype.onError=function(n){this.emit("error",{type:"WebSocketError",error:n}),this.timeline.error(this.buildTimelineMessage({error:n.toString()}))},t.prototype.onClose=function(n){n?this.changeState("closed",{code:n.code,reason:n.reason,wasClean:n.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0},t.prototype.onMessage=function(n){this.emit("message",n)},t.prototype.onActivity=function(){this.emit("activity")},t.prototype.bindListeners=function(){var n=this;this.socket.onopen=function(){n.onOpen()},this.socket.onerror=function(i){n.onError(i)},this.socket.onclose=function(i){n.onClose(i)},this.socket.onmessage=function(i){n.onMessage(i)},this.supportsPing()&&(this.socket.onactivity=function(){n.onActivity()})},t.prototype.unbindListeners=function(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))},t.prototype.changeState=function(n,i){this.state=n,this.timeline.info(this.buildTimelineMessage({state:n,params:i})),this.emit(n,i)},t.prototype.buildTimelineMessage=function(n){return Y({cid:this.id},n)},t})(Gt),ue=se,Fe=(function(){function e(t){this.hooks=t}return e.prototype.isSupported=function(t){return this.hooks.isSupported(t)},e.prototype.createConnection=function(t,n,i,s){return new ue(this.hooks,t,n,i,s)},e})(),Qt=Fe,on=new Qt({urls:xe,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return!!at.getWebSocketAPI()},isSupported:function(){return!!at.getWebSocketAPI()},getSocket:function(e){return at.createWebSocket(e)}}),sn={urls:Ae,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},Dt=Y({getSocket:function(e){return at.HTTPFactory.createStreamingSocket(e)}},sn),Ye=Y({getSocket:function(e){return at.HTTPFactory.createPollingSocket(e)}},sn),o={isSupported:function(){return at.isXHRSupported()}},f=new Qt(Y({},Dt,o)),a=new Qt(Y({},Ye,o)),r={ws:on,xhr_streaming:f,xhr_polling:a},c=r,l=new Qt({file:"sockjs",urls:ve,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return window.SockJS!==void 0},getSocket:function(e,t){return new window.SockJS(e,null,{js_path:tt.getPath("sockjs",{useTLS:t.useTLS}),ignore_null_origin:t.ignoreNullOrigin})},beforeOpen:function(e,t){e.send(JSON.stringify({path:t}))}}),d={isSupported:function(e){var t=at.isXDRSupported(e.useTLS);return t}},_=new Qt(Y({},Dt,d)),C=new Qt(Y({},Ye,d));c.xdr_streaming=_,c.xdr_polling=C,c.sockjs=l;var M=c,O=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var u in s)s.hasOwnProperty(u)&&(i[u]=s[u])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})(),gt=(function(e){O(t,e);function t(){var n=e.call(this)||this,i=n;return window.addEventListener!==void 0&&(window.addEventListener("online",function(){i.emit("online")},!1),window.addEventListener("offline",function(){i.emit("offline")},!1)),n}return t.prototype.isOnline=function(){return window.navigator.onLine===void 0?!0:window.navigator.onLine},t})(Gt),N=new gt,J=(function(){function e(t,n,i){this.manager=t,this.transport=n,this.minPingDelay=i.minPingDelay,this.maxPingDelay=i.maxPingDelay,this.pingDelay=void 0}return e.prototype.createConnection=function(t,n,i,s){var u=this;s=Y({},s,{activityTimeout:this.pingDelay});var v=this.transport.createConnection(t,n,i,s),A=null,z=function(){v.unbind("open",z),v.bind("closed",L),A=St.now()},L=function(dt){if(v.unbind("closed",L),dt.code===1002||dt.code===1003)u.manager.reportDeath();else if(!dt.wasClean&&A){var jt=St.now()-A;jt<2*u.maxPingDelay&&(u.manager.reportDeath(),u.pingDelay=Math.max(jt/2,u.minPingDelay))}};return v.bind("open",z),v},e.prototype.isSupported=function(t){return this.manager.isAlive()&&this.transport.isSupported(t)},e})(),X=J,Q={decodeMessage:function(e){try{var t=JSON.parse(e.data),n=t.data;if(typeof n=="string")try{n=JSON.parse(t.data)}catch{}var i={event:t.event,channel:t.channel,data:n};return t.user_id&&(i.user_id=t.user_id),i}catch(s){throw{type:"MessageParseError",error:s,data:e.data}}},encodeMessage:function(e){return JSON.stringify(e)},processHandshake:function(e){var t=Q.decodeMessage(e);if(t.event==="pusher:connection_established"){if(!t.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:t.data.socket_id,activityTimeout:t.data.activity_timeout*1e3}}else{if(t.event==="pusher:error")return{action:this.getCloseAction(t.data),error:this.getCloseError(t.data)};throw"Invalid handshake"}},getCloseAction:function(e){return e.code<4e3?e.code>=1002&&e.code<=1004?"backoff":null:e.code===4e3?"tls_only":e.code<4100?"refused":e.code<4200?"backoff":e.code<4300?"retry":"refused"},getCloseError:function(e){return e.code!==1e3&&e.code!==1001?{type:"PusherError",data:{code:e.code,message:e.reason||e.message}}:null}},F=Q,W=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var u in s)s.hasOwnProperty(u)&&(i[u]=s[u])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})(),Z=(function(e){W(t,e);function t(n,i){var s=e.call(this)||this;return s.id=n,s.transport=i,s.activityTimeout=i.activityTimeout,s.bindListeners(),s}return t.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},t.prototype.send=function(n){return this.transport.send(n)},t.prototype.send_event=function(n,i,s){var u={event:n,data:i};return s&&(u.channel=s),wt.debug("Event sent",u),this.send(F.encodeMessage(u))},t.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},t.prototype.close=function(){this.transport.close()},t.prototype.bindListeners=function(){var n=this,i={message:function(u){var v;try{v=F.decodeMessage(u)}catch(A){n.emit("error",{type:"MessageParseError",error:A,data:u.data})}if(v!==void 0){switch(wt.debug("Event recd",v),v.event){case"pusher:error":n.emit("error",{type:"PusherError",data:v.data});break;case"pusher:ping":n.emit("ping");break;case"pusher:pong":n.emit("pong");break}n.emit("message",v)}},activity:function(){n.emit("activity")},error:function(u){n.emit("error",u)},closed:function(u){s(),u&&u.code&&n.handleCloseEvent(u),n.transport=null,n.emit("closed")}},s=function(){Jt(i,function(u,v){n.transport.unbind(v,u)})};Jt(i,function(u,v){n.transport.bind(v,u)})},t.prototype.handleCloseEvent=function(n){var i=F.getCloseAction(n),s=F.getCloseError(n);s&&this.emit("error",s),i&&this.emit(i,{action:i,error:s})},t})(Gt),G=Z,j=(function(){function e(t,n){this.transport=t,this.callback=n,this.bindListeners()}return e.prototype.close=function(){this.unbindListeners(),this.transport.close()},e.prototype.bindListeners=function(){var t=this;this.onMessage=function(n){t.unbindListeners();var i;try{i=F.processHandshake(n)}catch(s){t.finish("error",{error:s}),t.transport.close();return}i.action==="connected"?t.finish("connected",{connection:new G(i.id,t.transport),activityTimeout:i.activityTimeout}):(t.finish(i.action,{error:i.error}),t.transport.close())},this.onClosed=function(n){t.unbindListeners();var i=F.getCloseAction(n)||"backoff",s=F.getCloseError(n);t.finish(i,{error:s})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},e.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},e.prototype.finish=function(t,n){this.callback(Y({transport:this.transport,action:t},n))},e})(),B=j,k=(function(){function e(t,n){this.timeline=t,this.options=n||{}}return e.prototype.send=function(t,n){this.timeline.isEmpty()||this.timeline.send(at.TimelineTransport.getAgent(this,t),n)},e})(),I=k,U=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var u in s)s.hasOwnProperty(u)&&(i[u]=s[u])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})(),E=(function(e){U(t,e);function t(n,i){var s=e.call(this,function(u,v){wt.debug("No callbacks on "+n+" for "+u)})||this;return s.name=n,s.pusher=i,s.subscribed=!1,s.subscriptionPending=!1,s.subscriptionCancelled=!1,s}return t.prototype.authorize=function(n,i){return i(null,{auth:""})},t.prototype.trigger=function(n,i){if(n.indexOf("client-")!==0)throw new V("Event '"+n+"' does not start with 'client-'");if(!this.subscribed){var s=H.buildLogSuffix("triggeringClientEvents");wt.warn("Client event triggered before channel 'subscription_succeeded' event . "+s)}return this.pusher.send_event(n,i,this.name)},t.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},t.prototype.handleEvent=function(n){var i=n.event,s=n.data;if(i==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(n);else if(i==="pusher_internal:subscription_count")this.handleSubscriptionCountEvent(n);else if(i.indexOf("pusher_internal:")!==0){var u={};this.emit(i,s,u)}},t.prototype.handleSubscriptionSucceededEvent=function(n){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",n.data)},t.prototype.handleSubscriptionCountEvent=function(n){n.data.subscription_count&&(this.subscriptionCount=n.data.subscription_count),this.emit("pusher:subscription_count",n.data)},t.prototype.subscribe=function(){var n=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(i,s){i?(n.subscriptionPending=!1,wt.error(i.toString()),n.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:i.message},i instanceof It?{status:i.status}:{}))):n.pusher.send_event("pusher:subscribe",{auth:s.auth,channel_data:s.channel_data,channel:n.name})}))},t.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},t.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},t.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},t})(Gt),p=E,x=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var u in s)s.hasOwnProperty(u)&&(i[u]=s[u])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})(),m=(function(e){x(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.authorize=function(n,i){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:n},i)},t})(p),g=m,b=(function(){function e(){this.reset()}return e.prototype.get=function(t){return Object.prototype.hasOwnProperty.call(this.members,t)?{id:t,info:this.members[t]}:null},e.prototype.each=function(t){var n=this;Jt(this.members,function(i,s){t(n.get(s))})},e.prototype.setMyID=function(t){this.myID=t},e.prototype.onSubscription=function(t){this.members=t.presence.hash,this.count=t.presence.count,this.me=this.get(this.myID)},e.prototype.addMember=function(t){return this.get(t.user_id)===null&&this.count++,this.members[t.user_id]=t.user_info,this.get(t.user_id)},e.prototype.removeMember=function(t){var n=this.get(t.user_id);return n&&(delete this.members[t.user_id],this.count--),n},e.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},e})(),w=b,q=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var u in s)s.hasOwnProperty(u)&&(i[u]=s[u])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})(),et=function(e,t,n,i){function s(u){return u instanceof n?u:new n(function(v){v(u)})}return new(n||(n=Promise))(function(u,v){function A(dt){try{L(i.next(dt))}catch(jt){v(jt)}}function z(dt){try{L(i.throw(dt))}catch(jt){v(jt)}}function L(dt){dt.done?u(dt.value):s(dt.value).then(A,z)}L((i=i.apply(e,t||[])).next())})},it=function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},i,s,u,v;return v={next:A(0),throw:A(1),return:A(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function A(L){return function(dt){return z([L,dt])}}function z(L){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,s&&(u=L[0]&2?s.return:L[0]?s.throw||((u=s.return)&&u.call(s),0):s.next)&&!(u=u.call(s,L[1])).done)return u;switch(s=0,u&&(L=[L[0]&2,u.value]),L[0]){case 0:case 1:u=L;break;case 4:return n.label++,{value:L[1],done:!1};case 5:n.label++,s=L[1],L=[0];continue;case 7:L=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(L[0]===6||L[0]===2)){n=0;continue}if(L[0]===3&&(!u||L[1]>u[0]&&L[1]<u[3])){n.label=L[1];break}if(L[0]===6&&n.label<u[1]){n.label=u[1],u=L;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(L);break}u[2]&&n.ops.pop(),n.trys.pop();continue}L=t.call(e,n)}catch(dt){L=[6,dt],s=0}finally{i=u=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}},nt=(function(e){q(t,e);function t(n,i){var s=e.call(this,n,i)||this;return s.members=new w,s}return t.prototype.authorize=function(n,i){var s=this;e.prototype.authorize.call(this,n,function(u,v){return et(s,void 0,void 0,function(){var A,z;return it(this,function(L){switch(L.label){case 0:return u?[3,3]:(v=v,v.channel_data==null?[3,1]:(A=JSON.parse(v.channel_data),this.members.setMyID(A.user_id),[3,3]));case 1:return[4,this.pusher.user.signinDonePromise];case 2:if(L.sent(),this.pusher.user.user_data!=null)this.members.setMyID(this.pusher.user.user_data.id);else return z=H.buildLogSuffix("authorizationEndpoint"),wt.error("Invalid auth response for channel '"+this.name+"', "+("expected 'channel_data' field. "+z+", ")+"or the user should be signed in."),i("Invalid auth response"),[2];L.label=3;case 3:return i(u,v),[2]}})})})},t.prototype.handleEvent=function(n){var i=n.event;if(i.indexOf("pusher_internal:")===0)this.handleInternalEvent(n);else{var s=n.data,u={};n.user_id&&(u.user_id=n.user_id),this.emit(i,s,u)}},t.prototype.handleInternalEvent=function(n){var i=n.event,s=n.data;switch(i){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(n);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(n);break;case"pusher_internal:member_added":var u=this.members.addMember(s);this.emit("pusher:member_added",u);break;case"pusher_internal:member_removed":var v=this.members.removeMember(s);v&&this.emit("pusher:member_removed",v);break}},t.prototype.handleSubscriptionSucceededEvent=function(n){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(n.data),this.emit("pusher:subscription_succeeded",this.members))},t.prototype.disconnect=function(){this.members.reset(),e.prototype.disconnect.call(this)},t})(g),h=nt,ct=pt(1),lt=pt(0),_t=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var u in s)s.hasOwnProperty(u)&&(i[u]=s[u])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})(),st=(function(e){_t(t,e);function t(n,i,s){var u=e.call(this,n,i)||this;return u.key=null,u.nacl=s,u}return t.prototype.authorize=function(n,i){var s=this;e.prototype.authorize.call(this,n,function(u,v){if(u){i(u,v);return}var A=v.shared_secret;if(!A){i(new Error("No shared_secret key in auth payload for encrypted channel: "+s.name),null);return}s.key=Object(lt.decode)(A),delete v.shared_secret,i(null,v)})},t.prototype.trigger=function(n,i){throw new Xt("Client events are not currently supported for encrypted channels")},t.prototype.handleEvent=function(n){var i=n.event,s=n.data;if(i.indexOf("pusher_internal:")===0||i.indexOf("pusher:")===0){e.prototype.handleEvent.call(this,n);return}this.handleEncryptedEvent(i,s)},t.prototype.handleEncryptedEvent=function(n,i){var s=this;if(!this.key){wt.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!i.ciphertext||!i.nonce){wt.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+i);return}var u=Object(lt.decode)(i.ciphertext);if(u.length<this.nacl.secretbox.overheadLength){wt.error("Expected encrypted event ciphertext length to be "+this.nacl.secretbox.overheadLength+", got: "+u.length);return}var v=Object(lt.decode)(i.nonce);if(v.length<this.nacl.secretbox.nonceLength){wt.error("Expected encrypted event nonce length to be "+this.nacl.secretbox.nonceLength+", got: "+v.length);return}var A=this.nacl.secretbox.open(u,v,this.key);if(A===null){wt.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),this.authorize(this.pusher.connection.socket_id,function(z,L){if(z){wt.error("Failed to make a request to the authEndpoint: "+L+". Unable to fetch new key, so dropping encrypted event");return}if(A=s.nacl.secretbox.open(u,v,s.key),A===null){wt.error("Failed to decrypt event with new key. Dropping encrypted event");return}s.emit(n,s.getDataToEmit(A))});return}this.emit(n,this.getDataToEmit(A))},t.prototype.getDataToEmit=function(n){var i=Object(ct.decode)(n);try{return JSON.parse(i)}catch{return i}},t})(g),xt=st,vt=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var u in s)s.hasOwnProperty(u)&&(i[u]=s[u])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})(),Lt=(function(e){vt(t,e);function t(n,i){var s=e.call(this)||this;s.state="initialized",s.connection=null,s.key=n,s.options=i,s.timeline=s.options.timeline,s.usingTLS=s.options.useTLS,s.errorCallbacks=s.buildErrorCallbacks(),s.connectionCallbacks=s.buildConnectionCallbacks(s.errorCallbacks),s.handshakeCallbacks=s.buildHandshakeCallbacks(s.errorCallbacks);var u=at.getNetwork();return u.bind("online",function(){s.timeline.info({netinfo:"online"}),(s.state==="connecting"||s.state==="unavailable")&&s.retryIn(0)}),u.bind("offline",function(){s.timeline.info({netinfo:"offline"}),s.connection&&s.sendActivityCheck()}),s.updateStrategy(),s}return t.prototype.connect=function(){if(!(this.connection||this.runner)){if(!this.strategy.isSupported()){this.updateState("failed");return}this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()}},t.prototype.send=function(n){return this.connection?this.connection.send(n):!1},t.prototype.send_event=function(n,i,s){return this.connection?this.connection.send_event(n,i,s):!1},t.prototype.disconnect=function(){this.disconnectInternally(),this.updateState("disconnected")},t.prototype.isUsingTLS=function(){return this.usingTLS},t.prototype.startConnecting=function(){var n=this,i=function(s,u){s?n.runner=n.strategy.connect(0,i):u.action==="error"?(n.emit("error",{type:"HandshakeError",error:u.error}),n.timeline.error({handshakeError:u.error})):(n.abortConnecting(),n.handshakeCallbacks[u.action](u))};this.runner=this.strategy.connect(0,i)},t.prototype.abortConnecting=function(){this.runner&&(this.runner.abort(),this.runner=null)},t.prototype.disconnectInternally=function(){if(this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection){var n=this.abandonConnection();n.close()}},t.prototype.updateStrategy=function(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})},t.prototype.retryIn=function(n){var i=this;this.timeline.info({action:"retry",delay:n}),n>0&&this.emit("connecting_in",Math.round(n/1e3)),this.retryTimer=new Zt(n||0,function(){i.disconnectInternally(),i.connect()})},t.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},t.prototype.setUnavailableTimer=function(){var n=this;this.unavailableTimer=new Zt(this.options.unavailableTimeout,function(){n.updateState("unavailable")})},t.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},t.prototype.sendActivityCheck=function(){var n=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new Zt(this.options.pongTimeout,function(){n.timeline.error({pong_timed_out:n.options.pongTimeout}),n.retryIn(0)})},t.prototype.resetActivityCheck=function(){var n=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new Zt(this.activityTimeout,function(){n.sendActivityCheck()}))},t.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},t.prototype.buildConnectionCallbacks=function(n){var i=this;return Y({},n,{message:function(s){i.resetActivityCheck(),i.emit("message",s)},ping:function(){i.send_event("pusher:pong",{})},activity:function(){i.resetActivityCheck()},error:function(s){i.emit("error",s)},closed:function(){i.abandonConnection(),i.shouldRetry()&&i.retryIn(1e3)}})},t.prototype.buildHandshakeCallbacks=function(n){var i=this;return Y({},n,{connected:function(s){i.activityTimeout=Math.min(i.options.activityTimeout,s.activityTimeout,s.connection.activityTimeout||1/0),i.clearUnavailableTimer(),i.setConnection(s.connection),i.socket_id=i.connection.id,i.updateState("connected",{socket_id:i.socket_id})}})},t.prototype.buildErrorCallbacks=function(){var n=this,i=function(s){return function(u){u.error&&n.emit("error",{type:"WebSocketError",error:u.error}),s(u)}};return{tls_only:i(function(){n.usingTLS=!0,n.updateStrategy(),n.retryIn(0)}),refused:i(function(){n.disconnect()}),backoff:i(function(){n.retryIn(1e3)}),retry:i(function(){n.retryIn(0)})}},t.prototype.setConnection=function(n){this.connection=n;for(var i in this.connectionCallbacks)this.connection.bind(i,this.connectionCallbacks[i]);this.resetActivityCheck()},t.prototype.abandonConnection=function(){if(this.connection){this.stopActivityCheck();for(var n in this.connectionCallbacks)this.connection.unbind(n,this.connectionCallbacks[n]);var i=this.connection;return this.connection=null,i}},t.prototype.updateState=function(n,i){var s=this.state;if(this.state=n,s!==n){var u=n;u==="connected"&&(u+=" with new socket ID "+i.socket_id),wt.debug("State changed",s+" -> "+u),this.timeline.info({state:n,params:i}),this.emit("state_change",{previous:s,current:n}),this.emit(n,i)}},t.prototype.shouldRetry=function(){return this.state==="connecting"||this.state==="connected"},t})(Gt),mt=Lt,Et=(function(){function e(){this.channels={}}return e.prototype.add=function(t,n){return this.channels[t]||(this.channels[t]=kt(t,n)),this.channels[t]},e.prototype.all=function(){return we(this.channels)},e.prototype.find=function(t){return this.channels[t]},e.prototype.remove=function(t){var n=this.channels[t];return delete this.channels[t],n},e.prototype.disconnect=function(){Jt(this.channels,function(t){t.disconnect()})},e})(),Ot=Et;function kt(e,t){if(e.indexOf("private-encrypted-")===0){if(t.config.nacl)return Tt.createEncryptedChannel(e,t,t.config.nacl);var n="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",i=H.buildLogSuffix("encryptedChannelSupport");throw new Xt(n+". "+i)}else{if(e.indexOf("private-")===0)return Tt.createPrivateChannel(e,t);if(e.indexOf("presence-")===0)return Tt.createPresenceChannel(e,t);if(e.indexOf("#")===0)throw new D('Cannot create a channel with name "'+e+'".');return Tt.createChannel(e,t)}}var Nt={createChannels:function(){return new Ot},createConnectionManager:function(e,t){return new mt(e,t)},createChannel:function(e,t){return new p(e,t)},createPrivateChannel:function(e,t){return new g(e,t)},createPresenceChannel:function(e,t){return new h(e,t)},createEncryptedChannel:function(e,t,n){return new xt(e,t,n)},createTimelineSender:function(e,t){return new I(e,t)},createHandshake:function(e,t){return new B(e,t)},createAssistantToTheTransportManager:function(e,t,n){return new X(e,t,n)}},Tt=Nt,Ut=(function(){function e(t){this.options=t||{},this.livesLeft=this.options.lives||1/0}return e.prototype.getAssistant=function(t){return Tt.createAssistantToTheTransportManager(this,t,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},e.prototype.isAlive=function(){return this.livesLeft>0},e.prototype.reportDeath=function(){this.livesLeft-=1},e})(),Rt=Ut,Dn=(function(){function e(t,n){this.strategies=t,this.loop=!!n.loop,this.failFast=!!n.failFast,this.timeout=n.timeout,this.timeoutLimit=n.timeoutLimit}return e.prototype.isSupported=function(){return Ie(this.strategies,St.method("isSupported"))},e.prototype.connect=function(t,n){var i=this,s=this.strategies,u=0,v=this.timeout,A=null,z=function(L,dt){dt?n(null,dt):(u=u+1,i.loop&&(u=u%s.length),u<s.length?(v&&(v=v*2,i.timeoutLimit&&(v=Math.min(v,i.timeoutLimit))),A=i.tryStrategy(s[u],t,{timeout:v,failFast:i.failFast},z)):n(!0))};return A=this.tryStrategy(s[u],t,{timeout:v,failFast:this.failFast},z),{abort:function(){A.abort()},forceMinPriority:function(L){t=L,A&&A.forceMinPriority(L)}}},e.prototype.tryStrategy=function(t,n,i,s){var u=null,v=null;return i.timeout>0&&(u=new Zt(i.timeout,function(){v.abort(),s(!0)})),v=t.connect(n,function(A,z){A&&u&&u.isRunning()&&!i.failFast||(u&&u.ensureAborted(),s(A,z))}),{abort:function(){u&&u.ensureAborted(),v.abort()},forceMinPriority:function(A){v.forceMinPriority(A)}}},e})(),ge=Dn,Hn=(function(){function e(t){this.strategies=t}return e.prototype.isSupported=function(){return Ie(this.strategies,St.method("isSupported"))},e.prototype.connect=function(t,n){return qn(this.strategies,t,function(i,s){return function(u,v){if(s[i].error=u,u){zn(s)&&n(!0);return}fe(s,function(A){A.forceMinPriority(v.transport.priority)}),n(null,v)}})},e})(),ln=Hn;function qn(e,t,n){var i=pe(e,function(s,u,v,A){return s.connect(t,n(u,A))});return{abort:function(){fe(i,Fn)},forceMinPriority:function(s){fe(i,function(u){u.forceMinPriority(s)})}}}function zn(e){return en(e,function(t){return!!t.error})}function Fn(e){!e.error&&!e.aborted&&(e.abort(),e.aborted=!0)}var Yn=(function(){function e(t,n,i){this.strategy=t,this.transports=n,this.ttl=i.ttl||1800*1e3,this.usingTLS=i.useTLS,this.timeline=i.timeline}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,n){var i=this.usingTLS,s=Jn(i),u=[this.strategy];if(s&&s.timestamp+this.ttl>=St.now()){var v=this.transports[s.transport];v&&(this.timeline.info({cached:!0,transport:s.transport,latency:s.latency}),u.push(new ge([v],{timeout:s.latency*2+1e3,failFast:!0})))}var A=St.now(),z=u.pop().connect(t,function L(dt,jt){dt?(mn(i),u.length>0?(A=St.now(),z=u.pop().connect(t,L)):n(dt)):(Xn(i,jt.transport.name,St.now()-A),n(null,jt))});return{abort:function(){z.abort()},forceMinPriority:function(L){t=L,z&&z.forceMinPriority(L)}}},e})(),$n=Yn;function dn(e){return"pusherTransport"+(e?"TLS":"NonTLS")}function Jn(e){var t=at.getLocalStorage();if(t)try{var n=t[dn(e)];if(n)return JSON.parse(n)}catch{mn(e)}return null}function Xn(e,t,n){var i=at.getLocalStorage();if(i)try{i[dn(e)]=ce({timestamp:St.now(),transport:t,latency:n})}catch{}}function mn(e){var t=at.getLocalStorage();if(t)try{delete t[dn(e)]}catch{}}var Wn=(function(){function e(t,n){var i=n.delay;this.strategy=t,this.options={delay:i}}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,n){var i=this.strategy,s,u=new Zt(this.options.delay,function(){s=i.connect(t,n)});return{abort:function(){u.ensureAborted(),s&&s.abort()},forceMinPriority:function(v){t=v,s&&s.forceMinPriority(v)}}},e})(),an=Wn,Gn=(function(){function e(t,n,i){this.test=t,this.trueBranch=n,this.falseBranch=i}return e.prototype.isSupported=function(){var t=this.test()?this.trueBranch:this.falseBranch;return t.isSupported()},e.prototype.connect=function(t,n){var i=this.test()?this.trueBranch:this.falseBranch;return i.connect(t,n)},e})(),$e=Gn,Kn=(function(){function e(t){this.strategy=t}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,n){var i=this.strategy.connect(t,function(s,u){u&&i.abort(),n(s,u)});return i},e})(),Zn=Kn;function Je(e){return function(){return e.isSupported()}}var Vn=function(e,t,n){var i={};function s(Rn,fi,ci,ui,hi){var In=n(e,Rn,fi,ci,ui,hi);return i[Rn]=In,In}var u=Object.assign({},t,{hostNonTLS:e.wsHost+":"+e.wsPort,hostTLS:e.wsHost+":"+e.wssPort,httpPath:e.wsPath}),v=Object.assign({},u,{useTLS:!0}),A=Object.assign({},t,{hostNonTLS:e.httpHost+":"+e.httpPort,hostTLS:e.httpHost+":"+e.httpsPort,httpPath:e.httpPath}),z={loop:!0,timeout:15e3,timeoutLimit:6e4},L=new Rt({lives:2,minPingDelay:1e4,maxPingDelay:e.activityTimeout}),dt=new Rt({lives:2,minPingDelay:1e4,maxPingDelay:e.activityTimeout}),jt=s("ws","ws",3,u,L),te=s("wss","ws",3,v,L),ri=s("sockjs","sockjs",1,A),En=s("xhr_streaming","xhr_streaming",1,A,dt),ii=s("xdr_streaming","xdr_streaming",1,A,dt),On=s("xhr_polling","xhr_polling",1,A),oi=s("xdr_polling","xdr_polling",1,A),kn=new ge([jt],z),si=new ge([te],z),ai=new ge([ri],z),Ln=new ge([new $e(Je(En),En,ii)],z),Nn=new ge([new $e(Je(On),On,oi)],z),jn=new ge([new $e(Je(Ln),new ln([Ln,new an(Nn,{delay:4e3})]),Nn)],z),vn=new $e(Je(jn),jn,ai),yn;return t.useTLS?yn=new ln([kn,new an(vn,{delay:2e3})]):yn=new ln([kn,new an(si,{delay:2e3}),new an(vn,{delay:5e3})]),new $n(new Zn(new $e(Je(jt),yn,vn)),i,{ttl:18e5,timeline:t.timeline,useTLS:t.useTLS})},Qn=Vn,tr=(function(){var e=this;e.timeline.info(e.buildTimelineMessage({transport:e.name+(e.options.useTLS?"s":"")})),e.hooks.isInitialized()?e.changeState("initialized"):e.hooks.file?(e.changeState("initializing"),tt.load(e.hooks.file,{useTLS:e.options.useTLS},function(t,n){e.hooks.isInitialized()?(e.changeState("initialized"),n(!0)):(t&&e.onError(t),e.onClose(),n(!1))})):e.onClose()}),er={getRequest:function(e){var t=new window.XDomainRequest;return t.ontimeout=function(){e.emit("error",new Ct),e.close()},t.onerror=function(n){e.emit("error",n),e.close()},t.onprogress=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText)},t.onload=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText),e.emit("finished",200),e.close()},t},abortRequest:function(e){e.ontimeout=e.onerror=e.onprogress=e.onload=null,e.abort()}},nr=er,rr=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var u in s)s.hasOwnProperty(u)&&(i[u]=s[u])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})(),ir=256*1024,or=(function(e){rr(t,e);function t(n,i,s){var u=e.call(this)||this;return u.hooks=n,u.method=i,u.url=s,u}return t.prototype.start=function(n){var i=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){i.close()},at.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(n)},t.prototype.close=function(){this.unloader&&(at.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},t.prototype.onChunk=function(n,i){for(;;){var s=this.advanceBuffer(i);if(s)this.emit("chunk",{status:n,data:s});else break}this.isBufferTooLong(i)&&this.emit("buffer_too_long")},t.prototype.advanceBuffer=function(n){var i=n.slice(this.position),s=i.indexOf(`
|
|
2
|
+
`);return s!==-1?(this.position+=s+1,i.slice(0,s)):null},t.prototype.isBufferTooLong=function(n){return this.position===n.length&&n.length>ir},t})(Gt),sr=or,pn;(function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSED=3]="CLOSED"})(pn||(pn={}));var _e=pn,ar=1,fr=(function(){function e(t,n){this.hooks=t,this.session=Sn(1e3)+"/"+lr(8),this.location=cr(n),this.readyState=_e.CONNECTING,this.openStream()}return e.prototype.send=function(t){return this.sendRaw(JSON.stringify([t]))},e.prototype.ping=function(){this.hooks.sendHeartbeat(this)},e.prototype.close=function(t,n){this.onClose(t,n,!0)},e.prototype.sendRaw=function(t){if(this.readyState===_e.OPEN)try{return at.createSocketRequest("POST",wn(ur(this.location,this.session))).start(t),!0}catch{return!1}else return!1},e.prototype.reconnect=function(){this.closeStream(),this.openStream()},e.prototype.onClose=function(t,n,i){this.closeStream(),this.readyState=_e.CLOSED,this.onclose&&this.onclose({code:t,reason:n,wasClean:i})},e.prototype.onChunk=function(t){if(t.status===200){this.readyState===_e.OPEN&&this.onActivity();var n,i=t.data.slice(0,1);switch(i){case"o":n=JSON.parse(t.data.slice(1)||"{}"),this.onOpen(n);break;case"a":n=JSON.parse(t.data.slice(1)||"[]");for(var s=0;s<n.length;s++)this.onEvent(n[s]);break;case"m":n=JSON.parse(t.data.slice(1)||"null"),this.onEvent(n);break;case"h":this.hooks.onHeartbeat(this);break;case"c":n=JSON.parse(t.data.slice(1)||"[]"),this.onClose(n[0],n[1],!0);break}}},e.prototype.onOpen=function(t){this.readyState===_e.CONNECTING?(t&&t.hostname&&(this.location.base=hr(this.location.base,t.hostname)),this.readyState=_e.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)},e.prototype.onEvent=function(t){this.readyState===_e.OPEN&&this.onmessage&&this.onmessage({data:t})},e.prototype.onActivity=function(){this.onactivity&&this.onactivity()},e.prototype.onError=function(t){this.onerror&&this.onerror(t)},e.prototype.openStream=function(){var t=this;this.stream=at.createSocketRequest("POST",wn(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",function(n){t.onChunk(n)}),this.stream.bind("finished",function(n){t.hooks.onFinished(t,n)}),this.stream.bind("buffer_too_long",function(){t.reconnect()});try{this.stream.start()}catch(n){St.defer(function(){t.onError(n),t.onClose(1006,"Could not start streaming",!1)})}},e.prototype.closeStream=function(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)},e})();function cr(e){var t=/([^\?]*)\/*(\??.*)/.exec(e);return{base:t[1],queryString:t[2]}}function ur(e,t){return e.base+"/"+t+"/xhr_send"}function wn(e){var t=e.indexOf("?")===-1?"?":"&";return e+t+"t="+ +new Date+"&n="+ar++}function hr(e,t){var n=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(e);return n[1]+t+n[3]}function Sn(e){return at.randomInt(e)}function lr(e){for(var t=[],n=0;n<e;n++)t.push(Sn(32).toString(32));return t.join("")}var dr=fr,pr={getReceiveURL:function(e,t){return e.base+"/"+t+"/xhr_streaming"+e.queryString},onHeartbeat:function(e){e.sendRaw("[]")},sendHeartbeat:function(e){e.sendRaw("[]")},onFinished:function(e,t){e.onClose(1006,"Connection interrupted ("+t+")",!1)}},xr=pr,vr={getReceiveURL:function(e,t){return e.base+"/"+t+"/xhr"+e.queryString},onHeartbeat:function(){},sendHeartbeat:function(e){e.sendRaw("[]")},onFinished:function(e,t){t===200?e.reconnect():e.onClose(1006,"Connection interrupted ("+t+")",!1)}},yr=vr,gr={getRequest:function(e){var t=at.getXHRAPI(),n=new t;return n.onreadystatechange=n.onprogress=function(){switch(n.readyState){case 3:n.responseText&&n.responseText.length>0&&e.onChunk(n.status,n.responseText);break;case 4:n.responseText&&n.responseText.length>0&&e.onChunk(n.status,n.responseText),e.emit("finished",n.status),e.close();break}},n},abortRequest:function(e){e.onreadystatechange=null,e.abort()}},_r=gr,br={createStreamingSocket:function(e){return this.createSocket(xr,e)},createPollingSocket:function(e){return this.createSocket(yr,e)},createSocket:function(e,t){return new dr(e,t)},createXHR:function(e,t){return this.createRequest(_r,e,t)},createRequest:function(e,t,n){return new sr(e,t,n)}},Cn=br;Cn.createXDR=function(e,t){return this.createRequest(nr,e,t)};var mr=Cn,wr={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:y,DependenciesReceivers:ut,getDefaultStrategy:Qn,Transports:M,transportConnectionInitializer:tr,HTTPFactory:mr,TimelineTransport:Te,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(e){var t=this;window.Pusher=e;var n=function(){t.onDocumentBody(e.ready)};window.JSON?n():tt.load("json2",{},n)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:We,jsonp:Ce}},onDocumentBody:function(e){var t=this;document.body?e():setTimeout(function(){t.onDocumentBody(e)},0)},createJSONPRequest:function(e,t){return new un(e,t)},createScriptRequest:function(e){return new De(e)},getLocalStorage:function(){try{return window.localStorage}catch{return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){var e=this.getXHRAPI();return new e},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return N},createWebSocket:function(e){var t=this.getWebSocketAPI();return new t(e)},createSocketRequest:function(e,t){if(this.isXHRSupported())return this.HTTPFactory.createXHR(e,t);if(this.isXDRSupported(t.indexOf("https:")===0))return this.HTTPFactory.createXDR(e,t);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var e=this.getXHRAPI();return!!e&&new e().withCredentials!==void 0},isXDRSupported:function(e){var t=e?"https:":"http:",n=this.getProtocol();return!!window.XDomainRequest&&n===t},addUnloadListener:function(e){window.addEventListener!==void 0?window.addEventListener("unload",e,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",e)},removeUnloadListener:function(e){window.addEventListener!==void 0?window.removeEventListener("unload",e,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",e)},randomInt:function(e){var t=function(){var n=window.crypto||window.msCrypto,i=n.getRandomValues(new Uint32Array(1))[0];return i/Math.pow(2,32)};return Math.floor(t()*e)}},at=wr,xn;(function(e){e[e.ERROR=3]="ERROR",e[e.INFO=6]="INFO",e[e.DEBUG=7]="DEBUG"})(xn||(xn={}));var fn=xn,Sr=(function(){function e(t,n,i){this.key=t,this.session=n,this.events=[],this.options=i||{},this.sent=0,this.uniqueID=0}return e.prototype.log=function(t,n){t<=this.options.level&&(this.events.push(Y({},n,{timestamp:St.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},e.prototype.error=function(t){this.log(fn.ERROR,t)},e.prototype.info=function(t){this.log(fn.INFO,t)},e.prototype.debug=function(t){this.log(fn.DEBUG,t)},e.prototype.isEmpty=function(){return this.events.length===0},e.prototype.send=function(t,n){var i=this,s=Y({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],t(s,function(u,v){u||i.sent++,n&&n(u,v)}),!0},e.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},e})(),Cr=Sr,Tr=(function(){function e(t,n,i,s){this.name=t,this.priority=n,this.transport=i,this.options=s||{}}return e.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},e.prototype.connect=function(t,n){var i=this;if(this.isSupported()){if(this.priority<t)return Tn(new ft,n)}else return Tn(new Bt,n);var s=!1,u=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),v=null,A=function(){u.unbind("initialized",A),u.connect()},z=function(){v=Tt.createHandshake(u,function(te){s=!0,jt(),n(null,te)})},L=function(te){jt(),n(te)},dt=function(){jt();var te;te=ce(u),n(new Ft(te))},jt=function(){u.unbind("initialized",A),u.unbind("open",z),u.unbind("error",L),u.unbind("closed",dt)};return u.bind("initialized",A),u.bind("open",z),u.bind("error",L),u.bind("closed",dt),u.initialize(),{abort:function(){s||(jt(),v?v.close():u.close())},forceMinPriority:function(te){s||i.priority<te&&(v?v.close():u.close())}}},e})(),Ar=Tr;function Tn(e,t){return St.defer(function(){t(e)}),{abort:function(){},forceMinPriority:function(){}}}var Pr=at.Transports,Er=function(e,t,n,i,s,u){var v=Pr[n];if(!v)throw new qt(n);var A=(!e.enabledTransports||Re(e.enabledTransports,t)!==-1)&&(!e.disabledTransports||Re(e.disabledTransports,t)===-1),z;return A?(s=Object.assign({ignoreNullOrigin:e.ignoreNullOrigin},s),z=new Ar(t,i,u?u.getAssistant(v):v,s)):z=Or,z},Or={isSupported:function(){return!1},connect:function(e,t){var n=St.defer(function(){t(new Bt)});return{abort:function(){n.ensureAborted()},forceMinPriority:function(){}}}},kr=function(e,t){var n="socket_id="+encodeURIComponent(e.socketId);for(var i in t.params)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t.params[i]);if(t.paramsProvider!=null){var s=t.paramsProvider();for(var i in s)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(s[i])}return n},Lr=function(e){if(typeof at.getAuthorizers()[e.transport]>"u")throw"'"+e.transport+"' is not a recognized auth transport";return function(t,n){var i=kr(t,e);at.getAuthorizers()[e.transport](at,i,e,T.UserAuthentication,n)}},Nr=Lr,jr=function(e,t){var n="socket_id="+encodeURIComponent(e.socketId);n+="&channel_name="+encodeURIComponent(e.channelName);for(var i in t.params)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t.params[i]);if(t.paramsProvider!=null){var s=t.paramsProvider();for(var i in s)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(s[i])}return n},Rr=function(e){if(typeof at.getAuthorizers()[e.transport]>"u")throw"'"+e.transport+"' is not a recognized auth transport";return function(t,n){var i=jr(t,e);at.getAuthorizers()[e.transport](at,i,e,T.ChannelAuthorization,n)}},Ir=Rr,Ur=function(e,t,n){var i={authTransport:t.transport,authEndpoint:t.endpoint,auth:{params:t.params,headers:t.headers}};return function(s,u){var v=e.channel(s.channelName),A=n(v,i);A.authorize(s.socketId,u)}},Ee=function(){return Ee=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},Ee.apply(this,arguments)};function Mr(e,t){var n={activityTimeout:e.activityTimeout||ot.activityTimeout,cluster:e.cluster||ot.cluster,httpPath:e.httpPath||ot.httpPath,httpPort:e.httpPort||ot.httpPort,httpsPort:e.httpsPort||ot.httpsPort,pongTimeout:e.pongTimeout||ot.pongTimeout,statsHost:e.statsHost||ot.stats_host,unavailableTimeout:e.unavailableTimeout||ot.unavailableTimeout,wsPath:e.wsPath||ot.wsPath,wsPort:e.wsPort||ot.wsPort,wssPort:e.wssPort||ot.wssPort,enableStats:qr(e),httpHost:Br(e),useTLS:Hr(e),wsHost:Dr(e),userAuthenticator:zr(e),channelAuthorizer:Yr(e,t)};return"disabledTransports"in e&&(n.disabledTransports=e.disabledTransports),"enabledTransports"in e&&(n.enabledTransports=e.enabledTransports),"ignoreNullOrigin"in e&&(n.ignoreNullOrigin=e.ignoreNullOrigin),"timelineParams"in e&&(n.timelineParams=e.timelineParams),"nacl"in e&&(n.nacl=e.nacl),n}function Br(e){return e.httpHost?e.httpHost:e.cluster?"sockjs-"+e.cluster+".pusher.com":ot.httpHost}function Dr(e){return e.wsHost?e.wsHost:e.cluster?An(e.cluster):An(ot.cluster)}function An(e){return"ws-"+e+".pusher.com"}function Hr(e){return at.getProtocol()==="https:"?!0:e.forceTLS!==!1}function qr(e){return"enableStats"in e?e.enableStats:"disableStats"in e?!e.disableStats:!1}function zr(e){var t=Ee(Ee({},ot.userAuthentication),e.userAuthentication);return"customHandler"in t&&t.customHandler!=null?t.customHandler:Nr(t)}function Fr(e,t){var n;return"channelAuthorization"in e?n=Ee(Ee({},ot.channelAuthorization),e.channelAuthorization):(n={transport:e.authTransport||ot.authTransport,endpoint:e.authEndpoint||ot.authEndpoint},"auth"in e&&("params"in e.auth&&(n.params=e.auth.params),"headers"in e.auth&&(n.headers=e.auth.headers)),"authorizer"in e&&(n.customHandler=Ur(t,n,e.authorizer))),n}function Yr(e,t){var n=Fr(e,t);return"customHandler"in n&&n.customHandler!=null?n.customHandler:Ir(n)}var $r=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var u in s)s.hasOwnProperty(u)&&(i[u]=s[u])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})(),Jr=(function(e){$r(t,e);function t(n){var i=e.call(this,function(s,u){wt.debug("No callbacks on watchlist events for "+s)})||this;return i.pusher=n,i.bindWatchlistInternalEvent(),i}return t.prototype.handleEvent=function(n){var i=this;n.data.events.forEach(function(s){i.emit(s.name,s)})},t.prototype.bindWatchlistInternalEvent=function(){var n=this;this.pusher.connection.bind("message",function(i){var s=i.event;s==="pusher_internal:watchlist_events"&&n.handleEvent(i)})},t})(Gt),Xr=Jr;function Wr(){var e,t,n=new Promise(function(i,s){e=i,t=s});return{promise:n,resolve:e,reject:t}}var Gr=Wr,Kr=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var u in s)s.hasOwnProperty(u)&&(i[u]=s[u])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})(),Zr=(function(e){Kr(t,e);function t(n){var i=e.call(this,function(s,u){wt.debug("No callbacks on user for "+s)})||this;return i.signin_requested=!1,i.user_data=null,i.serverToUserChannel=null,i.signinDonePromise=null,i._signinDoneResolve=null,i._onAuthorize=function(s,u){if(s){wt.warn("Error during signin: "+s),i._cleanup();return}i.pusher.send_event("pusher:signin",{auth:u.auth,user_data:u.user_data})},i.pusher=n,i.pusher.connection.bind("state_change",function(s){var u=s.previous,v=s.current;u!=="connected"&&v==="connected"&&i._signin(),u==="connected"&&v!=="connected"&&(i._cleanup(),i._newSigninPromiseIfNeeded())}),i.watchlist=new Xr(n),i.pusher.connection.bind("message",function(s){var u=s.event;u==="pusher:signin_success"&&i._onSigninSuccess(s.data),i.serverToUserChannel&&i.serverToUserChannel.name===s.channel&&i.serverToUserChannel.handleEvent(s)}),i}return t.prototype.signin=function(){this.signin_requested||(this.signin_requested=!0,this._signin())},t.prototype._signin=function(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),this.pusher.connection.state==="connected"&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))},t.prototype._onSigninSuccess=function(n){try{this.user_data=JSON.parse(n.user_data)}catch{wt.error("Failed parsing user data after signin: "+n.user_data),this._cleanup();return}if(typeof this.user_data.id!="string"||this.user_data.id===""){wt.error("user_data doesn't contain an id. user_data: "+this.user_data),this._cleanup();return}this._signinDoneResolve(),this._subscribeChannels()},t.prototype._subscribeChannels=function(){var n=this,i=function(s){s.subscriptionPending&&s.subscriptionCancelled?s.reinstateSubscription():!s.subscriptionPending&&n.pusher.connection.state==="connected"&&s.subscribe()};this.serverToUserChannel=new p("#server-to-user-"+this.user_data.id,this.pusher),this.serverToUserChannel.bind_global(function(s,u){s.indexOf("pusher_internal:")===0||s.indexOf("pusher:")===0||n.emit(s,u)}),i(this.serverToUserChannel)},t.prototype._cleanup=function(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()},t.prototype._newSigninPromiseIfNeeded=function(){if(this.signin_requested&&!(this.signinDonePromise&&!this.signinDonePromise.done)){var n=Gr(),i=n.promise,s=n.resolve;i.done=!1;var u=function(){i.done=!0};i.then(u).catch(u),this.signinDonePromise=i,this._signinDoneResolve=s}},t})(Gt),Vr=Zr,Pn=(function(){function e(t,n){var i=this;if(Qr(t),n=n||{},!n.cluster&&!(n.wsHost||n.httpHost)){var s=H.buildLogSuffix("javascriptQuickStart");wt.warn("You should always specify a cluster when connecting. "+s)}"disableStats"in n&&wt.warn("The disableStats option is deprecated in favor of enableStats"),this.key=t,this.config=Mr(n,this),this.channels=Tt.createChannels(),this.global_emitter=new Gt,this.sessionID=at.randomInt(1e9),this.timeline=new Cr(this.key,this.sessionID,{cluster:this.config.cluster,features:e.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:fn.INFO,version:ot.VERSION}),this.config.enableStats&&(this.timelineSender=Tt.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+at.TimelineTransport.name}));var u=function(v){return at.getDefaultStrategy(i.config,v,Er)};this.connection=Tt.createConnectionManager(this.key,{getStrategy:u,timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:!!this.config.useTLS}),this.connection.bind("connected",function(){i.subscribeAll(),i.timelineSender&&i.timelineSender.send(i.connection.isUsingTLS())}),this.connection.bind("message",function(v){var A=v.event,z=A.indexOf("pusher_internal:")===0;if(v.channel){var L=i.channel(v.channel);L&&L.handleEvent(v)}z||i.global_emitter.emit(v.event,v.data)}),this.connection.bind("connecting",function(){i.channels.disconnect()}),this.connection.bind("disconnected",function(){i.channels.disconnect()}),this.connection.bind("error",function(v){wt.warn(v)}),e.instances.push(this),this.timeline.info({instances:e.instances.length}),this.user=new Vr(this),e.isReady&&this.connect()}return e.ready=function(){e.isReady=!0;for(var t=0,n=e.instances.length;t<n;t++)e.instances[t].connect()},e.getClientFeatures=function(){return de(tn({ws:at.Transports.ws},function(t){return t.isSupported({})}))},e.prototype.channel=function(t){return this.channels.find(t)},e.prototype.allChannels=function(){return this.channels.all()},e.prototype.connect=function(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var t=this.connection.isUsingTLS(),n=this.timelineSender;this.timelineSenderTimer=new je(6e4,function(){n.send(t)})}},e.prototype.disconnect=function(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)},e.prototype.bind=function(t,n,i){return this.global_emitter.bind(t,n,i),this},e.prototype.unbind=function(t,n,i){return this.global_emitter.unbind(t,n,i),this},e.prototype.bind_global=function(t){return this.global_emitter.bind_global(t),this},e.prototype.unbind_global=function(t){return this.global_emitter.unbind_global(t),this},e.prototype.unbind_all=function(t){return this.global_emitter.unbind_all(),this},e.prototype.subscribeAll=function(){var t;for(t in this.channels.channels)this.channels.channels.hasOwnProperty(t)&&this.subscribe(t)},e.prototype.subscribe=function(t){var n=this.channels.add(t,this);return n.subscriptionPending&&n.subscriptionCancelled?n.reinstateSubscription():!n.subscriptionPending&&this.connection.state==="connected"&&n.subscribe(),n},e.prototype.unsubscribe=function(t){var n=this.channels.find(t);n&&n.subscriptionPending?n.cancelSubscription():(n=this.channels.remove(t),n&&n.subscribed&&n.unsubscribe())},e.prototype.send_event=function(t,n,i){return this.connection.send_event(t,n,i)},e.prototype.shouldUseTLS=function(){return this.config.useTLS},e.prototype.signin=function(){this.user.signin()},e.instances=[],e.isReady=!1,e.logToConsole=!1,e.Runtime=at,e.ScriptReceivers=at.ScriptReceivers,e.DependenciesReceivers=at.DependenciesReceivers,e.auth_callbacks=at.auth_callbacks,e})(),Oe=Pn;function Qr(e){if(e==null)throw"You must pass your app key when you instantiate Pusher."}at.setup(Pn);var ti=pt(2),ei=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var u in s)s.hasOwnProperty(u)&&(i[u]=s[u])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})(),ni=(function(e){ei(t,e);function t(n,i){var s=this;return Oe.logToConsole=t.logToConsole,Oe.log=t.log,i=i||{},i.nacl=ti,s=e.call(this,n,i)||this,s}return t})(Oe);rt.default=ni})])})})(gn)),gn.exports}var _n,Mn;function bi(){return Mn||(Mn=1,_n=_i()),_n}var mi=bi();const wi=gi(mi),bn=`${Mt.BASE_URL}/api/notification`,Si=yt=>Mt.api.get(bn,{params:{...yt}}),Ci=yt=>Mt.api.put(`${bn}/${yt}`),Ti=()=>Mt.api.put(`${bn}/updateAllStatus`),Ai={currentPage:1,pageSize:30,searchString:"",isRead:!1},Pi="Notification list",Bn="NOTIFICATION_CHANNEL",Ei="NEW_NOTIFICATION",Oi=()=>{const yt=be.useDispatch(),{roles:$t}=li.useParams(),At=be.useSelector(D=>D.common.user),rt=At?.id,pt=At?.studentId,S=be.useSelector(D=>D.notification.notificationList),y=be.useSelector(D=>D.common.user.pusherKey),Pt=be.useSelector(D=>D.common.user.pusherCluster),ot=be.useSelector(D=>D.notification.totalItems),Ht=be.useSelector(D=>D.notification.unReadNotification),[R,ut]=le.useState(Ai),[tt,$]=le.useState(!1),bt=D=>ut({...R,...D}),H=D=>{const{source:Ct,extraData:ft}=D;switch(Ct){case"AssessmentAssignment":window.open(`/player/diagnosticsurvey/${Number(ft)}`);break;case"NewConferenceCreated":window.open(`/start-conference/${JSON.parse(ft)?.[0]}/${JSON.parse(ft)?.[1]}/conferenceRubric`);break;case"Class Reflection":window.open(`/start-reflection/${ft?.replace(/[\[\]]/g,"")?.split(",")?.[1]}`);break;case"Class Reflection Completed":window.open(`/result-reflection/${ft?.replace(/[\[\]]/g,"")?.split(",")?.[1]}`);break;case"External Reflection Completed":window.open(`/result-reflection/${JSON.parse(ft)?.[0]}/external`);break;case"NewSessionCreated":window.open(`/start-question/${JSON.parse(ft)?.[0]}/${JSON.parse(ft)?.[1]}`);break;case"NewSessionComplete":window.open(`/start-question/${JSON.parse(ft)?.[0]}/${JSON.parse(ft)?.[1]}`);break;case"ActionPointReminder":window.open("/action-point/to-do");break;case"SendNotiPLP":window.open("/personal-learning-plan");break;case"SendNotiGOAL":window.open(`/my-goals/${JSON.parse(ft)}`);break;case"CertificateApproved":window.open("/dashboard/certification/2");break;case"RequestCheckIn":window.open(`/start-question/${JSON.parse(ft)?.[0]}/${JSON.parse(ft)?.[1]}`);case"NewSurveyCreated":pt&&window.open(`/start-survey/${JSON.parse(ft)?.[0]}/${pt}`);break;case"StudentCompletedSurvey":window.open(`/start-survey/${JSON.parse(ft)?.[0]}/${JSON.parse(ft)?.[1]}`);break}},T=le.useCallback(async()=>{yt(Mt.setLoading(!0));try{const D=await Si({...R,roles:$t?.trim()?[$t]:At?.roles}),{items:Ct,totalItems:ft}=D.data;yt(Mt.setNotification({notificationList:Ct,totalItems:ft}))}catch(D){yt(Mt.setAlert({type:"danger",message:D.response?.data?.title||D.message}))}yt(Mt.setLoading(!1))},[R]);le.useEffect(()=>{document.title=Pi},[]),le.useEffect(()=>{T();const D=new wi(y,{cluster:Pt});return D.subscribe(`${Bn}-${rt}`).bind(Ei,T),()=>D.unsubscribe(`${Bn}-${rt}`)},[R,rt]);const P=le.useCallback((D,Ct)=>{try{yt(Mt.setModal({isOpen:!0,type:"warning",message:`Do you want to mark this notification ${Ct?"read":"unread"}?`,onConfirm:async()=>{await Ci(D),T()}}))}catch(ft){yt(Mt.setAlert({type:"danger",message:ft.response?.data?.title||ft.message}))}},[S,Ht]),V=le.useCallback(async()=>{try{if(S.length===0)throw new Error("There are no unread messages");yt(Mt.setModal({isOpen:!0,type:"warning",message:"Do you want to mark all notification ?",onConfirm:async()=>{$(!0),await Ti(),T(),$(!1)}}))}catch(D){yt(Mt.setAlert({type:"danger",message:D.response?.data?.title||D.message}))}},[S]);return{notificationList:S,totalItems:ot,unReadNotification:Ht,filters:R,changeFilters:bt,updateNotification:P,viewNotification:H,updateAll:V,toggleUpdateAllStatus:tt}},ki="_container_1bf04_1",Li="_header_1bf04_7",Ni="_markAllBtn_1bf04_14",ji="_markAllText_1bf04_21",Ri="_markAllCheckbox_1bf04_27",Ii="_filterContainer_1bf04_35",Ui="_filterLabel_1bf04_40",Mi="_tableWrapper_1bf04_52",Bi="_tableHead_1bf04_60",Di="_thText_1bf04_69",Hi="_td_1bf04_73",qi="_rowText_1bf04_77",zi="_rowTime_1bf04_82",Fi="_checkboxInput_1bf04_87",Yi="_actionBtn_1bf04_95",$i="_iconContainer_1bf04_104",Ji="_iconGreen_1bf04_114",Xi="_iconOrange_1bf04_118",Wi="_iconRed_1bf04_122",Gi="_iconYellow_1bf04_126",Ki="_flagIcon_1bf04_140",Zi="_flagIconRed_1bf04_145",Vi="_flagIconYellow_1bf04_149",Qi="_tooltipContainer_1bf04_153",to="_tooltipText_1bf04_157",eo="_whiteTooltip_1bf04_163",no="_redText_1bf04_173",ht={container:ki,header:Li,markAllBtn:Ni,markAllText:ji,markAllCheckbox:Ri,filterContainer:Ii,filterLabel:Ui,tableWrapper:Mi,tableHead:Bi,thText:Di,td:Hi,rowText:qi,rowTime:zi,checkboxInput:Fi,actionBtn:Yi,iconContainer:$i,iconGreen:Ji,iconOrange:Xi,iconRed:Wi,iconYellow:Gi,"explain-icon":"_explain-icon_1bf04_134",flagIcon:Ki,flagIconRed:Zi,flagIconYellow:Vi,tooltipContainer:Qi,tooltipText:to,whiteTooltip:eo,redText:no},ro="Notifications",io="/images/info-icon.png",oo=yt=>{const $t=(yt.text||"").toLowerCase(),At=yt.informaions?.[0]?.toLowerCase();return $t.includes("red flag")||At?.includes("red")?K.jsx("div",{className:`${ht.iconContainer} ${ht.iconRed}`,children:K.jsx("img",{src:"/images/flag-icon.svg",alt:"Red flag",className:`${ht.flagIcon} ${ht.flagIconRed}`})}):$t.includes("yellow flag")||At?.includes("yellow")?K.jsx("div",{className:`${ht.iconContainer} ${ht.iconYellow}`,children:K.jsx("img",{src:"/images/flag-icon.svg",alt:"Yellow flag",className:`${ht.flagIcon} ${ht.flagIconYellow}`})}):$t.includes("completed a check-in")||$t.includes("completed a survey")||yt.source==="NewSessionComplete"||yt.source==="Class Reflection Completed"||yt.source==="External Reflection Completed"?K.jsx("div",{className:`${ht.iconContainer} ${ht.iconGreen}`,children:K.jsx(Mt.FaCheck,{color:"white",size:18})}):K.jsx("div",{className:`${ht.iconContainer} ${ht.iconOrange}`,children:K.jsx(pi,{color:"white",size:18})})},so=()=>{const{notificationList:yt,totalItems:$t,filters:At,changeFilters:rt,updateNotification:pt,viewNotification:S,updateAll:y,toggleUpdateAllStatus:Pt}=Oi(),{t:ot}=di.useTranslation(),Ht=(R,ut,tt)=>{if(typeof R!="string")return null;const $=R.indexOf(" "),bt=$!==-1?R.substring(0,$):R,H=$!==-1?R.substring($+1):"";return K.jsxs("div",{className:ut!==tt-1?"mb-1":"",children:[K.jsx("span",{className:`fw-bold ${ht.redText}`,children:bt})," ",H]},ut)};return K.jsxs("div",{className:`animated fadeIn ${ht.container}`,children:[K.jsxs("div",{className:"d-flex justify-content-between align-items-center mb-4",children:[K.jsx("h4",{className:ht.header,children:ro}),K.jsxs("div",{className:"d-flex align-items-center",children:[At.isRead===!1&&K.jsxs("div",{className:`d-flex align-items-center px-4 me-3 cursor-pointer ${ht.markAllBtn}`,onClick:()=>y(),children:[K.jsx("span",{className:`me-3 ${ht.markAllText}`,children:"Mark all as read"}),K.jsx(he.Input,{checked:Pt,type:"checkbox",className:`m-0 position-relative cursor-pointer ${ht.markAllCheckbox}`,onChange:()=>y(),onClick:R=>R.stopPropagation()})]}),K.jsxs("div",{className:ht.filterContainer,children:[K.jsx("span",{className:ht.filterLabel,children:"Filter"}),K.jsx(yi,{value:At.isRead,onChange:R=>rt({isRead:R.value})})]})]})]}),K.jsxs(he.Row,{className:"mb-2",children:[K.jsx(he.Col,{md:12,children:yt&&yt.length>0?K.jsx("div",{className:ht.tableWrapper,children:K.jsxs(he.Table,{borderless:!0,hover:!0,style:{margin:0},children:[K.jsx("thead",{className:ht.tableHead,children:K.jsxs("tr",{children:[K.jsx("th",{className:`align-middle ${ht.th} ${ht.thText}`,children:"Text"}),K.jsx("th",{className:`align-middle ${ht.th}`,children:"Time"}),K.jsx("th",{className:`text-center align-middle ${ht.th}`,children:"Is read"}),K.jsx("th",{className:`text-center align-middle ${ht.th}`,children:"Go to session"})]})}),K.jsx("tbody",{children:yt.map((R,ut)=>K.jsxs("tr",{style:{borderBottom:ut===yt.length-1?"none":"1px solid #f3f4f6"},children:[K.jsx("td",{className:`align-middle ${ht.td}`,children:K.jsxs("div",{className:"d-flex align-items-center",children:[oo(R),K.jsxs("span",{className:`ms-3 ${ht.rowText}`,children:[R.text,R.text?.toLowerCase().includes("flag")&&K.jsx("img",{id:`info-icon-${R.id}`,src:io,alt:"",className:`ms-2 ${ht["explain-icon"]}`})]}),R.text?.toLowerCase().includes("flag")&&K.jsx(he.UncontrolledTooltip,{placement:"bottom",target:`info-icon-${R.id}`,innerClassName:ht.whiteTooltip,offset:[0,10],children:K.jsx("div",{className:`text-left p-1 ${ht.tooltipContainer}`,children:K.jsx("div",{className:ht.tooltipText,children:R.informaions&&R.informaions.length>0?R.informaions.map((tt,$)=>Ht(tt,$,R.informaions.length)):"View session details to see metrics"})})})]})}),K.jsx("td",{className:`align-middle ${ht.td} ${ht.rowTime}`,children:Mt.formatLocalTime(R.time,"yyyy-MM-DD HH:mm")}),K.jsx("td",{className:`text-center align-middle ${ht.td}`,children:K.jsx(he.Input,{type:"checkbox",className:`position-relative m-0 shadow-none ${ht.checkboxInput}`,checked:R.isRead,onChange:()=>pt(R.id,!R.isRead)})}),K.jsx("td",{className:`text-center align-middle ${ht.td}`,children:["AssessmentAssignment","NewConferenceCreated","NewSessionCreated","CertificateApproved","Class Reflection","NewSessionComplete","ActionPointReminder","SendNotiPLP","SendNotiGOAL","Class Reflection Completed","External Reflection Completed","RequestCheckIn","NewSurveyCreated","StudentCompletedSurvey"].includes(R.source)&&K.jsx(he.Button,{outline:!0,color:"secondary",size:"sm",className:ht.actionBtn,onClick:()=>S(R),children:"Go"})})]},R.id))})]})}):K.jsx(Mt.EmptyDataAlert,{label:ot("notification")})}),K.jsx(he.Col,{md:12,className:"mt-4",children:K.jsx(Mt.CustomPagination,{filters:At,totalRecordCount:$t,changePageSize:R=>rt({pageSize:R}),changePage:R=>rt({currentPage:R})})})]})]})};exports.default=so;
|