{"version":3,"sources":["vertx-eventbus.js"],"names":["factory","require","module","SockJS","Error","define","amd","this","EventBus","mergeHeaders","defaultHeaders","headers","headerName","hasOwnProperty","url","options","self","pingInterval","vertxbus_ping_interval","pingTimerID","reconnectEnabled","reconnectAttempts","reconnectTimerID","maxReconnectAttempts","vertxbus_reconnect_attempts_max","Infinity","reconnectDelayMin","vertxbus_reconnect_delay_min","reconnectDelayMax","vertxbus_reconnect_delay_max","reconnectExponent","vertxbus_reconnect_exponent","randomizationFactor","vertxbus_randomization_factor","onerror","err","console","error","e","setupSockJSConnection","sockJSConn","state","CONNECTING","handlers","replyHandlers","onopen","enablePing","OPEN","onreconnect","onclose","CLOSED","clearInterval","setTimeout","ms","Math","pow","rand","random","deviation","floor","min","getReconnectDelay","onmessage","json","JSON","parse","data","replyAddress","Object","defineProperty","value","message","callback","send","address","i","length","type","failureCode","failureType","handler","warn","prototype","envelope","body","replace","a","b","toString","stringify","publish","registerHandler","push","unregisterHandler","idx","indexOf","splice","close","CLOSING","enableReconnect","enable","sendPing","setInterval","clearTimeout","exports"],"mappings":"CAeC,SAAUA,GACT,GAAuB,mBAAZC,SAA4C,oBAAXC,OAAwB,CAElE,IAAIC,EAASF,QAAQ,iBACrB,IAAKE,EACH,MAAM,IAAIC,MAAM,mEAElBJ,EAAQG,QACH,GAAsB,mBAAXE,QAAyBA,OAAOC,IAEhDD,OAAO,iBAAkB,CAAC,UAAWL,OAChC,CAEL,QAA2B,IAAhBO,KAAKJ,OACd,MAAM,IAAIC,MAAM,mEAGlBI,SAAWR,EAAQO,KAAKJ,SAjB3B,CAmBC,SAAUA,GAQV,SAASM,EAAaC,EAAgBC,GACpC,GAAID,EAAgB,CAClB,IAAKC,EACH,OAAOD,EAGT,IAAK,IAAIE,KAAcF,EACjBA,EAAeG,eAAeD,SAEG,IAAxBD,EAAQC,KACjBD,EAAQC,GAAcF,EAAeE,IAO7C,OAAOD,GAAW,GAUpB,IAAIH,EAAW,SAAUM,EAAKC,GAC5B,I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