index.js 169 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039
  1. (function webpackUniversalModuleDefinition(root, factory) {
  2. if(typeof exports === 'object' && typeof module === 'object')
  3. module.exports = factory();
  4. else if(typeof define === 'function' && define.amd)
  5. define([], factory);
  6. else if(typeof exports === 'object')
  7. exports["SockJS"] = factory();
  8. else
  9. root["SockJS"] = factory();
  10. })((typeof self !== 'undefined' ? self : this), function() {
  11. return /******/ (function() { // webpackBootstrap
  12. /******/ var __webpack_modules__ = ({
  13. /***/ "./node_modules/inherits/inherits_browser.js":
  14. /*!***************************************************!*\
  15. !*** ./node_modules/inherits/inherits_browser.js ***!
  16. \***************************************************/
  17. /***/ (function(module) {
  18. if (typeof Object.create === 'function') {
  19. // implementation from standard node.js 'util' module
  20. module.exports = function inherits(ctor, superCtor) {
  21. if (superCtor) {
  22. ctor.super_ = superCtor;
  23. ctor.prototype = Object.create(superCtor.prototype, {
  24. constructor: {
  25. value: ctor,
  26. enumerable: false,
  27. writable: true,
  28. configurable: true
  29. }
  30. });
  31. }
  32. };
  33. } else {
  34. // old school shim for old browsers
  35. module.exports = function inherits(ctor, superCtor) {
  36. if (superCtor) {
  37. ctor.super_ = superCtor;
  38. var TempCtor = function TempCtor() {};
  39. TempCtor.prototype = superCtor.prototype;
  40. ctor.prototype = new TempCtor();
  41. ctor.prototype.constructor = ctor;
  42. }
  43. };
  44. }
  45. /***/ }),
  46. /***/ "./node_modules/ms/index.js":
  47. /*!**********************************!*\
  48. !*** ./node_modules/ms/index.js ***!
  49. \**********************************/
  50. /***/ (function(module) {
  51. /**
  52. * Helpers.
  53. */
  54. var s = 1000;
  55. var m = s * 60;
  56. var h = m * 60;
  57. var d = h * 24;
  58. var w = d * 7;
  59. var y = d * 365.25;
  60. /**
  61. * Parse or format the given `val`.
  62. *
  63. * Options:
  64. *
  65. * - `long` verbose formatting [false]
  66. *
  67. * @param {String|Number} val
  68. * @param {Object} [options]
  69. * @throws {Error} throw an error if val is not a non-empty string or a number
  70. * @return {String|Number}
  71. * @api public
  72. */
  73. module.exports = function (val, options) {
  74. options = options || {};
  75. var type = typeof val;
  76. if (type === 'string' && val.length > 0) {
  77. return parse(val);
  78. } else if (type === 'number' && isFinite(val)) {
  79. return options.long ? fmtLong(val) : fmtShort(val);
  80. }
  81. throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
  82. };
  83. /**
  84. * Parse the given `str` and return milliseconds.
  85. *
  86. * @param {String} str
  87. * @return {Number}
  88. * @api private
  89. */
  90. function parse(str) {
  91. str = String(str);
  92. if (str.length > 100) {
  93. return;
  94. }
  95. var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
  96. if (!match) {
  97. return;
  98. }
  99. var n = parseFloat(match[1]);
  100. var type = (match[2] || 'ms').toLowerCase();
  101. switch (type) {
  102. case 'years':
  103. case 'year':
  104. case 'yrs':
  105. case 'yr':
  106. case 'y':
  107. return n * y;
  108. case 'weeks':
  109. case 'week':
  110. case 'w':
  111. return n * w;
  112. case 'days':
  113. case 'day':
  114. case 'd':
  115. return n * d;
  116. case 'hours':
  117. case 'hour':
  118. case 'hrs':
  119. case 'hr':
  120. case 'h':
  121. return n * h;
  122. case 'minutes':
  123. case 'minute':
  124. case 'mins':
  125. case 'min':
  126. case 'm':
  127. return n * m;
  128. case 'seconds':
  129. case 'second':
  130. case 'secs':
  131. case 'sec':
  132. case 's':
  133. return n * s;
  134. case 'milliseconds':
  135. case 'millisecond':
  136. case 'msecs':
  137. case 'msec':
  138. case 'ms':
  139. return n;
  140. default:
  141. return undefined;
  142. }
  143. }
  144. /**
  145. * Short format for `ms`.
  146. *
  147. * @param {Number} ms
  148. * @return {String}
  149. * @api private
  150. */
  151. function fmtShort(ms) {
  152. var msAbs = Math.abs(ms);
  153. if (msAbs >= d) {
  154. return Math.round(ms / d) + 'd';
  155. }
  156. if (msAbs >= h) {
  157. return Math.round(ms / h) + 'h';
  158. }
  159. if (msAbs >= m) {
  160. return Math.round(ms / m) + 'm';
  161. }
  162. if (msAbs >= s) {
  163. return Math.round(ms / s) + 's';
  164. }
  165. return ms + 'ms';
  166. }
  167. /**
  168. * Long format for `ms`.
  169. *
  170. * @param {Number} ms
  171. * @return {String}
  172. * @api private
  173. */
  174. function fmtLong(ms) {
  175. var msAbs = Math.abs(ms);
  176. if (msAbs >= d) {
  177. return plural(ms, msAbs, d, 'day');
  178. }
  179. if (msAbs >= h) {
  180. return plural(ms, msAbs, h, 'hour');
  181. }
  182. if (msAbs >= m) {
  183. return plural(ms, msAbs, m, 'minute');
  184. }
  185. if (msAbs >= s) {
  186. return plural(ms, msAbs, s, 'second');
  187. }
  188. return ms + ' ms';
  189. }
  190. /**
  191. * Pluralization helper.
  192. */
  193. function plural(ms, msAbs, n, name) {
  194. var isPlural = msAbs >= n * 1.5;
  195. return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
  196. }
  197. /***/ }),
  198. /***/ "./node_modules/querystringify/index.js":
  199. /*!**********************************************!*\
  200. !*** ./node_modules/querystringify/index.js ***!
  201. \**********************************************/
  202. /***/ (function(__unused_webpack_module, exports) {
  203. "use strict";
  204. var has = Object.prototype.hasOwnProperty,
  205. undef;
  206. /**
  207. * Decode a URI encoded string.
  208. *
  209. * @param {String} input The URI encoded string.
  210. * @returns {String|Null} The decoded string.
  211. * @api private
  212. */
  213. function decode(input) {
  214. try {
  215. return decodeURIComponent(input.replace(/\+/g, ' '));
  216. } catch (e) {
  217. return null;
  218. }
  219. }
  220. /**
  221. * Attempts to encode a given input.
  222. *
  223. * @param {String} input The string that needs to be encoded.
  224. * @returns {String|Null} The encoded string.
  225. * @api private
  226. */
  227. function encode(input) {
  228. try {
  229. return encodeURIComponent(input);
  230. } catch (e) {
  231. return null;
  232. }
  233. }
  234. /**
  235. * Simple query string parser.
  236. *
  237. * @param {String} query The query string that needs to be parsed.
  238. * @returns {Object}
  239. * @api public
  240. */
  241. function querystring(query) {
  242. var parser = /([^=?#&]+)=?([^&]*)/g,
  243. result = {},
  244. part;
  245. while (part = parser.exec(query)) {
  246. var key = decode(part[1]),
  247. value = decode(part[2]);
  248. //
  249. // Prevent overriding of existing properties. This ensures that build-in
  250. // methods like `toString` or __proto__ are not overriden by malicious
  251. // querystrings.
  252. //
  253. // In the case if failed decoding, we want to omit the key/value pairs
  254. // from the result.
  255. //
  256. if (key === null || value === null || key in result) continue;
  257. result[key] = value;
  258. }
  259. return result;
  260. }
  261. /**
  262. * Transform a query string to an object.
  263. *
  264. * @param {Object} obj Object that should be transformed.
  265. * @param {String} prefix Optional prefix.
  266. * @returns {String}
  267. * @api public
  268. */
  269. function querystringify(obj, prefix) {
  270. prefix = prefix || '';
  271. var pairs = [],
  272. value,
  273. key;
  274. //
  275. // Optionally prefix with a '?' if needed
  276. //
  277. if ('string' !== typeof prefix) prefix = '?';
  278. for (key in obj) {
  279. if (has.call(obj, key)) {
  280. value = obj[key];
  281. //
  282. // Edge cases where we actually want to encode the value to an empty
  283. // string instead of the stringified value.
  284. //
  285. if (!value && (value === null || value === undef || isNaN(value))) {
  286. value = '';
  287. }
  288. key = encode(key);
  289. value = encode(value);
  290. //
  291. // If we failed to encode the strings, we should bail out as we don't
  292. // want to add invalid strings to the query.
  293. //
  294. if (key === null || value === null) continue;
  295. pairs.push(key + '=' + value);
  296. }
  297. }
  298. return pairs.length ? prefix + pairs.join('&') : '';
  299. }
  300. //
  301. // Expose the module.
  302. //
  303. exports.stringify = querystringify;
  304. exports.parse = querystring;
  305. /***/ }),
  306. /***/ "./node_modules/requires-port/index.js":
  307. /*!*********************************************!*\
  308. !*** ./node_modules/requires-port/index.js ***!
  309. \*********************************************/
  310. /***/ (function(module) {
  311. "use strict";
  312. /**
  313. * Check if we're required to add a port number.
  314. *
  315. * @see https://url.spec.whatwg.org/#default-port
  316. * @param {Number|String} port Port number we need to check
  317. * @param {String} protocol Protocol we need to check against.
  318. * @returns {Boolean} Is it a default port for the given protocol
  319. * @api private
  320. */
  321. module.exports = function required(port, protocol) {
  322. protocol = protocol.split(':')[0];
  323. port = +port;
  324. if (!port) return false;
  325. switch (protocol) {
  326. case 'http':
  327. case 'ws':
  328. return port !== 80;
  329. case 'https':
  330. case 'wss':
  331. return port !== 443;
  332. case 'ftp':
  333. return port !== 21;
  334. case 'gopher':
  335. return port !== 70;
  336. case 'file':
  337. return false;
  338. }
  339. return port !== 0;
  340. };
  341. /***/ }),
  342. /***/ "./node_modules/sockjs-client/lib/entry.js":
  343. /*!*************************************************!*\
  344. !*** ./node_modules/sockjs-client/lib/entry.js ***!
  345. \*************************************************/
  346. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  347. "use strict";
  348. var transportList = __webpack_require__(/*! ./transport-list */ "./node_modules/sockjs-client/lib/transport-list.js");
  349. module.exports = __webpack_require__(/*! ./main */ "./node_modules/sockjs-client/lib/main.js")(transportList);
  350. // TODO can't get rid of this until all servers do
  351. if ('_sockjs_onload' in __webpack_require__.g) {
  352. setTimeout(__webpack_require__.g._sockjs_onload, 1);
  353. }
  354. /***/ }),
  355. /***/ "./node_modules/sockjs-client/lib/event/close.js":
  356. /*!*******************************************************!*\
  357. !*** ./node_modules/sockjs-client/lib/event/close.js ***!
  358. \*******************************************************/
  359. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  360. "use strict";
  361. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  362. Event = __webpack_require__(/*! ./event */ "./node_modules/sockjs-client/lib/event/event.js");
  363. function CloseEvent() {
  364. Event.call(this);
  365. this.initEvent('close', false, false);
  366. this.wasClean = false;
  367. this.code = 0;
  368. this.reason = '';
  369. }
  370. inherits(CloseEvent, Event);
  371. module.exports = CloseEvent;
  372. /***/ }),
  373. /***/ "./node_modules/sockjs-client/lib/event/emitter.js":
  374. /*!*********************************************************!*\
  375. !*** ./node_modules/sockjs-client/lib/event/emitter.js ***!
  376. \*********************************************************/
  377. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  378. "use strict";
  379. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  380. EventTarget = __webpack_require__(/*! ./eventtarget */ "./node_modules/sockjs-client/lib/event/eventtarget.js");
  381. function EventEmitter() {
  382. EventTarget.call(this);
  383. }
  384. inherits(EventEmitter, EventTarget);
  385. EventEmitter.prototype.removeAllListeners = function (type) {
  386. if (type) {
  387. delete this._listeners[type];
  388. } else {
  389. this._listeners = {};
  390. }
  391. };
  392. EventEmitter.prototype.once = function (type, listener) {
  393. var self = this,
  394. fired = false;
  395. function g() {
  396. self.removeListener(type, g);
  397. if (!fired) {
  398. fired = true;
  399. listener.apply(this, arguments);
  400. }
  401. }
  402. this.on(type, g);
  403. };
  404. EventEmitter.prototype.emit = function () {
  405. var type = arguments[0];
  406. var listeners = this._listeners[type];
  407. if (!listeners) {
  408. return;
  409. }
  410. // equivalent of Array.prototype.slice.call(arguments, 1);
  411. var l = arguments.length;
  412. var args = new Array(l - 1);
  413. for (var ai = 1; ai < l; ai++) {
  414. args[ai - 1] = arguments[ai];
  415. }
  416. for (var i = 0; i < listeners.length; i++) {
  417. listeners[i].apply(this, args);
  418. }
  419. };
  420. EventEmitter.prototype.on = EventEmitter.prototype.addListener = EventTarget.prototype.addEventListener;
  421. EventEmitter.prototype.removeListener = EventTarget.prototype.removeEventListener;
  422. module.exports.EventEmitter = EventEmitter;
  423. /***/ }),
  424. /***/ "./node_modules/sockjs-client/lib/event/event.js":
  425. /*!*******************************************************!*\
  426. !*** ./node_modules/sockjs-client/lib/event/event.js ***!
  427. \*******************************************************/
  428. /***/ (function(module) {
  429. "use strict";
  430. function Event(eventType) {
  431. this.type = eventType;
  432. }
  433. Event.prototype.initEvent = function (eventType, canBubble, cancelable) {
  434. this.type = eventType;
  435. this.bubbles = canBubble;
  436. this.cancelable = cancelable;
  437. this.timeStamp = +new Date();
  438. return this;
  439. };
  440. Event.prototype.stopPropagation = function () {};
  441. Event.prototype.preventDefault = function () {};
  442. Event.CAPTURING_PHASE = 1;
  443. Event.AT_TARGET = 2;
  444. Event.BUBBLING_PHASE = 3;
  445. module.exports = Event;
  446. /***/ }),
  447. /***/ "./node_modules/sockjs-client/lib/event/eventtarget.js":
  448. /*!*************************************************************!*\
  449. !*** ./node_modules/sockjs-client/lib/event/eventtarget.js ***!
  450. \*************************************************************/
  451. /***/ (function(module) {
  452. "use strict";
  453. /* Simplified implementation of DOM2 EventTarget.
  454. * http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget
  455. */
  456. function EventTarget() {
  457. this._listeners = {};
  458. }
  459. EventTarget.prototype.addEventListener = function (eventType, listener) {
  460. if (!(eventType in this._listeners)) {
  461. this._listeners[eventType] = [];
  462. }
  463. var arr = this._listeners[eventType];
  464. // #4
  465. if (arr.indexOf(listener) === -1) {
  466. // Make a copy so as not to interfere with a current dispatchEvent.
  467. arr = arr.concat([listener]);
  468. }
  469. this._listeners[eventType] = arr;
  470. };
  471. EventTarget.prototype.removeEventListener = function (eventType, listener) {
  472. var arr = this._listeners[eventType];
  473. if (!arr) {
  474. return;
  475. }
  476. var idx = arr.indexOf(listener);
  477. if (idx !== -1) {
  478. if (arr.length > 1) {
  479. // Make a copy so as not to interfere with a current dispatchEvent.
  480. this._listeners[eventType] = arr.slice(0, idx).concat(arr.slice(idx + 1));
  481. } else {
  482. delete this._listeners[eventType];
  483. }
  484. return;
  485. }
  486. };
  487. EventTarget.prototype.dispatchEvent = function () {
  488. var event = arguments[0];
  489. var t = event.type;
  490. // equivalent of Array.prototype.slice.call(arguments, 0);
  491. var args = arguments.length === 1 ? [event] : Array.apply(null, arguments);
  492. // TODO: This doesn't match the real behavior; per spec, onfoo get
  493. // their place in line from the /first/ time they're set from
  494. // non-null. Although WebKit bumps it to the end every time it's
  495. // set.
  496. if (this['on' + t]) {
  497. this['on' + t].apply(this, args);
  498. }
  499. if (t in this._listeners) {
  500. // Grab a reference to the listeners list. removeEventListener may alter the list.
  501. var listeners = this._listeners[t];
  502. for (var i = 0; i < listeners.length; i++) {
  503. listeners[i].apply(this, args);
  504. }
  505. }
  506. };
  507. module.exports = EventTarget;
  508. /***/ }),
  509. /***/ "./node_modules/sockjs-client/lib/event/trans-message.js":
  510. /*!***************************************************************!*\
  511. !*** ./node_modules/sockjs-client/lib/event/trans-message.js ***!
  512. \***************************************************************/
  513. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  514. "use strict";
  515. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  516. Event = __webpack_require__(/*! ./event */ "./node_modules/sockjs-client/lib/event/event.js");
  517. function TransportMessageEvent(data) {
  518. Event.call(this);
  519. this.initEvent('message', false, false);
  520. this.data = data;
  521. }
  522. inherits(TransportMessageEvent, Event);
  523. module.exports = TransportMessageEvent;
  524. /***/ }),
  525. /***/ "./node_modules/sockjs-client/lib/facade.js":
  526. /*!**************************************************!*\
  527. !*** ./node_modules/sockjs-client/lib/facade.js ***!
  528. \**************************************************/
  529. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  530. "use strict";
  531. var iframeUtils = __webpack_require__(/*! ./utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js");
  532. function FacadeJS(transport) {
  533. this._transport = transport;
  534. transport.on('message', this._transportMessage.bind(this));
  535. transport.on('close', this._transportClose.bind(this));
  536. }
  537. FacadeJS.prototype._transportClose = function (code, reason) {
  538. iframeUtils.postMessage('c', JSON.stringify([code, reason]));
  539. };
  540. FacadeJS.prototype._transportMessage = function (frame) {
  541. iframeUtils.postMessage('t', frame);
  542. };
  543. FacadeJS.prototype._send = function (data) {
  544. this._transport.send(data);
  545. };
  546. FacadeJS.prototype._close = function () {
  547. this._transport.close();
  548. this._transport.removeAllListeners();
  549. };
  550. module.exports = FacadeJS;
  551. /***/ }),
  552. /***/ "./node_modules/sockjs-client/lib/iframe-bootstrap.js":
  553. /*!************************************************************!*\
  554. !*** ./node_modules/sockjs-client/lib/iframe-bootstrap.js ***!
  555. \************************************************************/
  556. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  557. "use strict";
  558. var urlUtils = __webpack_require__(/*! ./utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  559. eventUtils = __webpack_require__(/*! ./utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  560. FacadeJS = __webpack_require__(/*! ./facade */ "./node_modules/sockjs-client/lib/facade.js"),
  561. InfoIframeReceiver = __webpack_require__(/*! ./info-iframe-receiver */ "./node_modules/sockjs-client/lib/info-iframe-receiver.js"),
  562. iframeUtils = __webpack_require__(/*! ./utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js"),
  563. loc = __webpack_require__(/*! ./location */ "./node_modules/sockjs-client/lib/location.js");
  564. var debug = function debug() {};
  565. if (true) {
  566. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:iframe-bootstrap');
  567. }
  568. module.exports = function (SockJS, availableTransports) {
  569. var transportMap = {};
  570. availableTransports.forEach(function (at) {
  571. if (at.facadeTransport) {
  572. transportMap[at.facadeTransport.transportName] = at.facadeTransport;
  573. }
  574. });
  575. // hard-coded for the info iframe
  576. // TODO see if we can make this more dynamic
  577. transportMap[InfoIframeReceiver.transportName] = InfoIframeReceiver;
  578. var parentOrigin;
  579. /* eslint-disable camelcase */
  580. SockJS.bootstrap_iframe = function () {
  581. /* eslint-enable camelcase */
  582. var facade;
  583. iframeUtils.currentWindowId = loc.hash.slice(1);
  584. var onMessage = function onMessage(e) {
  585. if (e.source !== parent) {
  586. return;
  587. }
  588. if (typeof parentOrigin === 'undefined') {
  589. parentOrigin = e.origin;
  590. }
  591. if (e.origin !== parentOrigin) {
  592. return;
  593. }
  594. var iframeMessage;
  595. try {
  596. iframeMessage = JSON.parse(e.data);
  597. } catch (ignored) {
  598. debug('bad json', e.data);
  599. return;
  600. }
  601. if (iframeMessage.windowId !== iframeUtils.currentWindowId) {
  602. return;
  603. }
  604. switch (iframeMessage.type) {
  605. case 's':
  606. var p;
  607. try {
  608. p = JSON.parse(iframeMessage.data);
  609. } catch (ignored) {
  610. debug('bad json', iframeMessage.data);
  611. break;
  612. }
  613. var version = p[0];
  614. var transport = p[1];
  615. var transUrl = p[2];
  616. var baseUrl = p[3];
  617. debug(version, transport, transUrl, baseUrl);
  618. // change this to semver logic
  619. if (version !== SockJS.version) {
  620. throw new Error('Incompatible SockJS! Main site uses:' + ' "' + version + '", the iframe:' + ' "' + SockJS.version + '".');
  621. }
  622. if (!urlUtils.isOriginEqual(transUrl, loc.href) || !urlUtils.isOriginEqual(baseUrl, loc.href)) {
  623. throw new Error('Can\'t connect to different domain from within an ' + 'iframe. (' + loc.href + ', ' + transUrl + ', ' + baseUrl + ')');
  624. }
  625. facade = new FacadeJS(new transportMap[transport](transUrl, baseUrl));
  626. break;
  627. case 'm':
  628. facade._send(iframeMessage.data);
  629. break;
  630. case 'c':
  631. if (facade) {
  632. facade._close();
  633. }
  634. facade = null;
  635. break;
  636. }
  637. };
  638. eventUtils.attachEvent('message', onMessage);
  639. // Start
  640. iframeUtils.postMessage('s');
  641. };
  642. };
  643. /***/ }),
  644. /***/ "./node_modules/sockjs-client/lib/info-ajax.js":
  645. /*!*****************************************************!*\
  646. !*** ./node_modules/sockjs-client/lib/info-ajax.js ***!
  647. \*****************************************************/
  648. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  649. "use strict";
  650. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  651. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  652. objectUtils = __webpack_require__(/*! ./utils/object */ "./node_modules/sockjs-client/lib/utils/object.js");
  653. var debug = function debug() {};
  654. if (true) {
  655. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:info-ajax');
  656. }
  657. function InfoAjax(url, AjaxObject) {
  658. EventEmitter.call(this);
  659. var self = this;
  660. var t0 = +new Date();
  661. this.xo = new AjaxObject('GET', url);
  662. this.xo.once('finish', function (status, text) {
  663. var info, rtt;
  664. if (status === 200) {
  665. rtt = +new Date() - t0;
  666. if (text) {
  667. try {
  668. info = JSON.parse(text);
  669. } catch (e) {
  670. debug('bad json', text);
  671. }
  672. }
  673. if (!objectUtils.isObject(info)) {
  674. info = {};
  675. }
  676. }
  677. self.emit('finish', info, rtt);
  678. self.removeAllListeners();
  679. });
  680. }
  681. inherits(InfoAjax, EventEmitter);
  682. InfoAjax.prototype.close = function () {
  683. this.removeAllListeners();
  684. this.xo.close();
  685. };
  686. module.exports = InfoAjax;
  687. /***/ }),
  688. /***/ "./node_modules/sockjs-client/lib/info-iframe-receiver.js":
  689. /*!****************************************************************!*\
  690. !*** ./node_modules/sockjs-client/lib/info-iframe-receiver.js ***!
  691. \****************************************************************/
  692. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  693. "use strict";
  694. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  695. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  696. XHRLocalObject = __webpack_require__(/*! ./transport/sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js"),
  697. InfoAjax = __webpack_require__(/*! ./info-ajax */ "./node_modules/sockjs-client/lib/info-ajax.js");
  698. function InfoReceiverIframe(transUrl) {
  699. var self = this;
  700. EventEmitter.call(this);
  701. this.ir = new InfoAjax(transUrl, XHRLocalObject);
  702. this.ir.once('finish', function (info, rtt) {
  703. self.ir = null;
  704. self.emit('message', JSON.stringify([info, rtt]));
  705. });
  706. }
  707. inherits(InfoReceiverIframe, EventEmitter);
  708. InfoReceiverIframe.transportName = 'iframe-info-receiver';
  709. InfoReceiverIframe.prototype.close = function () {
  710. if (this.ir) {
  711. this.ir.close();
  712. this.ir = null;
  713. }
  714. this.removeAllListeners();
  715. };
  716. module.exports = InfoReceiverIframe;
  717. /***/ }),
  718. /***/ "./node_modules/sockjs-client/lib/info-iframe.js":
  719. /*!*******************************************************!*\
  720. !*** ./node_modules/sockjs-client/lib/info-iframe.js ***!
  721. \*******************************************************/
  722. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  723. "use strict";
  724. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  725. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  726. utils = __webpack_require__(/*! ./utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  727. IframeTransport = __webpack_require__(/*! ./transport/iframe */ "./node_modules/sockjs-client/lib/transport/iframe.js"),
  728. InfoReceiverIframe = __webpack_require__(/*! ./info-iframe-receiver */ "./node_modules/sockjs-client/lib/info-iframe-receiver.js");
  729. var debug = function debug() {};
  730. if (true) {
  731. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:info-iframe');
  732. }
  733. function InfoIframe(baseUrl, url) {
  734. var self = this;
  735. EventEmitter.call(this);
  736. var go = function go() {
  737. var ifr = self.ifr = new IframeTransport(InfoReceiverIframe.transportName, url, baseUrl);
  738. ifr.once('message', function (msg) {
  739. if (msg) {
  740. var d;
  741. try {
  742. d = JSON.parse(msg);
  743. } catch (e) {
  744. debug('bad json', msg);
  745. self.emit('finish');
  746. self.close();
  747. return;
  748. }
  749. var info = d[0],
  750. rtt = d[1];
  751. self.emit('finish', info, rtt);
  752. }
  753. self.close();
  754. });
  755. ifr.once('close', function () {
  756. self.emit('finish');
  757. self.close();
  758. });
  759. };
  760. // TODO this seems the same as the 'needBody' from transports
  761. if (!__webpack_require__.g.document.body) {
  762. utils.attachEvent('load', go);
  763. } else {
  764. go();
  765. }
  766. }
  767. inherits(InfoIframe, EventEmitter);
  768. InfoIframe.enabled = function () {
  769. return IframeTransport.enabled();
  770. };
  771. InfoIframe.prototype.close = function () {
  772. if (this.ifr) {
  773. this.ifr.close();
  774. }
  775. this.removeAllListeners();
  776. this.ifr = null;
  777. };
  778. module.exports = InfoIframe;
  779. /***/ }),
  780. /***/ "./node_modules/sockjs-client/lib/info-receiver.js":
  781. /*!*********************************************************!*\
  782. !*** ./node_modules/sockjs-client/lib/info-receiver.js ***!
  783. \*********************************************************/
  784. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  785. "use strict";
  786. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  787. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  788. urlUtils = __webpack_require__(/*! ./utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  789. XDR = __webpack_require__(/*! ./transport/sender/xdr */ "./node_modules/sockjs-client/lib/transport/sender/xdr.js"),
  790. XHRCors = __webpack_require__(/*! ./transport/sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js"),
  791. XHRLocal = __webpack_require__(/*! ./transport/sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js"),
  792. XHRFake = __webpack_require__(/*! ./transport/sender/xhr-fake */ "./node_modules/sockjs-client/lib/transport/sender/xhr-fake.js"),
  793. InfoIframe = __webpack_require__(/*! ./info-iframe */ "./node_modules/sockjs-client/lib/info-iframe.js"),
  794. InfoAjax = __webpack_require__(/*! ./info-ajax */ "./node_modules/sockjs-client/lib/info-ajax.js");
  795. var debug = function debug() {};
  796. if (true) {
  797. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:info-receiver');
  798. }
  799. function InfoReceiver(baseUrl, urlInfo) {
  800. debug(baseUrl);
  801. var self = this;
  802. EventEmitter.call(this);
  803. setTimeout(function () {
  804. self.doXhr(baseUrl, urlInfo);
  805. }, 0);
  806. }
  807. inherits(InfoReceiver, EventEmitter);
  808. // TODO this is currently ignoring the list of available transports and the whitelist
  809. InfoReceiver._getReceiver = function (baseUrl, url, urlInfo) {
  810. // determine method of CORS support (if needed)
  811. if (urlInfo.sameOrigin) {
  812. return new InfoAjax(url, XHRLocal);
  813. }
  814. if (XHRCors.enabled) {
  815. return new InfoAjax(url, XHRCors);
  816. }
  817. if (XDR.enabled && urlInfo.sameScheme) {
  818. return new InfoAjax(url, XDR);
  819. }
  820. if (InfoIframe.enabled()) {
  821. return new InfoIframe(baseUrl, url);
  822. }
  823. return new InfoAjax(url, XHRFake);
  824. };
  825. InfoReceiver.prototype.doXhr = function (baseUrl, urlInfo) {
  826. var self = this,
  827. url = urlUtils.addPath(baseUrl, '/info');
  828. debug('doXhr', url);
  829. this.xo = InfoReceiver._getReceiver(baseUrl, url, urlInfo);
  830. this.timeoutRef = setTimeout(function () {
  831. debug('timeout');
  832. self._cleanup(false);
  833. self.emit('finish');
  834. }, InfoReceiver.timeout);
  835. this.xo.once('finish', function (info, rtt) {
  836. debug('finish', info, rtt);
  837. self._cleanup(true);
  838. self.emit('finish', info, rtt);
  839. });
  840. };
  841. InfoReceiver.prototype._cleanup = function (wasClean) {
  842. debug('_cleanup');
  843. clearTimeout(this.timeoutRef);
  844. this.timeoutRef = null;
  845. if (!wasClean && this.xo) {
  846. this.xo.close();
  847. }
  848. this.xo = null;
  849. };
  850. InfoReceiver.prototype.close = function () {
  851. debug('close');
  852. this.removeAllListeners();
  853. this._cleanup(false);
  854. };
  855. InfoReceiver.timeout = 8000;
  856. module.exports = InfoReceiver;
  857. /***/ }),
  858. /***/ "./node_modules/sockjs-client/lib/location.js":
  859. /*!****************************************************!*\
  860. !*** ./node_modules/sockjs-client/lib/location.js ***!
  861. \****************************************************/
  862. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  863. "use strict";
  864. module.exports = __webpack_require__.g.location || {
  865. origin: 'http://localhost:80',
  866. protocol: 'http:',
  867. host: 'localhost',
  868. port: 80,
  869. href: 'http://localhost/',
  870. hash: ''
  871. };
  872. /***/ }),
  873. /***/ "./node_modules/sockjs-client/lib/main.js":
  874. /*!************************************************!*\
  875. !*** ./node_modules/sockjs-client/lib/main.js ***!
  876. \************************************************/
  877. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  878. "use strict";
  879. __webpack_require__(/*! ./shims */ "./node_modules/sockjs-client/lib/shims.js");
  880. var URL = __webpack_require__(/*! url-parse */ "./node_modules/url-parse/index.js"),
  881. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  882. random = __webpack_require__(/*! ./utils/random */ "./node_modules/sockjs-client/lib/utils/random.js"),
  883. escape = __webpack_require__(/*! ./utils/escape */ "./node_modules/sockjs-client/lib/utils/escape.js"),
  884. urlUtils = __webpack_require__(/*! ./utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  885. eventUtils = __webpack_require__(/*! ./utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  886. transport = __webpack_require__(/*! ./utils/transport */ "./node_modules/sockjs-client/lib/utils/transport.js"),
  887. objectUtils = __webpack_require__(/*! ./utils/object */ "./node_modules/sockjs-client/lib/utils/object.js"),
  888. browser = __webpack_require__(/*! ./utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js"),
  889. log = __webpack_require__(/*! ./utils/log */ "./node_modules/sockjs-client/lib/utils/log.js"),
  890. Event = __webpack_require__(/*! ./event/event */ "./node_modules/sockjs-client/lib/event/event.js"),
  891. EventTarget = __webpack_require__(/*! ./event/eventtarget */ "./node_modules/sockjs-client/lib/event/eventtarget.js"),
  892. loc = __webpack_require__(/*! ./location */ "./node_modules/sockjs-client/lib/location.js"),
  893. CloseEvent = __webpack_require__(/*! ./event/close */ "./node_modules/sockjs-client/lib/event/close.js"),
  894. TransportMessageEvent = __webpack_require__(/*! ./event/trans-message */ "./node_modules/sockjs-client/lib/event/trans-message.js"),
  895. InfoReceiver = __webpack_require__(/*! ./info-receiver */ "./node_modules/sockjs-client/lib/info-receiver.js");
  896. var debug = function debug() {};
  897. if (true) {
  898. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:main');
  899. }
  900. var transports;
  901. // follow constructor steps defined at http://dev.w3.org/html5/websockets/#the-websocket-interface
  902. function SockJS(url, protocols, options) {
  903. if (!(this instanceof SockJS)) {
  904. return new SockJS(url, protocols, options);
  905. }
  906. if (arguments.length < 1) {
  907. throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");
  908. }
  909. EventTarget.call(this);
  910. this.readyState = SockJS.CONNECTING;
  911. this.extensions = '';
  912. this.protocol = '';
  913. // non-standard extension
  914. options = options || {};
  915. if (options.protocols_whitelist) {
  916. log.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead.");
  917. }
  918. this._transportsWhitelist = options.transports;
  919. this._transportOptions = options.transportOptions || {};
  920. this._timeout = options.timeout || 0;
  921. var sessionId = options.sessionId || 8;
  922. if (typeof sessionId === 'function') {
  923. this._generateSessionId = sessionId;
  924. } else if (typeof sessionId === 'number') {
  925. this._generateSessionId = function () {
  926. return random.string(sessionId);
  927. };
  928. } else {
  929. throw new TypeError('If sessionId is used in the options, it needs to be a number or a function.');
  930. }
  931. this._server = options.server || random.numberString(1000);
  932. // Step 1 of WS spec - parse and validate the url. Issue #8
  933. var parsedUrl = new URL(url);
  934. if (!parsedUrl.host || !parsedUrl.protocol) {
  935. throw new SyntaxError("The URL '" + url + "' is invalid");
  936. } else if (parsedUrl.hash) {
  937. throw new SyntaxError('The URL must not contain a fragment');
  938. } else if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
  939. throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '" + parsedUrl.protocol + "' is not allowed.");
  940. }
  941. var secure = parsedUrl.protocol === 'https:';
  942. // Step 2 - don't allow secure origin with an insecure protocol
  943. if (loc.protocol === 'https:' && !secure) {
  944. // exception is 127.0.0.0/8 and ::1 urls
  945. if (!urlUtils.isLoopbackAddr(parsedUrl.hostname)) {
  946. throw new Error('SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS');
  947. }
  948. }
  949. // Step 3 - check port access - no need here
  950. // Step 4 - parse protocols argument
  951. if (!protocols) {
  952. protocols = [];
  953. } else if (!Array.isArray(protocols)) {
  954. protocols = [protocols];
  955. }
  956. // Step 5 - check protocols argument
  957. var sortedProtocols = protocols.sort();
  958. sortedProtocols.forEach(function (proto, i) {
  959. if (!proto) {
  960. throw new SyntaxError("The protocols entry '" + proto + "' is invalid.");
  961. }
  962. if (i < sortedProtocols.length - 1 && proto === sortedProtocols[i + 1]) {
  963. throw new SyntaxError("The protocols entry '" + proto + "' is duplicated.");
  964. }
  965. });
  966. // Step 6 - convert origin
  967. var o = urlUtils.getOrigin(loc.href);
  968. this._origin = o ? o.toLowerCase() : null;
  969. // remove the trailing slash
  970. parsedUrl.set('pathname', parsedUrl.pathname.replace(/\/+$/, ''));
  971. // store the sanitized url
  972. this.url = parsedUrl.href;
  973. debug('using url', this.url);
  974. // Step 7 - start connection in background
  975. // obtain server info
  976. // http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html#section-26
  977. this._urlInfo = {
  978. nullOrigin: !browser.hasDomain(),
  979. sameOrigin: urlUtils.isOriginEqual(this.url, loc.href),
  980. sameScheme: urlUtils.isSchemeEqual(this.url, loc.href)
  981. };
  982. this._ir = new InfoReceiver(this.url, this._urlInfo);
  983. this._ir.once('finish', this._receiveInfo.bind(this));
  984. }
  985. inherits(SockJS, EventTarget);
  986. function userSetCode(code) {
  987. return code === 1000 || code >= 3000 && code <= 4999;
  988. }
  989. SockJS.prototype.close = function (code, reason) {
  990. // Step 1
  991. if (code && !userSetCode(code)) {
  992. throw new Error('InvalidAccessError: Invalid code');
  993. }
  994. // Step 2.4 states the max is 123 bytes, but we are just checking length
  995. if (reason && reason.length > 123) {
  996. throw new SyntaxError('reason argument has an invalid length');
  997. }
  998. // Step 3.1
  999. if (this.readyState === SockJS.CLOSING || this.readyState === SockJS.CLOSED) {
  1000. return;
  1001. }
  1002. // TODO look at docs to determine how to set this
  1003. var wasClean = true;
  1004. this._close(code || 1000, reason || 'Normal closure', wasClean);
  1005. };
  1006. SockJS.prototype.send = function (data) {
  1007. // #13 - convert anything non-string to string
  1008. // TODO this currently turns objects into [object Object]
  1009. if (typeof data !== 'string') {
  1010. data = '' + data;
  1011. }
  1012. if (this.readyState === SockJS.CONNECTING) {
  1013. throw new Error('InvalidStateError: The connection has not been established yet');
  1014. }
  1015. if (this.readyState !== SockJS.OPEN) {
  1016. return;
  1017. }
  1018. this._transport.send(escape.quote(data));
  1019. };
  1020. SockJS.version = __webpack_require__(/*! ./version */ "./node_modules/sockjs-client/lib/version.js");
  1021. SockJS.CONNECTING = 0;
  1022. SockJS.OPEN = 1;
  1023. SockJS.CLOSING = 2;
  1024. SockJS.CLOSED = 3;
  1025. SockJS.prototype._receiveInfo = function (info, rtt) {
  1026. debug('_receiveInfo', rtt);
  1027. this._ir = null;
  1028. if (!info) {
  1029. this._close(1002, 'Cannot connect to server');
  1030. return;
  1031. }
  1032. // establish a round-trip timeout (RTO) based on the
  1033. // round-trip time (RTT)
  1034. this._rto = this.countRTO(rtt);
  1035. // allow server to override url used for the actual transport
  1036. this._transUrl = info.base_url ? info.base_url : this.url;
  1037. info = objectUtils.extend(info, this._urlInfo);
  1038. debug('info', info);
  1039. // determine list of desired and supported transports
  1040. var enabledTransports = transports.filterToEnabled(this._transportsWhitelist, info);
  1041. this._transports = enabledTransports.main;
  1042. debug(this._transports.length + ' enabled transports');
  1043. this._connect();
  1044. };
  1045. SockJS.prototype._connect = function () {
  1046. for (var Transport = this._transports.shift(); Transport; Transport = this._transports.shift()) {
  1047. debug('attempt', Transport.transportName);
  1048. if (Transport.needBody) {
  1049. if (!__webpack_require__.g.document.body || typeof __webpack_require__.g.document.readyState !== 'undefined' && __webpack_require__.g.document.readyState !== 'complete' && __webpack_require__.g.document.readyState !== 'interactive') {
  1050. debug('waiting for body');
  1051. this._transports.unshift(Transport);
  1052. eventUtils.attachEvent('load', this._connect.bind(this));
  1053. return;
  1054. }
  1055. }
  1056. // calculate timeout based on RTO and round trips. Default to 5s
  1057. var timeoutMs = Math.max(this._timeout, this._rto * Transport.roundTrips || 5000);
  1058. this._transportTimeoutId = setTimeout(this._transportTimeout.bind(this), timeoutMs);
  1059. debug('using timeout', timeoutMs);
  1060. var transportUrl = urlUtils.addPath(this._transUrl, '/' + this._server + '/' + this._generateSessionId());
  1061. var options = this._transportOptions[Transport.transportName];
  1062. debug('transport url', transportUrl);
  1063. var transportObj = new Transport(transportUrl, this._transUrl, options);
  1064. transportObj.on('message', this._transportMessage.bind(this));
  1065. transportObj.once('close', this._transportClose.bind(this));
  1066. transportObj.transportName = Transport.transportName;
  1067. this._transport = transportObj;
  1068. return;
  1069. }
  1070. this._close(2000, 'All transports failed', false);
  1071. };
  1072. SockJS.prototype._transportTimeout = function () {
  1073. debug('_transportTimeout');
  1074. if (this.readyState === SockJS.CONNECTING) {
  1075. if (this._transport) {
  1076. this._transport.close();
  1077. }
  1078. this._transportClose(2007, 'Transport timed out');
  1079. }
  1080. };
  1081. SockJS.prototype._transportMessage = function (msg) {
  1082. debug('_transportMessage', msg);
  1083. var self = this,
  1084. type = msg.slice(0, 1),
  1085. content = msg.slice(1),
  1086. payload;
  1087. // first check for messages that don't need a payload
  1088. switch (type) {
  1089. case 'o':
  1090. this._open();
  1091. return;
  1092. case 'h':
  1093. this.dispatchEvent(new Event('heartbeat'));
  1094. debug('heartbeat', this.transport);
  1095. return;
  1096. }
  1097. if (content) {
  1098. try {
  1099. payload = JSON.parse(content);
  1100. } catch (e) {
  1101. debug('bad json', content);
  1102. }
  1103. }
  1104. if (typeof payload === 'undefined') {
  1105. debug('empty payload', content);
  1106. return;
  1107. }
  1108. switch (type) {
  1109. case 'a':
  1110. if (Array.isArray(payload)) {
  1111. payload.forEach(function (p) {
  1112. debug('message', self.transport, p);
  1113. self.dispatchEvent(new TransportMessageEvent(p));
  1114. });
  1115. }
  1116. break;
  1117. case 'm':
  1118. debug('message', this.transport, payload);
  1119. this.dispatchEvent(new TransportMessageEvent(payload));
  1120. break;
  1121. case 'c':
  1122. if (Array.isArray(payload) && payload.length === 2) {
  1123. this._close(payload[0], payload[1], true);
  1124. }
  1125. break;
  1126. }
  1127. };
  1128. SockJS.prototype._transportClose = function (code, reason) {
  1129. debug('_transportClose', this.transport, code, reason);
  1130. if (this._transport) {
  1131. this._transport.removeAllListeners();
  1132. this._transport = null;
  1133. this.transport = null;
  1134. }
  1135. if (!userSetCode(code) && code !== 2000 && this.readyState === SockJS.CONNECTING) {
  1136. this._connect();
  1137. return;
  1138. }
  1139. this._close(code, reason);
  1140. };
  1141. SockJS.prototype._open = function () {
  1142. debug('_open', this._transport && this._transport.transportName, this.readyState);
  1143. if (this.readyState === SockJS.CONNECTING) {
  1144. if (this._transportTimeoutId) {
  1145. clearTimeout(this._transportTimeoutId);
  1146. this._transportTimeoutId = null;
  1147. }
  1148. this.readyState = SockJS.OPEN;
  1149. this.transport = this._transport.transportName;
  1150. this.dispatchEvent(new Event('open'));
  1151. debug('connected', this.transport);
  1152. } else {
  1153. // The server might have been restarted, and lost track of our
  1154. // connection.
  1155. this._close(1006, 'Server lost session');
  1156. }
  1157. };
  1158. SockJS.prototype._close = function (code, reason, wasClean) {
  1159. debug('_close', this.transport, code, reason, wasClean, this.readyState);
  1160. var forceFail = false;
  1161. if (this._ir) {
  1162. forceFail = true;
  1163. this._ir.close();
  1164. this._ir = null;
  1165. }
  1166. if (this._transport) {
  1167. this._transport.close();
  1168. this._transport = null;
  1169. this.transport = null;
  1170. }
  1171. if (this.readyState === SockJS.CLOSED) {
  1172. throw new Error('InvalidStateError: SockJS has already been closed');
  1173. }
  1174. this.readyState = SockJS.CLOSING;
  1175. setTimeout(function () {
  1176. this.readyState = SockJS.CLOSED;
  1177. if (forceFail) {
  1178. this.dispatchEvent(new Event('error'));
  1179. }
  1180. var e = new CloseEvent('close');
  1181. e.wasClean = wasClean || false;
  1182. e.code = code || 1000;
  1183. e.reason = reason;
  1184. this.dispatchEvent(e);
  1185. this.onmessage = this.onclose = this.onerror = null;
  1186. debug('disconnected');
  1187. }.bind(this), 0);
  1188. };
  1189. // See: http://www.erg.abdn.ac.uk/~gerrit/dccp/notes/ccid2/rto_estimator/
  1190. // and RFC 2988.
  1191. SockJS.prototype.countRTO = function (rtt) {
  1192. // In a local environment, when using IE8/9 and the `jsonp-polling`
  1193. // transport the time needed to establish a connection (the time that pass
  1194. // from the opening of the transport to the call of `_dispatchOpen`) is
  1195. // around 200msec (the lower bound used in the article above) and this
  1196. // causes spurious timeouts. For this reason we calculate a value slightly
  1197. // larger than that used in the article.
  1198. if (rtt > 100) {
  1199. return 4 * rtt; // rto > 400msec
  1200. }
  1201. return 300 + rtt; // 300msec < rto <= 400msec
  1202. };
  1203. module.exports = function (availableTransports) {
  1204. transports = transport(availableTransports);
  1205. __webpack_require__(/*! ./iframe-bootstrap */ "./node_modules/sockjs-client/lib/iframe-bootstrap.js")(SockJS, availableTransports);
  1206. return SockJS;
  1207. };
  1208. /***/ }),
  1209. /***/ "./node_modules/sockjs-client/lib/shims.js":
  1210. /*!*************************************************!*\
  1211. !*** ./node_modules/sockjs-client/lib/shims.js ***!
  1212. \*************************************************/
  1213. /***/ (function() {
  1214. "use strict";
  1215. /* eslint-disable */
  1216. /* jscs: disable */
  1217. // pulled specific shims from https://github.com/es-shims/es5-shim
  1218. var ArrayPrototype = Array.prototype;
  1219. var ObjectPrototype = Object.prototype;
  1220. var FunctionPrototype = Function.prototype;
  1221. var StringPrototype = String.prototype;
  1222. var array_slice = ArrayPrototype.slice;
  1223. var _toString = ObjectPrototype.toString;
  1224. var isFunction = function isFunction(val) {
  1225. return ObjectPrototype.toString.call(val) === '[object Function]';
  1226. };
  1227. var isArray = function isArray(obj) {
  1228. return _toString.call(obj) === '[object Array]';
  1229. };
  1230. var isString = function isString(obj) {
  1231. return _toString.call(obj) === '[object String]';
  1232. };
  1233. var supportsDescriptors = Object.defineProperty && function () {
  1234. try {
  1235. Object.defineProperty({}, 'x', {});
  1236. return true;
  1237. } catch (e) {
  1238. /* this is ES3 */
  1239. return false;
  1240. }
  1241. }();
  1242. // Define configurable, writable and non-enumerable props
  1243. // if they don't exist.
  1244. var defineProperty;
  1245. if (supportsDescriptors) {
  1246. defineProperty = function defineProperty(object, name, method, forceAssign) {
  1247. if (!forceAssign && name in object) {
  1248. return;
  1249. }
  1250. Object.defineProperty(object, name, {
  1251. configurable: true,
  1252. enumerable: false,
  1253. writable: true,
  1254. value: method
  1255. });
  1256. };
  1257. } else {
  1258. defineProperty = function defineProperty(object, name, method, forceAssign) {
  1259. if (!forceAssign && name in object) {
  1260. return;
  1261. }
  1262. object[name] = method;
  1263. };
  1264. }
  1265. var defineProperties = function defineProperties(object, map, forceAssign) {
  1266. for (var name in map) {
  1267. if (ObjectPrototype.hasOwnProperty.call(map, name)) {
  1268. defineProperty(object, name, map[name], forceAssign);
  1269. }
  1270. }
  1271. };
  1272. var toObject = function toObject(o) {
  1273. if (o == null) {
  1274. // this matches both null and undefined
  1275. throw new TypeError("can't convert " + o + ' to object');
  1276. }
  1277. return Object(o);
  1278. };
  1279. //
  1280. // Util
  1281. // ======
  1282. //
  1283. // ES5 9.4
  1284. // http://es5.github.com/#x9.4
  1285. // http://jsperf.com/to-integer
  1286. function toInteger(num) {
  1287. var n = +num;
  1288. if (n !== n) {
  1289. // isNaN
  1290. n = 0;
  1291. } else if (n !== 0 && n !== 1 / 0 && n !== -(1 / 0)) {
  1292. n = (n > 0 || -1) * Math.floor(Math.abs(n));
  1293. }
  1294. return n;
  1295. }
  1296. function ToUint32(x) {
  1297. return x >>> 0;
  1298. }
  1299. //
  1300. // Function
  1301. // ========
  1302. //
  1303. // ES-5 15.3.4.5
  1304. // http://es5.github.com/#x15.3.4.5
  1305. function Empty() {}
  1306. defineProperties(FunctionPrototype, {
  1307. bind: function bind(that) {
  1308. // .length is 1
  1309. // 1. Let Target be the this value.
  1310. var target = this;
  1311. // 2. If IsCallable(Target) is false, throw a TypeError exception.
  1312. if (!isFunction(target)) {
  1313. throw new TypeError('Function.prototype.bind called on incompatible ' + target);
  1314. }
  1315. // 3. Let A be a new (possibly empty) internal list of all of the
  1316. // argument values provided after thisArg (arg1, arg2 etc), in order.
  1317. // XXX slicedArgs will stand in for "A" if used
  1318. var args = array_slice.call(arguments, 1); // for normal call
  1319. // 4. Let F be a new native ECMAScript object.
  1320. // 11. Set the [[Prototype]] internal property of F to the standard
  1321. // built-in Function prototype object as specified in 15.3.3.1.
  1322. // 12. Set the [[Call]] internal property of F as described in
  1323. // 15.3.4.5.1.
  1324. // 13. Set the [[Construct]] internal property of F as described in
  1325. // 15.3.4.5.2.
  1326. // 14. Set the [[HasInstance]] internal property of F as described in
  1327. // 15.3.4.5.3.
  1328. var binder = function binder() {
  1329. if (this instanceof bound) {
  1330. // 15.3.4.5.2 [[Construct]]
  1331. // When the [[Construct]] internal method of a function object,
  1332. // F that was created using the bind function is called with a
  1333. // list of arguments ExtraArgs, the following steps are taken:
  1334. // 1. Let target be the value of F's [[TargetFunction]]
  1335. // internal property.
  1336. // 2. If target has no [[Construct]] internal method, a
  1337. // TypeError exception is thrown.
  1338. // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
  1339. // property.
  1340. // 4. Let args be a new list containing the same values as the
  1341. // list boundArgs in the same order followed by the same
  1342. // values as the list ExtraArgs in the same order.
  1343. // 5. Return the result of calling the [[Construct]] internal
  1344. // method of target providing args as the arguments.
  1345. var result = target.apply(this, args.concat(array_slice.call(arguments)));
  1346. if (Object(result) === result) {
  1347. return result;
  1348. }
  1349. return this;
  1350. } else {
  1351. // 15.3.4.5.1 [[Call]]
  1352. // When the [[Call]] internal method of a function object, F,
  1353. // which was created using the bind function is called with a
  1354. // this value and a list of arguments ExtraArgs, the following
  1355. // steps are taken:
  1356. // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
  1357. // property.
  1358. // 2. Let boundThis be the value of F's [[BoundThis]] internal
  1359. // property.
  1360. // 3. Let target be the value of F's [[TargetFunction]] internal
  1361. // property.
  1362. // 4. Let args be a new list containing the same values as the
  1363. // list boundArgs in the same order followed by the same
  1364. // values as the list ExtraArgs in the same order.
  1365. // 5. Return the result of calling the [[Call]] internal method
  1366. // of target providing boundThis as the this value and
  1367. // providing args as the arguments.
  1368. // equiv: target.call(this, ...boundArgs, ...args)
  1369. return target.apply(that, args.concat(array_slice.call(arguments)));
  1370. }
  1371. };
  1372. // 15. If the [[Class]] internal property of Target is "Function", then
  1373. // a. Let L be the length property of Target minus the length of A.
  1374. // b. Set the length own property of F to either 0 or L, whichever is
  1375. // larger.
  1376. // 16. Else set the length own property of F to 0.
  1377. var boundLength = Math.max(0, target.length - args.length);
  1378. // 17. Set the attributes of the length own property of F to the values
  1379. // specified in 15.3.5.1.
  1380. var boundArgs = [];
  1381. for (var i = 0; i < boundLength; i++) {
  1382. boundArgs.push('$' + i);
  1383. }
  1384. // XXX Build a dynamic function with desired amount of arguments is the only
  1385. // way to set the length property of a function.
  1386. // In environments where Content Security Policies enabled (Chrome extensions,
  1387. // for ex.) all use of eval or Function costructor throws an exception.
  1388. // However in all of these environments Function.prototype.bind exists
  1389. // and so this code will never be executed.
  1390. var bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);
  1391. if (target.prototype) {
  1392. Empty.prototype = target.prototype;
  1393. bound.prototype = new Empty();
  1394. // Clean up dangling references.
  1395. Empty.prototype = null;
  1396. }
  1397. // TODO
  1398. // 18. Set the [[Extensible]] internal property of F to true.
  1399. // TODO
  1400. // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
  1401. // 20. Call the [[DefineOwnProperty]] internal method of F with
  1402. // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
  1403. // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
  1404. // false.
  1405. // 21. Call the [[DefineOwnProperty]] internal method of F with
  1406. // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
  1407. // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
  1408. // and false.
  1409. // TODO
  1410. // NOTE Function objects created using Function.prototype.bind do not
  1411. // have a prototype property or the [[Code]], [[FormalParameters]], and
  1412. // [[Scope]] internal properties.
  1413. // XXX can't delete prototype in pure-js.
  1414. // 22. Return F.
  1415. return bound;
  1416. }
  1417. });
  1418. //
  1419. // Array
  1420. // =====
  1421. //
  1422. // ES5 15.4.3.2
  1423. // http://es5.github.com/#x15.4.3.2
  1424. // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
  1425. defineProperties(Array, {
  1426. isArray: isArray
  1427. });
  1428. var boxedString = Object('a');
  1429. var splitString = boxedString[0] !== 'a' || !(0 in boxedString);
  1430. var properlyBoxesContext = function properlyBoxed(method) {
  1431. // Check node 0.6.21 bug where third parameter is not boxed
  1432. var properlyBoxesNonStrict = true;
  1433. var properlyBoxesStrict = true;
  1434. if (method) {
  1435. method.call('foo', function (_, __, context) {
  1436. if (typeof context !== 'object') {
  1437. properlyBoxesNonStrict = false;
  1438. }
  1439. });
  1440. method.call([1], function () {
  1441. 'use strict';
  1442. properlyBoxesStrict = typeof this === 'string';
  1443. }, 'x');
  1444. }
  1445. return !!method && properlyBoxesNonStrict && properlyBoxesStrict;
  1446. };
  1447. defineProperties(ArrayPrototype, {
  1448. forEach: function forEach(fun /*, thisp*/) {
  1449. var object = toObject(this),
  1450. self = splitString && isString(this) ? this.split('') : object,
  1451. thisp = arguments[1],
  1452. i = -1,
  1453. length = self.length >>> 0;
  1454. // If no callback function or if callback is not a callable function
  1455. if (!isFunction(fun)) {
  1456. throw new TypeError(); // TODO message
  1457. }
  1458. while (++i < length) {
  1459. if (i in self) {
  1460. // Invoke the callback function with call, passing arguments:
  1461. // context, property value, property key, thisArg object
  1462. // context
  1463. fun.call(thisp, self[i], i, object);
  1464. }
  1465. }
  1466. }
  1467. }, !properlyBoxesContext(ArrayPrototype.forEach));
  1468. // ES5 15.4.4.14
  1469. // http://es5.github.com/#x15.4.4.14
  1470. // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
  1471. var hasFirefox2IndexOfBug = Array.prototype.indexOf && [0, 1].indexOf(1, 2) !== -1;
  1472. defineProperties(ArrayPrototype, {
  1473. indexOf: function indexOf(sought /*, fromIndex */) {
  1474. var self = splitString && isString(this) ? this.split('') : toObject(this),
  1475. length = self.length >>> 0;
  1476. if (!length) {
  1477. return -1;
  1478. }
  1479. var i = 0;
  1480. if (arguments.length > 1) {
  1481. i = toInteger(arguments[1]);
  1482. }
  1483. // handle negative indices
  1484. i = i >= 0 ? i : Math.max(0, length + i);
  1485. for (; i < length; i++) {
  1486. if (i in self && self[i] === sought) {
  1487. return i;
  1488. }
  1489. }
  1490. return -1;
  1491. }
  1492. }, hasFirefox2IndexOfBug);
  1493. //
  1494. // String
  1495. // ======
  1496. //
  1497. // ES5 15.5.4.14
  1498. // http://es5.github.com/#x15.5.4.14
  1499. // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers]
  1500. // Many browsers do not split properly with regular expressions or they
  1501. // do not perform the split correctly under obscure conditions.
  1502. // See http://blog.stevenlevithan.com/archives/cross-browser-split
  1503. // I've tested in many browsers and this seems to cover the deviant ones:
  1504. // 'ab'.split(/(?:ab)*/) should be ["", ""], not [""]
  1505. // '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""]
  1506. // 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not
  1507. // [undefined, "t", undefined, "e", ...]
  1508. // ''.split(/.?/) should be [], not [""]
  1509. // '.'.split(/()()/) should be ["."], not ["", "", "."]
  1510. var string_split = StringPrototype.split;
  1511. if ('ab'.split(/(?:ab)*/).length !== 2 || '.'.split(/(.?)(.?)/).length !== 4 || 'tesst'.split(/(s)*/)[1] === 't' || 'test'.split(/(?:)/, -1).length !== 4 || ''.split(/.?/).length || '.'.split(/()()/).length > 1) {
  1512. (function () {
  1513. var compliantExecNpcg = /()??/.exec('')[1] === void 0; // NPCG: nonparticipating capturing group
  1514. StringPrototype.split = function (separator, limit) {
  1515. var string = this;
  1516. if (separator === void 0 && limit === 0) {
  1517. return [];
  1518. }
  1519. // If `separator` is not a regex, use native split
  1520. if (_toString.call(separator) !== '[object RegExp]') {
  1521. return string_split.call(this, separator, limit);
  1522. }
  1523. var output = [],
  1524. flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.extended ? 'x' : '') + (
  1525. // Proposed for ES6
  1526. separator.sticky ? 'y' : ''),
  1527. // Firefox 3+
  1528. lastLastIndex = 0,
  1529. // Make `global` and avoid `lastIndex` issues by working with a copy
  1530. separator2,
  1531. match,
  1532. lastIndex,
  1533. lastLength;
  1534. separator = new RegExp(separator.source, flags + 'g');
  1535. string += ''; // Type-convert
  1536. if (!compliantExecNpcg) {
  1537. // Doesn't need flags gy, but they don't hurt
  1538. separator2 = new RegExp('^' + separator.source + '$(?!\\s)', flags);
  1539. }
  1540. /* Values for `limit`, per the spec:
  1541. * If undefined: 4294967295 // Math.pow(2, 32) - 1
  1542. * If 0, Infinity, or NaN: 0
  1543. * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;
  1544. * If negative number: 4294967296 - Math.floor(Math.abs(limit))
  1545. * If other: Type-convert, then use the above rules
  1546. */
  1547. limit = limit === void 0 ? -1 >>> 0 :
  1548. // Math.pow(2, 32) - 1
  1549. ToUint32(limit);
  1550. while (match = separator.exec(string)) {
  1551. // `separator.lastIndex` is not reliable cross-browser
  1552. lastIndex = match.index + match[0].length;
  1553. if (lastIndex > lastLastIndex) {
  1554. output.push(string.slice(lastLastIndex, match.index));
  1555. // Fix browsers whose `exec` methods don't consistently return `undefined` for
  1556. // nonparticipating capturing groups
  1557. if (!compliantExecNpcg && match.length > 1) {
  1558. match[0].replace(separator2, function () {
  1559. for (var i = 1; i < arguments.length - 2; i++) {
  1560. if (arguments[i] === void 0) {
  1561. match[i] = void 0;
  1562. }
  1563. }
  1564. });
  1565. }
  1566. if (match.length > 1 && match.index < string.length) {
  1567. ArrayPrototype.push.apply(output, match.slice(1));
  1568. }
  1569. lastLength = match[0].length;
  1570. lastLastIndex = lastIndex;
  1571. if (output.length >= limit) {
  1572. break;
  1573. }
  1574. }
  1575. if (separator.lastIndex === match.index) {
  1576. separator.lastIndex++; // Avoid an infinite loop
  1577. }
  1578. }
  1579. if (lastLastIndex === string.length) {
  1580. if (lastLength || !separator.test('')) {
  1581. output.push('');
  1582. }
  1583. } else {
  1584. output.push(string.slice(lastLastIndex));
  1585. }
  1586. return output.length > limit ? output.slice(0, limit) : output;
  1587. };
  1588. })();
  1589. // [bugfix, chrome]
  1590. // If separator is undefined, then the result array contains just one String,
  1591. // which is the this value (converted to a String). If limit is not undefined,
  1592. // then the output array is truncated so that it contains no more than limit
  1593. // elements.
  1594. // "0".split(undefined, 0) -> []
  1595. } else if ('0'.split(void 0, 0).length) {
  1596. StringPrototype.split = function split(separator, limit) {
  1597. if (separator === void 0 && limit === 0) {
  1598. return [];
  1599. }
  1600. return string_split.call(this, separator, limit);
  1601. };
  1602. }
  1603. // ECMA-262, 3rd B.2.3
  1604. // Not an ECMAScript standard, although ECMAScript 3rd Edition has a
  1605. // non-normative section suggesting uniform semantics and it should be
  1606. // normalized across all browsers
  1607. // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE
  1608. var string_substr = StringPrototype.substr;
  1609. var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b';
  1610. defineProperties(StringPrototype, {
  1611. substr: function substr(start, length) {
  1612. return string_substr.call(this, start < 0 ? (start = this.length + start) < 0 ? 0 : start : start, length);
  1613. }
  1614. }, hasNegativeSubstrBug);
  1615. /***/ }),
  1616. /***/ "./node_modules/sockjs-client/lib/transport-list.js":
  1617. /*!**********************************************************!*\
  1618. !*** ./node_modules/sockjs-client/lib/transport-list.js ***!
  1619. \**********************************************************/
  1620. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1621. "use strict";
  1622. module.exports = [
  1623. // streaming transports
  1624. __webpack_require__(/*! ./transport/websocket */ "./node_modules/sockjs-client/lib/transport/websocket.js"), __webpack_require__(/*! ./transport/xhr-streaming */ "./node_modules/sockjs-client/lib/transport/xhr-streaming.js"), __webpack_require__(/*! ./transport/xdr-streaming */ "./node_modules/sockjs-client/lib/transport/xdr-streaming.js"), __webpack_require__(/*! ./transport/eventsource */ "./node_modules/sockjs-client/lib/transport/eventsource.js"), __webpack_require__(/*! ./transport/lib/iframe-wrap */ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__(/*! ./transport/eventsource */ "./node_modules/sockjs-client/lib/transport/eventsource.js"))
  1625. // polling transports
  1626. , __webpack_require__(/*! ./transport/htmlfile */ "./node_modules/sockjs-client/lib/transport/htmlfile.js"), __webpack_require__(/*! ./transport/lib/iframe-wrap */ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__(/*! ./transport/htmlfile */ "./node_modules/sockjs-client/lib/transport/htmlfile.js")), __webpack_require__(/*! ./transport/xhr-polling */ "./node_modules/sockjs-client/lib/transport/xhr-polling.js"), __webpack_require__(/*! ./transport/xdr-polling */ "./node_modules/sockjs-client/lib/transport/xdr-polling.js"), __webpack_require__(/*! ./transport/lib/iframe-wrap */ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__(/*! ./transport/xhr-polling */ "./node_modules/sockjs-client/lib/transport/xhr-polling.js")), __webpack_require__(/*! ./transport/jsonp-polling */ "./node_modules/sockjs-client/lib/transport/jsonp-polling.js")];
  1627. /***/ }),
  1628. /***/ "./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js":
  1629. /*!**************************************************************************!*\
  1630. !*** ./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js ***!
  1631. \**************************************************************************/
  1632. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1633. "use strict";
  1634. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  1635. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  1636. utils = __webpack_require__(/*! ../../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  1637. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  1638. XHR = __webpack_require__.g.XMLHttpRequest;
  1639. var debug = function debug() {};
  1640. if (true) {
  1641. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:browser:xhr');
  1642. }
  1643. function AbstractXHRObject(method, url, payload, opts) {
  1644. debug(method, url);
  1645. var self = this;
  1646. EventEmitter.call(this);
  1647. setTimeout(function () {
  1648. self._start(method, url, payload, opts);
  1649. }, 0);
  1650. }
  1651. inherits(AbstractXHRObject, EventEmitter);
  1652. AbstractXHRObject.prototype._start = function (method, url, payload, opts) {
  1653. var self = this;
  1654. try {
  1655. this.xhr = new XHR();
  1656. } catch (x) {
  1657. // intentionally empty
  1658. }
  1659. if (!this.xhr) {
  1660. debug('no xhr');
  1661. this.emit('finish', 0, 'no xhr support');
  1662. this._cleanup();
  1663. return;
  1664. }
  1665. // several browsers cache POSTs
  1666. url = urlUtils.addQuery(url, 't=' + +new Date());
  1667. // Explorer tends to keep connection open, even after the
  1668. // tab gets closed: http://bugs.jquery.com/ticket/5280
  1669. this.unloadRef = utils.unloadAdd(function () {
  1670. debug('unload cleanup');
  1671. self._cleanup(true);
  1672. });
  1673. try {
  1674. this.xhr.open(method, url, true);
  1675. if (this.timeout && 'timeout' in this.xhr) {
  1676. this.xhr.timeout = this.timeout;
  1677. this.xhr.ontimeout = function () {
  1678. debug('xhr timeout');
  1679. self.emit('finish', 0, '');
  1680. self._cleanup(false);
  1681. };
  1682. }
  1683. } catch (e) {
  1684. debug('exception', e);
  1685. // IE raises an exception on wrong port.
  1686. this.emit('finish', 0, '');
  1687. this._cleanup(false);
  1688. return;
  1689. }
  1690. if ((!opts || !opts.noCredentials) && AbstractXHRObject.supportsCORS) {
  1691. debug('withCredentials');
  1692. // Mozilla docs says https://developer.mozilla.org/en/XMLHttpRequest :
  1693. // "This never affects same-site requests."
  1694. this.xhr.withCredentials = true;
  1695. }
  1696. if (opts && opts.headers) {
  1697. for (var key in opts.headers) {
  1698. this.xhr.setRequestHeader(key, opts.headers[key]);
  1699. }
  1700. }
  1701. this.xhr.onreadystatechange = function () {
  1702. if (self.xhr) {
  1703. var x = self.xhr;
  1704. var text, status;
  1705. debug('readyState', x.readyState);
  1706. switch (x.readyState) {
  1707. case 3:
  1708. // IE doesn't like peeking into responseText or status
  1709. // on Microsoft.XMLHTTP and readystate=3
  1710. try {
  1711. status = x.status;
  1712. text = x.responseText;
  1713. } catch (e) {
  1714. // intentionally empty
  1715. }
  1716. debug('status', status);
  1717. // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450
  1718. if (status === 1223) {
  1719. status = 204;
  1720. }
  1721. // IE does return readystate == 3 for 404 answers.
  1722. if (status === 200 && text && text.length > 0) {
  1723. debug('chunk');
  1724. self.emit('chunk', status, text);
  1725. }
  1726. break;
  1727. case 4:
  1728. status = x.status;
  1729. debug('status', status);
  1730. // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450
  1731. if (status === 1223) {
  1732. status = 204;
  1733. }
  1734. // IE returns this for a bad port
  1735. // http://msdn.microsoft.com/en-us/library/windows/desktop/aa383770(v=vs.85).aspx
  1736. if (status === 12005 || status === 12029) {
  1737. status = 0;
  1738. }
  1739. debug('finish', status, x.responseText);
  1740. self.emit('finish', status, x.responseText);
  1741. self._cleanup(false);
  1742. break;
  1743. }
  1744. }
  1745. };
  1746. try {
  1747. self.xhr.send(payload);
  1748. } catch (e) {
  1749. self.emit('finish', 0, '');
  1750. self._cleanup(false);
  1751. }
  1752. };
  1753. AbstractXHRObject.prototype._cleanup = function (abort) {
  1754. debug('cleanup');
  1755. if (!this.xhr) {
  1756. return;
  1757. }
  1758. this.removeAllListeners();
  1759. utils.unloadDel(this.unloadRef);
  1760. // IE needs this field to be a function
  1761. this.xhr.onreadystatechange = function () {};
  1762. if (this.xhr.ontimeout) {
  1763. this.xhr.ontimeout = null;
  1764. }
  1765. if (abort) {
  1766. try {
  1767. this.xhr.abort();
  1768. } catch (x) {
  1769. // intentionally empty
  1770. }
  1771. }
  1772. this.unloadRef = this.xhr = null;
  1773. };
  1774. AbstractXHRObject.prototype.close = function () {
  1775. debug('close');
  1776. this._cleanup(true);
  1777. };
  1778. AbstractXHRObject.enabled = !!XHR;
  1779. // override XMLHttpRequest for IE6/7
  1780. // obfuscate to avoid firewalls
  1781. var axo = ['Active'].concat('Object').join('X');
  1782. if (!AbstractXHRObject.enabled && axo in __webpack_require__.g) {
  1783. debug('overriding xmlhttprequest');
  1784. XHR = function XHR() {
  1785. try {
  1786. return new __webpack_require__.g[axo]('Microsoft.XMLHTTP');
  1787. } catch (e) {
  1788. return null;
  1789. }
  1790. };
  1791. AbstractXHRObject.enabled = !!new XHR();
  1792. }
  1793. var cors = false;
  1794. try {
  1795. cors = 'withCredentials' in new XHR();
  1796. } catch (ignored) {
  1797. // intentionally empty
  1798. }
  1799. AbstractXHRObject.supportsCORS = cors;
  1800. module.exports = AbstractXHRObject;
  1801. /***/ }),
  1802. /***/ "./node_modules/sockjs-client/lib/transport/browser/eventsource.js":
  1803. /*!*************************************************************************!*\
  1804. !*** ./node_modules/sockjs-client/lib/transport/browser/eventsource.js ***!
  1805. \*************************************************************************/
  1806. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1807. module.exports = __webpack_require__.g.EventSource;
  1808. /***/ }),
  1809. /***/ "./node_modules/sockjs-client/lib/transport/browser/websocket.js":
  1810. /*!***********************************************************************!*\
  1811. !*** ./node_modules/sockjs-client/lib/transport/browser/websocket.js ***!
  1812. \***********************************************************************/
  1813. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1814. "use strict";
  1815. var Driver = __webpack_require__.g.WebSocket || __webpack_require__.g.MozWebSocket;
  1816. if (Driver) {
  1817. module.exports = function WebSocketBrowserDriver(url) {
  1818. return new Driver(url);
  1819. };
  1820. } else {
  1821. module.exports = undefined;
  1822. }
  1823. /***/ }),
  1824. /***/ "./node_modules/sockjs-client/lib/transport/eventsource.js":
  1825. /*!*****************************************************************!*\
  1826. !*** ./node_modules/sockjs-client/lib/transport/eventsource.js ***!
  1827. \*****************************************************************/
  1828. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1829. "use strict";
  1830. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  1831. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js"),
  1832. EventSourceReceiver = __webpack_require__(/*! ./receiver/eventsource */ "./node_modules/sockjs-client/lib/transport/receiver/eventsource.js"),
  1833. XHRCorsObject = __webpack_require__(/*! ./sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js"),
  1834. EventSourceDriver = __webpack_require__(/*! eventsource */ "./node_modules/sockjs-client/lib/transport/browser/eventsource.js");
  1835. function EventSourceTransport(transUrl) {
  1836. if (!EventSourceTransport.enabled()) {
  1837. throw new Error('Transport created when disabled');
  1838. }
  1839. AjaxBasedTransport.call(this, transUrl, '/eventsource', EventSourceReceiver, XHRCorsObject);
  1840. }
  1841. inherits(EventSourceTransport, AjaxBasedTransport);
  1842. EventSourceTransport.enabled = function () {
  1843. return !!EventSourceDriver;
  1844. };
  1845. EventSourceTransport.transportName = 'eventsource';
  1846. EventSourceTransport.roundTrips = 2;
  1847. module.exports = EventSourceTransport;
  1848. /***/ }),
  1849. /***/ "./node_modules/sockjs-client/lib/transport/htmlfile.js":
  1850. /*!**************************************************************!*\
  1851. !*** ./node_modules/sockjs-client/lib/transport/htmlfile.js ***!
  1852. \**************************************************************/
  1853. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1854. "use strict";
  1855. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  1856. HtmlfileReceiver = __webpack_require__(/*! ./receiver/htmlfile */ "./node_modules/sockjs-client/lib/transport/receiver/htmlfile.js"),
  1857. XHRLocalObject = __webpack_require__(/*! ./sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js"),
  1858. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js");
  1859. function HtmlFileTransport(transUrl) {
  1860. if (!HtmlfileReceiver.enabled) {
  1861. throw new Error('Transport created when disabled');
  1862. }
  1863. AjaxBasedTransport.call(this, transUrl, '/htmlfile', HtmlfileReceiver, XHRLocalObject);
  1864. }
  1865. inherits(HtmlFileTransport, AjaxBasedTransport);
  1866. HtmlFileTransport.enabled = function (info) {
  1867. return HtmlfileReceiver.enabled && info.sameOrigin;
  1868. };
  1869. HtmlFileTransport.transportName = 'htmlfile';
  1870. HtmlFileTransport.roundTrips = 2;
  1871. module.exports = HtmlFileTransport;
  1872. /***/ }),
  1873. /***/ "./node_modules/sockjs-client/lib/transport/iframe.js":
  1874. /*!************************************************************!*\
  1875. !*** ./node_modules/sockjs-client/lib/transport/iframe.js ***!
  1876. \************************************************************/
  1877. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1878. "use strict";
  1879. // Few cool transports do work only for same-origin. In order to make
  1880. // them work cross-domain we shall use iframe, served from the
  1881. // remote domain. New browsers have capabilities to communicate with
  1882. // cross domain iframe using postMessage(). In IE it was implemented
  1883. // from IE 8+, but of course, IE got some details wrong:
  1884. // http://msdn.microsoft.com/en-us/library/cc197015(v=VS.85).aspx
  1885. // http://stevesouders.com/misc/test-postmessage.php
  1886. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  1887. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  1888. version = __webpack_require__(/*! ../version */ "./node_modules/sockjs-client/lib/version.js"),
  1889. urlUtils = __webpack_require__(/*! ../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  1890. iframeUtils = __webpack_require__(/*! ../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js"),
  1891. eventUtils = __webpack_require__(/*! ../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  1892. random = __webpack_require__(/*! ../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js");
  1893. var debug = function debug() {};
  1894. if (true) {
  1895. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:transport:iframe');
  1896. }
  1897. function IframeTransport(transport, transUrl, baseUrl) {
  1898. if (!IframeTransport.enabled()) {
  1899. throw new Error('Transport created when disabled');
  1900. }
  1901. EventEmitter.call(this);
  1902. var self = this;
  1903. this.origin = urlUtils.getOrigin(baseUrl);
  1904. this.baseUrl = baseUrl;
  1905. this.transUrl = transUrl;
  1906. this.transport = transport;
  1907. this.windowId = random.string(8);
  1908. var iframeUrl = urlUtils.addPath(baseUrl, '/iframe.html') + '#' + this.windowId;
  1909. debug(transport, transUrl, iframeUrl);
  1910. this.iframeObj = iframeUtils.createIframe(iframeUrl, function (r) {
  1911. debug('err callback');
  1912. self.emit('close', 1006, 'Unable to load an iframe (' + r + ')');
  1913. self.close();
  1914. });
  1915. this.onmessageCallback = this._message.bind(this);
  1916. eventUtils.attachEvent('message', this.onmessageCallback);
  1917. }
  1918. inherits(IframeTransport, EventEmitter);
  1919. IframeTransport.prototype.close = function () {
  1920. debug('close');
  1921. this.removeAllListeners();
  1922. if (this.iframeObj) {
  1923. eventUtils.detachEvent('message', this.onmessageCallback);
  1924. try {
  1925. // When the iframe is not loaded, IE raises an exception
  1926. // on 'contentWindow'.
  1927. this.postMessage('c');
  1928. } catch (x) {
  1929. // intentionally empty
  1930. }
  1931. this.iframeObj.cleanup();
  1932. this.iframeObj = null;
  1933. this.onmessageCallback = this.iframeObj = null;
  1934. }
  1935. };
  1936. IframeTransport.prototype._message = function (e) {
  1937. debug('message', e.data);
  1938. if (!urlUtils.isOriginEqual(e.origin, this.origin)) {
  1939. debug('not same origin', e.origin, this.origin);
  1940. return;
  1941. }
  1942. var iframeMessage;
  1943. try {
  1944. iframeMessage = JSON.parse(e.data);
  1945. } catch (ignored) {
  1946. debug('bad json', e.data);
  1947. return;
  1948. }
  1949. if (iframeMessage.windowId !== this.windowId) {
  1950. debug('mismatched window id', iframeMessage.windowId, this.windowId);
  1951. return;
  1952. }
  1953. switch (iframeMessage.type) {
  1954. case 's':
  1955. this.iframeObj.loaded();
  1956. // window global dependency
  1957. this.postMessage('s', JSON.stringify([version, this.transport, this.transUrl, this.baseUrl]));
  1958. break;
  1959. case 't':
  1960. this.emit('message', iframeMessage.data);
  1961. break;
  1962. case 'c':
  1963. var cdata;
  1964. try {
  1965. cdata = JSON.parse(iframeMessage.data);
  1966. } catch (ignored) {
  1967. debug('bad json', iframeMessage.data);
  1968. return;
  1969. }
  1970. this.emit('close', cdata[0], cdata[1]);
  1971. this.close();
  1972. break;
  1973. }
  1974. };
  1975. IframeTransport.prototype.postMessage = function (type, data) {
  1976. debug('postMessage', type, data);
  1977. this.iframeObj.post(JSON.stringify({
  1978. windowId: this.windowId,
  1979. type: type,
  1980. data: data || ''
  1981. }), this.origin);
  1982. };
  1983. IframeTransport.prototype.send = function (message) {
  1984. debug('send', message);
  1985. this.postMessage('m', message);
  1986. };
  1987. IframeTransport.enabled = function () {
  1988. return iframeUtils.iframeEnabled;
  1989. };
  1990. IframeTransport.transportName = 'iframe';
  1991. IframeTransport.roundTrips = 2;
  1992. module.exports = IframeTransport;
  1993. /***/ }),
  1994. /***/ "./node_modules/sockjs-client/lib/transport/jsonp-polling.js":
  1995. /*!*******************************************************************!*\
  1996. !*** ./node_modules/sockjs-client/lib/transport/jsonp-polling.js ***!
  1997. \*******************************************************************/
  1998. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1999. "use strict";
  2000. // The simplest and most robust transport, using the well-know cross
  2001. // domain hack - JSONP. This transport is quite inefficient - one
  2002. // message could use up to one http request. But at least it works almost
  2003. // everywhere.
  2004. // Known limitations:
  2005. // o you will get a spinning cursor
  2006. // o for Konqueror a dumb timer is needed to detect errors
  2007. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2008. SenderReceiver = __webpack_require__(/*! ./lib/sender-receiver */ "./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js"),
  2009. JsonpReceiver = __webpack_require__(/*! ./receiver/jsonp */ "./node_modules/sockjs-client/lib/transport/receiver/jsonp.js"),
  2010. jsonpSender = __webpack_require__(/*! ./sender/jsonp */ "./node_modules/sockjs-client/lib/transport/sender/jsonp.js");
  2011. function JsonPTransport(transUrl) {
  2012. if (!JsonPTransport.enabled()) {
  2013. throw new Error('Transport created when disabled');
  2014. }
  2015. SenderReceiver.call(this, transUrl, '/jsonp', jsonpSender, JsonpReceiver);
  2016. }
  2017. inherits(JsonPTransport, SenderReceiver);
  2018. JsonPTransport.enabled = function () {
  2019. return !!__webpack_require__.g.document;
  2020. };
  2021. JsonPTransport.transportName = 'jsonp-polling';
  2022. JsonPTransport.roundTrips = 1;
  2023. JsonPTransport.needBody = true;
  2024. module.exports = JsonPTransport;
  2025. /***/ }),
  2026. /***/ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js":
  2027. /*!********************************************************************!*\
  2028. !*** ./node_modules/sockjs-client/lib/transport/lib/ajax-based.js ***!
  2029. \********************************************************************/
  2030. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2031. "use strict";
  2032. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2033. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  2034. SenderReceiver = __webpack_require__(/*! ./sender-receiver */ "./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js");
  2035. var debug = function debug() {};
  2036. if (true) {
  2037. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:ajax-based');
  2038. }
  2039. function createAjaxSender(AjaxObject) {
  2040. return function (url, payload, callback) {
  2041. debug('create ajax sender', url, payload);
  2042. var opt = {};
  2043. if (typeof payload === 'string') {
  2044. opt.headers = {
  2045. 'Content-type': 'text/plain'
  2046. };
  2047. }
  2048. var ajaxUrl = urlUtils.addPath(url, '/xhr_send');
  2049. var xo = new AjaxObject('POST', ajaxUrl, payload, opt);
  2050. xo.once('finish', function (status) {
  2051. debug('finish', status);
  2052. xo = null;
  2053. if (status !== 200 && status !== 204) {
  2054. return callback(new Error('http status ' + status));
  2055. }
  2056. callback();
  2057. });
  2058. return function () {
  2059. debug('abort');
  2060. xo.close();
  2061. xo = null;
  2062. var err = new Error('Aborted');
  2063. err.code = 1000;
  2064. callback(err);
  2065. };
  2066. };
  2067. }
  2068. function AjaxBasedTransport(transUrl, urlSuffix, Receiver, AjaxObject) {
  2069. SenderReceiver.call(this, transUrl, urlSuffix, createAjaxSender(AjaxObject), Receiver, AjaxObject);
  2070. }
  2071. inherits(AjaxBasedTransport, SenderReceiver);
  2072. module.exports = AjaxBasedTransport;
  2073. /***/ }),
  2074. /***/ "./node_modules/sockjs-client/lib/transport/lib/buffered-sender.js":
  2075. /*!*************************************************************************!*\
  2076. !*** ./node_modules/sockjs-client/lib/transport/lib/buffered-sender.js ***!
  2077. \*************************************************************************/
  2078. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2079. "use strict";
  2080. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2081. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter);
  2082. var debug = function debug() {};
  2083. if (true) {
  2084. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:buffered-sender');
  2085. }
  2086. function BufferedSender(url, sender) {
  2087. debug(url);
  2088. EventEmitter.call(this);
  2089. this.sendBuffer = [];
  2090. this.sender = sender;
  2091. this.url = url;
  2092. }
  2093. inherits(BufferedSender, EventEmitter);
  2094. BufferedSender.prototype.send = function (message) {
  2095. debug('send', message);
  2096. this.sendBuffer.push(message);
  2097. if (!this.sendStop) {
  2098. this.sendSchedule();
  2099. }
  2100. };
  2101. // For polling transports in a situation when in the message callback,
  2102. // new message is being send. If the sending connection was started
  2103. // before receiving one, it is possible to saturate the network and
  2104. // timeout due to the lack of receiving socket. To avoid that we delay
  2105. // sending messages by some small time, in order to let receiving
  2106. // connection be started beforehand. This is only a halfmeasure and
  2107. // does not fix the big problem, but it does make the tests go more
  2108. // stable on slow networks.
  2109. BufferedSender.prototype.sendScheduleWait = function () {
  2110. debug('sendScheduleWait');
  2111. var self = this;
  2112. var tref;
  2113. this.sendStop = function () {
  2114. debug('sendStop');
  2115. self.sendStop = null;
  2116. clearTimeout(tref);
  2117. };
  2118. tref = setTimeout(function () {
  2119. debug('timeout');
  2120. self.sendStop = null;
  2121. self.sendSchedule();
  2122. }, 25);
  2123. };
  2124. BufferedSender.prototype.sendSchedule = function () {
  2125. debug('sendSchedule', this.sendBuffer.length);
  2126. var self = this;
  2127. if (this.sendBuffer.length > 0) {
  2128. var payload = '[' + this.sendBuffer.join(',') + ']';
  2129. this.sendStop = this.sender(this.url, payload, function (err) {
  2130. self.sendStop = null;
  2131. if (err) {
  2132. debug('error', err);
  2133. self.emit('close', err.code || 1006, 'Sending error: ' + err);
  2134. self.close();
  2135. } else {
  2136. self.sendScheduleWait();
  2137. }
  2138. });
  2139. this.sendBuffer = [];
  2140. }
  2141. };
  2142. BufferedSender.prototype._cleanup = function () {
  2143. debug('_cleanup');
  2144. this.removeAllListeners();
  2145. };
  2146. BufferedSender.prototype.close = function () {
  2147. debug('close');
  2148. this._cleanup();
  2149. if (this.sendStop) {
  2150. this.sendStop();
  2151. this.sendStop = null;
  2152. }
  2153. };
  2154. module.exports = BufferedSender;
  2155. /***/ }),
  2156. /***/ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js":
  2157. /*!*********************************************************************!*\
  2158. !*** ./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js ***!
  2159. \*********************************************************************/
  2160. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2161. "use strict";
  2162. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2163. IframeTransport = __webpack_require__(/*! ../iframe */ "./node_modules/sockjs-client/lib/transport/iframe.js"),
  2164. objectUtils = __webpack_require__(/*! ../../utils/object */ "./node_modules/sockjs-client/lib/utils/object.js");
  2165. module.exports = function (transport) {
  2166. function IframeWrapTransport(transUrl, baseUrl) {
  2167. IframeTransport.call(this, transport.transportName, transUrl, baseUrl);
  2168. }
  2169. inherits(IframeWrapTransport, IframeTransport);
  2170. IframeWrapTransport.enabled = function (url, info) {
  2171. if (!__webpack_require__.g.document) {
  2172. return false;
  2173. }
  2174. var iframeInfo = objectUtils.extend({}, info);
  2175. iframeInfo.sameOrigin = true;
  2176. return transport.enabled(iframeInfo) && IframeTransport.enabled();
  2177. };
  2178. IframeWrapTransport.transportName = 'iframe-' + transport.transportName;
  2179. IframeWrapTransport.needBody = true;
  2180. IframeWrapTransport.roundTrips = IframeTransport.roundTrips + transport.roundTrips - 1; // html, javascript (2) + transport - no CORS (1)
  2181. IframeWrapTransport.facadeTransport = transport;
  2182. return IframeWrapTransport;
  2183. };
  2184. /***/ }),
  2185. /***/ "./node_modules/sockjs-client/lib/transport/lib/polling.js":
  2186. /*!*****************************************************************!*\
  2187. !*** ./node_modules/sockjs-client/lib/transport/lib/polling.js ***!
  2188. \*****************************************************************/
  2189. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2190. "use strict";
  2191. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2192. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter);
  2193. var debug = function debug() {};
  2194. if (true) {
  2195. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:polling');
  2196. }
  2197. function Polling(Receiver, receiveUrl, AjaxObject) {
  2198. debug(receiveUrl);
  2199. EventEmitter.call(this);
  2200. this.Receiver = Receiver;
  2201. this.receiveUrl = receiveUrl;
  2202. this.AjaxObject = AjaxObject;
  2203. this._scheduleReceiver();
  2204. }
  2205. inherits(Polling, EventEmitter);
  2206. Polling.prototype._scheduleReceiver = function () {
  2207. debug('_scheduleReceiver');
  2208. var self = this;
  2209. var poll = this.poll = new this.Receiver(this.receiveUrl, this.AjaxObject);
  2210. poll.on('message', function (msg) {
  2211. debug('message', msg);
  2212. self.emit('message', msg);
  2213. });
  2214. poll.once('close', function (code, reason) {
  2215. debug('close', code, reason, self.pollIsClosing);
  2216. self.poll = poll = null;
  2217. if (!self.pollIsClosing) {
  2218. if (reason === 'network') {
  2219. self._scheduleReceiver();
  2220. } else {
  2221. self.emit('close', code || 1006, reason);
  2222. self.removeAllListeners();
  2223. }
  2224. }
  2225. });
  2226. };
  2227. Polling.prototype.abort = function () {
  2228. debug('abort');
  2229. this.removeAllListeners();
  2230. this.pollIsClosing = true;
  2231. if (this.poll) {
  2232. this.poll.abort();
  2233. }
  2234. };
  2235. module.exports = Polling;
  2236. /***/ }),
  2237. /***/ "./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js":
  2238. /*!*************************************************************************!*\
  2239. !*** ./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js ***!
  2240. \*************************************************************************/
  2241. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2242. "use strict";
  2243. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2244. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  2245. BufferedSender = __webpack_require__(/*! ./buffered-sender */ "./node_modules/sockjs-client/lib/transport/lib/buffered-sender.js"),
  2246. Polling = __webpack_require__(/*! ./polling */ "./node_modules/sockjs-client/lib/transport/lib/polling.js");
  2247. var debug = function debug() {};
  2248. if (true) {
  2249. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:sender-receiver');
  2250. }
  2251. function SenderReceiver(transUrl, urlSuffix, senderFunc, Receiver, AjaxObject) {
  2252. var pollUrl = urlUtils.addPath(transUrl, urlSuffix);
  2253. debug(pollUrl);
  2254. var self = this;
  2255. BufferedSender.call(this, transUrl, senderFunc);
  2256. this.poll = new Polling(Receiver, pollUrl, AjaxObject);
  2257. this.poll.on('message', function (msg) {
  2258. debug('poll message', msg);
  2259. self.emit('message', msg);
  2260. });
  2261. this.poll.once('close', function (code, reason) {
  2262. debug('poll close', code, reason);
  2263. self.poll = null;
  2264. self.emit('close', code, reason);
  2265. self.close();
  2266. });
  2267. }
  2268. inherits(SenderReceiver, BufferedSender);
  2269. SenderReceiver.prototype.close = function () {
  2270. BufferedSender.prototype.close.call(this);
  2271. debug('close');
  2272. this.removeAllListeners();
  2273. if (this.poll) {
  2274. this.poll.abort();
  2275. this.poll = null;
  2276. }
  2277. };
  2278. module.exports = SenderReceiver;
  2279. /***/ }),
  2280. /***/ "./node_modules/sockjs-client/lib/transport/receiver/eventsource.js":
  2281. /*!**************************************************************************!*\
  2282. !*** ./node_modules/sockjs-client/lib/transport/receiver/eventsource.js ***!
  2283. \**************************************************************************/
  2284. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2285. "use strict";
  2286. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2287. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  2288. EventSourceDriver = __webpack_require__(/*! eventsource */ "./node_modules/sockjs-client/lib/transport/browser/eventsource.js");
  2289. var debug = function debug() {};
  2290. if (true) {
  2291. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:receiver:eventsource');
  2292. }
  2293. function EventSourceReceiver(url) {
  2294. debug(url);
  2295. EventEmitter.call(this);
  2296. var self = this;
  2297. var es = this.es = new EventSourceDriver(url);
  2298. es.onmessage = function (e) {
  2299. debug('message', e.data);
  2300. self.emit('message', decodeURI(e.data));
  2301. };
  2302. es.onerror = function (e) {
  2303. debug('error', es.readyState, e);
  2304. // ES on reconnection has readyState = 0 or 1.
  2305. // on network error it's CLOSED = 2
  2306. var reason = es.readyState !== 2 ? 'network' : 'permanent';
  2307. self._cleanup();
  2308. self._close(reason);
  2309. };
  2310. }
  2311. inherits(EventSourceReceiver, EventEmitter);
  2312. EventSourceReceiver.prototype.abort = function () {
  2313. debug('abort');
  2314. this._cleanup();
  2315. this._close('user');
  2316. };
  2317. EventSourceReceiver.prototype._cleanup = function () {
  2318. debug('cleanup');
  2319. var es = this.es;
  2320. if (es) {
  2321. es.onmessage = es.onerror = null;
  2322. es.close();
  2323. this.es = null;
  2324. }
  2325. };
  2326. EventSourceReceiver.prototype._close = function (reason) {
  2327. debug('close', reason);
  2328. var self = this;
  2329. // Safari and chrome < 15 crash if we close window before
  2330. // waiting for ES cleanup. See:
  2331. // https://code.google.com/p/chromium/issues/detail?id=89155
  2332. setTimeout(function () {
  2333. self.emit('close', null, reason);
  2334. self.removeAllListeners();
  2335. }, 200);
  2336. };
  2337. module.exports = EventSourceReceiver;
  2338. /***/ }),
  2339. /***/ "./node_modules/sockjs-client/lib/transport/receiver/htmlfile.js":
  2340. /*!***********************************************************************!*\
  2341. !*** ./node_modules/sockjs-client/lib/transport/receiver/htmlfile.js ***!
  2342. \***********************************************************************/
  2343. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2344. "use strict";
  2345. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2346. iframeUtils = __webpack_require__(/*! ../../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js"),
  2347. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  2348. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  2349. random = __webpack_require__(/*! ../../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js");
  2350. var debug = function debug() {};
  2351. if (true) {
  2352. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:receiver:htmlfile');
  2353. }
  2354. function HtmlfileReceiver(url) {
  2355. debug(url);
  2356. EventEmitter.call(this);
  2357. var self = this;
  2358. iframeUtils.polluteGlobalNamespace();
  2359. this.id = 'a' + random.string(6);
  2360. url = urlUtils.addQuery(url, 'c=' + decodeURIComponent(iframeUtils.WPrefix + '.' + this.id));
  2361. debug('using htmlfile', HtmlfileReceiver.htmlfileEnabled);
  2362. var constructFunc = HtmlfileReceiver.htmlfileEnabled ? iframeUtils.createHtmlfile : iframeUtils.createIframe;
  2363. __webpack_require__.g[iframeUtils.WPrefix][this.id] = {
  2364. start: function start() {
  2365. debug('start');
  2366. self.iframeObj.loaded();
  2367. },
  2368. message: function message(data) {
  2369. debug('message', data);
  2370. self.emit('message', data);
  2371. },
  2372. stop: function stop() {
  2373. debug('stop');
  2374. self._cleanup();
  2375. self._close('network');
  2376. }
  2377. };
  2378. this.iframeObj = constructFunc(url, function () {
  2379. debug('callback');
  2380. self._cleanup();
  2381. self._close('permanent');
  2382. });
  2383. }
  2384. inherits(HtmlfileReceiver, EventEmitter);
  2385. HtmlfileReceiver.prototype.abort = function () {
  2386. debug('abort');
  2387. this._cleanup();
  2388. this._close('user');
  2389. };
  2390. HtmlfileReceiver.prototype._cleanup = function () {
  2391. debug('_cleanup');
  2392. if (this.iframeObj) {
  2393. this.iframeObj.cleanup();
  2394. this.iframeObj = null;
  2395. }
  2396. delete __webpack_require__.g[iframeUtils.WPrefix][this.id];
  2397. };
  2398. HtmlfileReceiver.prototype._close = function (reason) {
  2399. debug('_close', reason);
  2400. this.emit('close', null, reason);
  2401. this.removeAllListeners();
  2402. };
  2403. HtmlfileReceiver.htmlfileEnabled = false;
  2404. // obfuscate to avoid firewalls
  2405. var axo = ['Active'].concat('Object').join('X');
  2406. if (axo in __webpack_require__.g) {
  2407. try {
  2408. HtmlfileReceiver.htmlfileEnabled = !!new __webpack_require__.g[axo]('htmlfile');
  2409. } catch (x) {
  2410. // intentionally empty
  2411. }
  2412. }
  2413. HtmlfileReceiver.enabled = HtmlfileReceiver.htmlfileEnabled || iframeUtils.iframeEnabled;
  2414. module.exports = HtmlfileReceiver;
  2415. /***/ }),
  2416. /***/ "./node_modules/sockjs-client/lib/transport/receiver/jsonp.js":
  2417. /*!********************************************************************!*\
  2418. !*** ./node_modules/sockjs-client/lib/transport/receiver/jsonp.js ***!
  2419. \********************************************************************/
  2420. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2421. "use strict";
  2422. var utils = __webpack_require__(/*! ../../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js"),
  2423. random = __webpack_require__(/*! ../../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js"),
  2424. browser = __webpack_require__(/*! ../../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js"),
  2425. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  2426. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2427. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter);
  2428. var debug = function debug() {};
  2429. if (true) {
  2430. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:receiver:jsonp');
  2431. }
  2432. function JsonpReceiver(url) {
  2433. debug(url);
  2434. var self = this;
  2435. EventEmitter.call(this);
  2436. utils.polluteGlobalNamespace();
  2437. this.id = 'a' + random.string(6);
  2438. var urlWithId = urlUtils.addQuery(url, 'c=' + encodeURIComponent(utils.WPrefix + '.' + this.id));
  2439. __webpack_require__.g[utils.WPrefix][this.id] = this._callback.bind(this);
  2440. this._createScript(urlWithId);
  2441. // Fallback mostly for Konqueror - stupid timer, 35 seconds shall be plenty.
  2442. this.timeoutId = setTimeout(function () {
  2443. debug('timeout');
  2444. self._abort(new Error('JSONP script loaded abnormally (timeout)'));
  2445. }, JsonpReceiver.timeout);
  2446. }
  2447. inherits(JsonpReceiver, EventEmitter);
  2448. JsonpReceiver.prototype.abort = function () {
  2449. debug('abort');
  2450. if (__webpack_require__.g[utils.WPrefix][this.id]) {
  2451. var err = new Error('JSONP user aborted read');
  2452. err.code = 1000;
  2453. this._abort(err);
  2454. }
  2455. };
  2456. JsonpReceiver.timeout = 35000;
  2457. JsonpReceiver.scriptErrorTimeout = 1000;
  2458. JsonpReceiver.prototype._callback = function (data) {
  2459. debug('_callback', data);
  2460. this._cleanup();
  2461. if (this.aborting) {
  2462. return;
  2463. }
  2464. if (data) {
  2465. debug('message', data);
  2466. this.emit('message', data);
  2467. }
  2468. this.emit('close', null, 'network');
  2469. this.removeAllListeners();
  2470. };
  2471. JsonpReceiver.prototype._abort = function (err) {
  2472. debug('_abort', err);
  2473. this._cleanup();
  2474. this.aborting = true;
  2475. this.emit('close', err.code, err.message);
  2476. this.removeAllListeners();
  2477. };
  2478. JsonpReceiver.prototype._cleanup = function () {
  2479. debug('_cleanup');
  2480. clearTimeout(this.timeoutId);
  2481. if (this.script2) {
  2482. this.script2.parentNode.removeChild(this.script2);
  2483. this.script2 = null;
  2484. }
  2485. if (this.script) {
  2486. var script = this.script;
  2487. // Unfortunately, you can't really abort script loading of
  2488. // the script.
  2489. script.parentNode.removeChild(script);
  2490. script.onreadystatechange = script.onerror = script.onload = script.onclick = null;
  2491. this.script = null;
  2492. }
  2493. delete __webpack_require__.g[utils.WPrefix][this.id];
  2494. };
  2495. JsonpReceiver.prototype._scriptError = function () {
  2496. debug('_scriptError');
  2497. var self = this;
  2498. if (this.errorTimer) {
  2499. return;
  2500. }
  2501. this.errorTimer = setTimeout(function () {
  2502. if (!self.loadedOkay) {
  2503. self._abort(new Error('JSONP script loaded abnormally (onerror)'));
  2504. }
  2505. }, JsonpReceiver.scriptErrorTimeout);
  2506. };
  2507. JsonpReceiver.prototype._createScript = function (url) {
  2508. debug('_createScript', url);
  2509. var self = this;
  2510. var script = this.script = __webpack_require__.g.document.createElement('script');
  2511. var script2; // Opera synchronous load trick.
  2512. script.id = 'a' + random.string(8);
  2513. script.src = url;
  2514. script.type = 'text/javascript';
  2515. script.charset = 'UTF-8';
  2516. script.onerror = this._scriptError.bind(this);
  2517. script.onload = function () {
  2518. debug('onload');
  2519. self._abort(new Error('JSONP script loaded abnormally (onload)'));
  2520. };
  2521. // IE9 fires 'error' event after onreadystatechange or before, in random order.
  2522. // Use loadedOkay to determine if actually errored
  2523. script.onreadystatechange = function () {
  2524. debug('onreadystatechange', script.readyState);
  2525. if (/loaded|closed/.test(script.readyState)) {
  2526. if (script && script.htmlFor && script.onclick) {
  2527. self.loadedOkay = true;
  2528. try {
  2529. // In IE, actually execute the script.
  2530. script.onclick();
  2531. } catch (x) {
  2532. // intentionally empty
  2533. }
  2534. }
  2535. if (script) {
  2536. self._abort(new Error('JSONP script loaded abnormally (onreadystatechange)'));
  2537. }
  2538. }
  2539. };
  2540. // IE: event/htmlFor/onclick trick.
  2541. // One can't rely on proper order for onreadystatechange. In order to
  2542. // make sure, set a 'htmlFor' and 'event' properties, so that
  2543. // script code will be installed as 'onclick' handler for the
  2544. // script object. Later, onreadystatechange, manually execute this
  2545. // code. FF and Chrome doesn't work with 'event' and 'htmlFor'
  2546. // set. For reference see:
  2547. // http://jaubourg.net/2010/07/loading-script-as-onclick-handler-of.html
  2548. // Also, read on that about script ordering:
  2549. // http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order
  2550. if (typeof script.async === 'undefined' && __webpack_require__.g.document.attachEvent) {
  2551. // According to mozilla docs, in recent browsers script.async defaults
  2552. // to 'true', so we may use it to detect a good browser:
  2553. // https://developer.mozilla.org/en/HTML/Element/script
  2554. if (!browser.isOpera()) {
  2555. // Naively assume we're in IE
  2556. try {
  2557. script.htmlFor = script.id;
  2558. script.event = 'onclick';
  2559. } catch (x) {
  2560. // intentionally empty
  2561. }
  2562. script.async = true;
  2563. } else {
  2564. // Opera, second sync script hack
  2565. script2 = this.script2 = __webpack_require__.g.document.createElement('script');
  2566. script2.text = "try{var a = document.getElementById('" + script.id + "'); if(a)a.onerror();}catch(x){};";
  2567. script.async = script2.async = false;
  2568. }
  2569. }
  2570. if (typeof script.async !== 'undefined') {
  2571. script.async = true;
  2572. }
  2573. var head = __webpack_require__.g.document.getElementsByTagName('head')[0];
  2574. head.insertBefore(script, head.firstChild);
  2575. if (script2) {
  2576. head.insertBefore(script2, head.firstChild);
  2577. }
  2578. };
  2579. module.exports = JsonpReceiver;
  2580. /***/ }),
  2581. /***/ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js":
  2582. /*!******************************************************************!*\
  2583. !*** ./node_modules/sockjs-client/lib/transport/receiver/xhr.js ***!
  2584. \******************************************************************/
  2585. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2586. "use strict";
  2587. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2588. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter);
  2589. var debug = function debug() {};
  2590. if (true) {
  2591. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:receiver:xhr');
  2592. }
  2593. function XhrReceiver(url, AjaxObject) {
  2594. debug(url);
  2595. EventEmitter.call(this);
  2596. var self = this;
  2597. this.bufferPosition = 0;
  2598. this.xo = new AjaxObject('POST', url, null);
  2599. this.xo.on('chunk', this._chunkHandler.bind(this));
  2600. this.xo.once('finish', function (status, text) {
  2601. debug('finish', status, text);
  2602. self._chunkHandler(status, text);
  2603. self.xo = null;
  2604. var reason = status === 200 ? 'network' : 'permanent';
  2605. debug('close', reason);
  2606. self.emit('close', null, reason);
  2607. self._cleanup();
  2608. });
  2609. }
  2610. inherits(XhrReceiver, EventEmitter);
  2611. XhrReceiver.prototype._chunkHandler = function (status, text) {
  2612. debug('_chunkHandler', status);
  2613. if (status !== 200 || !text) {
  2614. return;
  2615. }
  2616. for (var idx = -1;; this.bufferPosition += idx + 1) {
  2617. var buf = text.slice(this.bufferPosition);
  2618. idx = buf.indexOf('\n');
  2619. if (idx === -1) {
  2620. break;
  2621. }
  2622. var msg = buf.slice(0, idx);
  2623. if (msg) {
  2624. debug('message', msg);
  2625. this.emit('message', msg);
  2626. }
  2627. }
  2628. };
  2629. XhrReceiver.prototype._cleanup = function () {
  2630. debug('_cleanup');
  2631. this.removeAllListeners();
  2632. };
  2633. XhrReceiver.prototype.abort = function () {
  2634. debug('abort');
  2635. if (this.xo) {
  2636. this.xo.close();
  2637. debug('close');
  2638. this.emit('close', null, 'user');
  2639. this.xo = null;
  2640. }
  2641. this._cleanup();
  2642. };
  2643. module.exports = XhrReceiver;
  2644. /***/ }),
  2645. /***/ "./node_modules/sockjs-client/lib/transport/sender/jsonp.js":
  2646. /*!******************************************************************!*\
  2647. !*** ./node_modules/sockjs-client/lib/transport/sender/jsonp.js ***!
  2648. \******************************************************************/
  2649. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2650. "use strict";
  2651. var random = __webpack_require__(/*! ../../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js"),
  2652. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js");
  2653. var debug = function debug() {};
  2654. if (true) {
  2655. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:sender:jsonp');
  2656. }
  2657. var form, area;
  2658. function createIframe(id) {
  2659. debug('createIframe', id);
  2660. try {
  2661. // ie6 dynamic iframes with target="" support (thanks Chris Lambacher)
  2662. return __webpack_require__.g.document.createElement('<iframe name="' + id + '">');
  2663. } catch (x) {
  2664. var iframe = __webpack_require__.g.document.createElement('iframe');
  2665. iframe.name = id;
  2666. return iframe;
  2667. }
  2668. }
  2669. function createForm() {
  2670. debug('createForm');
  2671. form = __webpack_require__.g.document.createElement('form');
  2672. form.style.display = 'none';
  2673. form.style.position = 'absolute';
  2674. form.method = 'POST';
  2675. form.enctype = 'application/x-www-form-urlencoded';
  2676. form.acceptCharset = 'UTF-8';
  2677. area = __webpack_require__.g.document.createElement('textarea');
  2678. area.name = 'd';
  2679. form.appendChild(area);
  2680. __webpack_require__.g.document.body.appendChild(form);
  2681. }
  2682. module.exports = function (url, payload, callback) {
  2683. debug(url, payload);
  2684. if (!form) {
  2685. createForm();
  2686. }
  2687. var id = 'a' + random.string(8);
  2688. form.target = id;
  2689. form.action = urlUtils.addQuery(urlUtils.addPath(url, '/jsonp_send'), 'i=' + id);
  2690. var iframe = createIframe(id);
  2691. iframe.id = id;
  2692. iframe.style.display = 'none';
  2693. form.appendChild(iframe);
  2694. try {
  2695. area.value = payload;
  2696. } catch (e) {
  2697. // seriously broken browsers get here
  2698. }
  2699. form.submit();
  2700. var completed = function completed(err) {
  2701. debug('completed', id, err);
  2702. if (!iframe.onerror) {
  2703. return;
  2704. }
  2705. iframe.onreadystatechange = iframe.onerror = iframe.onload = null;
  2706. // Opera mini doesn't like if we GC iframe
  2707. // immediately, thus this timeout.
  2708. setTimeout(function () {
  2709. debug('cleaning up', id);
  2710. iframe.parentNode.removeChild(iframe);
  2711. iframe = null;
  2712. }, 500);
  2713. area.value = '';
  2714. // It is not possible to detect if the iframe succeeded or
  2715. // failed to submit our form.
  2716. callback(err);
  2717. };
  2718. iframe.onerror = function () {
  2719. debug('onerror', id);
  2720. completed();
  2721. };
  2722. iframe.onload = function () {
  2723. debug('onload', id);
  2724. completed();
  2725. };
  2726. iframe.onreadystatechange = function (e) {
  2727. debug('onreadystatechange', id, iframe.readyState, e);
  2728. if (iframe.readyState === 'complete') {
  2729. completed();
  2730. }
  2731. };
  2732. return function () {
  2733. debug('aborted', id);
  2734. completed(new Error('Aborted'));
  2735. };
  2736. };
  2737. /***/ }),
  2738. /***/ "./node_modules/sockjs-client/lib/transport/sender/xdr.js":
  2739. /*!****************************************************************!*\
  2740. !*** ./node_modules/sockjs-client/lib/transport/sender/xdr.js ***!
  2741. \****************************************************************/
  2742. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2743. "use strict";
  2744. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  2745. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2746. eventUtils = __webpack_require__(/*! ../../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  2747. browser = __webpack_require__(/*! ../../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js"),
  2748. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js");
  2749. var debug = function debug() {};
  2750. if (true) {
  2751. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:sender:xdr');
  2752. }
  2753. // References:
  2754. // http://ajaxian.com/archives/100-line-ajax-wrapper
  2755. // http://msdn.microsoft.com/en-us/library/cc288060(v=VS.85).aspx
  2756. function XDRObject(method, url, payload) {
  2757. debug(method, url);
  2758. var self = this;
  2759. EventEmitter.call(this);
  2760. setTimeout(function () {
  2761. self._start(method, url, payload);
  2762. }, 0);
  2763. }
  2764. inherits(XDRObject, EventEmitter);
  2765. XDRObject.prototype._start = function (method, url, payload) {
  2766. debug('_start');
  2767. var self = this;
  2768. var xdr = new __webpack_require__.g.XDomainRequest();
  2769. // IE caches even POSTs
  2770. url = urlUtils.addQuery(url, 't=' + +new Date());
  2771. xdr.onerror = function () {
  2772. debug('onerror');
  2773. self._error();
  2774. };
  2775. xdr.ontimeout = function () {
  2776. debug('ontimeout');
  2777. self._error();
  2778. };
  2779. xdr.onprogress = function () {
  2780. debug('progress', xdr.responseText);
  2781. self.emit('chunk', 200, xdr.responseText);
  2782. };
  2783. xdr.onload = function () {
  2784. debug('load');
  2785. self.emit('finish', 200, xdr.responseText);
  2786. self._cleanup(false);
  2787. };
  2788. this.xdr = xdr;
  2789. this.unloadRef = eventUtils.unloadAdd(function () {
  2790. self._cleanup(true);
  2791. });
  2792. try {
  2793. // Fails with AccessDenied if port number is bogus
  2794. this.xdr.open(method, url);
  2795. if (this.timeout) {
  2796. this.xdr.timeout = this.timeout;
  2797. }
  2798. this.xdr.send(payload);
  2799. } catch (x) {
  2800. this._error();
  2801. }
  2802. };
  2803. XDRObject.prototype._error = function () {
  2804. this.emit('finish', 0, '');
  2805. this._cleanup(false);
  2806. };
  2807. XDRObject.prototype._cleanup = function (abort) {
  2808. debug('cleanup', abort);
  2809. if (!this.xdr) {
  2810. return;
  2811. }
  2812. this.removeAllListeners();
  2813. eventUtils.unloadDel(this.unloadRef);
  2814. this.xdr.ontimeout = this.xdr.onerror = this.xdr.onprogress = this.xdr.onload = null;
  2815. if (abort) {
  2816. try {
  2817. this.xdr.abort();
  2818. } catch (x) {
  2819. // intentionally empty
  2820. }
  2821. }
  2822. this.unloadRef = this.xdr = null;
  2823. };
  2824. XDRObject.prototype.close = function () {
  2825. debug('close');
  2826. this._cleanup(true);
  2827. };
  2828. // IE 8/9 if the request target uses the same scheme - #79
  2829. XDRObject.enabled = !!(__webpack_require__.g.XDomainRequest && browser.hasDomain());
  2830. module.exports = XDRObject;
  2831. /***/ }),
  2832. /***/ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js":
  2833. /*!*********************************************************************!*\
  2834. !*** ./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js ***!
  2835. \*********************************************************************/
  2836. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2837. "use strict";
  2838. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2839. XhrDriver = __webpack_require__(/*! ../driver/xhr */ "./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js");
  2840. function XHRCorsObject(method, url, payload, opts) {
  2841. XhrDriver.call(this, method, url, payload, opts);
  2842. }
  2843. inherits(XHRCorsObject, XhrDriver);
  2844. XHRCorsObject.enabled = XhrDriver.enabled && XhrDriver.supportsCORS;
  2845. module.exports = XHRCorsObject;
  2846. /***/ }),
  2847. /***/ "./node_modules/sockjs-client/lib/transport/sender/xhr-fake.js":
  2848. /*!*********************************************************************!*\
  2849. !*** ./node_modules/sockjs-client/lib/transport/sender/xhr-fake.js ***!
  2850. \*********************************************************************/
  2851. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2852. "use strict";
  2853. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  2854. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
  2855. function XHRFake( /* method, url, payload, opts */
  2856. ) {
  2857. var self = this;
  2858. EventEmitter.call(this);
  2859. this.to = setTimeout(function () {
  2860. self.emit('finish', 200, '{}');
  2861. }, XHRFake.timeout);
  2862. }
  2863. inherits(XHRFake, EventEmitter);
  2864. XHRFake.prototype.close = function () {
  2865. clearTimeout(this.to);
  2866. };
  2867. XHRFake.timeout = 2000;
  2868. module.exports = XHRFake;
  2869. /***/ }),
  2870. /***/ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js":
  2871. /*!**********************************************************************!*\
  2872. !*** ./node_modules/sockjs-client/lib/transport/sender/xhr-local.js ***!
  2873. \**********************************************************************/
  2874. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2875. "use strict";
  2876. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2877. XhrDriver = __webpack_require__(/*! ../driver/xhr */ "./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js");
  2878. function XHRLocalObject(method, url, payload /*, opts */) {
  2879. XhrDriver.call(this, method, url, payload, {
  2880. noCredentials: true
  2881. });
  2882. }
  2883. inherits(XHRLocalObject, XhrDriver);
  2884. XHRLocalObject.enabled = XhrDriver.enabled;
  2885. module.exports = XHRLocalObject;
  2886. /***/ }),
  2887. /***/ "./node_modules/sockjs-client/lib/transport/websocket.js":
  2888. /*!***************************************************************!*\
  2889. !*** ./node_modules/sockjs-client/lib/transport/websocket.js ***!
  2890. \***************************************************************/
  2891. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2892. "use strict";
  2893. var utils = __webpack_require__(/*! ../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  2894. urlUtils = __webpack_require__(/*! ../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  2895. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2896. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  2897. WebsocketDriver = __webpack_require__(/*! ./driver/websocket */ "./node_modules/sockjs-client/lib/transport/browser/websocket.js");
  2898. var debug = function debug() {};
  2899. if (true) {
  2900. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:websocket');
  2901. }
  2902. function WebSocketTransport(transUrl, ignore, options) {
  2903. if (!WebSocketTransport.enabled()) {
  2904. throw new Error('Transport created when disabled');
  2905. }
  2906. EventEmitter.call(this);
  2907. debug('constructor', transUrl);
  2908. var self = this;
  2909. var url = urlUtils.addPath(transUrl, '/websocket');
  2910. if (url.slice(0, 5) === 'https') {
  2911. url = 'wss' + url.slice(5);
  2912. } else {
  2913. url = 'ws' + url.slice(4);
  2914. }
  2915. this.url = url;
  2916. this.ws = new WebsocketDriver(this.url, [], options);
  2917. this.ws.onmessage = function (e) {
  2918. debug('message event', e.data);
  2919. self.emit('message', e.data);
  2920. };
  2921. // Firefox has an interesting bug. If a websocket connection is
  2922. // created after onunload, it stays alive even when user
  2923. // navigates away from the page. In such situation let's lie -
  2924. // let's not open the ws connection at all. See:
  2925. // https://github.com/sockjs/sockjs-client/issues/28
  2926. // https://bugzilla.mozilla.org/show_bug.cgi?id=696085
  2927. this.unloadRef = utils.unloadAdd(function () {
  2928. debug('unload');
  2929. self.ws.close();
  2930. });
  2931. this.ws.onclose = function (e) {
  2932. debug('close event', e.code, e.reason);
  2933. self.emit('close', e.code, e.reason);
  2934. self._cleanup();
  2935. };
  2936. this.ws.onerror = function (e) {
  2937. debug('error event', e);
  2938. self.emit('close', 1006, 'WebSocket connection broken');
  2939. self._cleanup();
  2940. };
  2941. }
  2942. inherits(WebSocketTransport, EventEmitter);
  2943. WebSocketTransport.prototype.send = function (data) {
  2944. var msg = '[' + data + ']';
  2945. debug('send', msg);
  2946. this.ws.send(msg);
  2947. };
  2948. WebSocketTransport.prototype.close = function () {
  2949. debug('close');
  2950. var ws = this.ws;
  2951. this._cleanup();
  2952. if (ws) {
  2953. ws.close();
  2954. }
  2955. };
  2956. WebSocketTransport.prototype._cleanup = function () {
  2957. debug('_cleanup');
  2958. var ws = this.ws;
  2959. if (ws) {
  2960. ws.onmessage = ws.onclose = ws.onerror = null;
  2961. }
  2962. utils.unloadDel(this.unloadRef);
  2963. this.unloadRef = this.ws = null;
  2964. this.removeAllListeners();
  2965. };
  2966. WebSocketTransport.enabled = function () {
  2967. debug('enabled');
  2968. return !!WebsocketDriver;
  2969. };
  2970. WebSocketTransport.transportName = 'websocket';
  2971. // In theory, ws should require 1 round trip. But in chrome, this is
  2972. // not very stable over SSL. Most likely a ws connection requires a
  2973. // separate SSL connection, in which case 2 round trips are an
  2974. // absolute minumum.
  2975. WebSocketTransport.roundTrips = 2;
  2976. module.exports = WebSocketTransport;
  2977. /***/ }),
  2978. /***/ "./node_modules/sockjs-client/lib/transport/xdr-polling.js":
  2979. /*!*****************************************************************!*\
  2980. !*** ./node_modules/sockjs-client/lib/transport/xdr-polling.js ***!
  2981. \*****************************************************************/
  2982. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2983. "use strict";
  2984. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2985. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js"),
  2986. XdrStreamingTransport = __webpack_require__(/*! ./xdr-streaming */ "./node_modules/sockjs-client/lib/transport/xdr-streaming.js"),
  2987. XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js"),
  2988. XDRObject = __webpack_require__(/*! ./sender/xdr */ "./node_modules/sockjs-client/lib/transport/sender/xdr.js");
  2989. function XdrPollingTransport(transUrl) {
  2990. if (!XDRObject.enabled) {
  2991. throw new Error('Transport created when disabled');
  2992. }
  2993. AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XDRObject);
  2994. }
  2995. inherits(XdrPollingTransport, AjaxBasedTransport);
  2996. XdrPollingTransport.enabled = XdrStreamingTransport.enabled;
  2997. XdrPollingTransport.transportName = 'xdr-polling';
  2998. XdrPollingTransport.roundTrips = 2; // preflight, ajax
  2999. module.exports = XdrPollingTransport;
  3000. /***/ }),
  3001. /***/ "./node_modules/sockjs-client/lib/transport/xdr-streaming.js":
  3002. /*!*******************************************************************!*\
  3003. !*** ./node_modules/sockjs-client/lib/transport/xdr-streaming.js ***!
  3004. \*******************************************************************/
  3005. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3006. "use strict";
  3007. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  3008. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js"),
  3009. XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js"),
  3010. XDRObject = __webpack_require__(/*! ./sender/xdr */ "./node_modules/sockjs-client/lib/transport/sender/xdr.js");
  3011. // According to:
  3012. // http://stackoverflow.com/questions/1641507/detect-browser-support-for-cross-domain-xmlhttprequests
  3013. // http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/
  3014. function XdrStreamingTransport(transUrl) {
  3015. if (!XDRObject.enabled) {
  3016. throw new Error('Transport created when disabled');
  3017. }
  3018. AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XDRObject);
  3019. }
  3020. inherits(XdrStreamingTransport, AjaxBasedTransport);
  3021. XdrStreamingTransport.enabled = function (info) {
  3022. if (info.cookie_needed || info.nullOrigin) {
  3023. return false;
  3024. }
  3025. return XDRObject.enabled && info.sameScheme;
  3026. };
  3027. XdrStreamingTransport.transportName = 'xdr-streaming';
  3028. XdrStreamingTransport.roundTrips = 2; // preflight, ajax
  3029. module.exports = XdrStreamingTransport;
  3030. /***/ }),
  3031. /***/ "./node_modules/sockjs-client/lib/transport/xhr-polling.js":
  3032. /*!*****************************************************************!*\
  3033. !*** ./node_modules/sockjs-client/lib/transport/xhr-polling.js ***!
  3034. \*****************************************************************/
  3035. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3036. "use strict";
  3037. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  3038. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js"),
  3039. XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js"),
  3040. XHRCorsObject = __webpack_require__(/*! ./sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js"),
  3041. XHRLocalObject = __webpack_require__(/*! ./sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js");
  3042. function XhrPollingTransport(transUrl) {
  3043. if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {
  3044. throw new Error('Transport created when disabled');
  3045. }
  3046. AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XHRCorsObject);
  3047. }
  3048. inherits(XhrPollingTransport, AjaxBasedTransport);
  3049. XhrPollingTransport.enabled = function (info) {
  3050. if (info.nullOrigin) {
  3051. return false;
  3052. }
  3053. if (XHRLocalObject.enabled && info.sameOrigin) {
  3054. return true;
  3055. }
  3056. return XHRCorsObject.enabled;
  3057. };
  3058. XhrPollingTransport.transportName = 'xhr-polling';
  3059. XhrPollingTransport.roundTrips = 2; // preflight, ajax
  3060. module.exports = XhrPollingTransport;
  3061. /***/ }),
  3062. /***/ "./node_modules/sockjs-client/lib/transport/xhr-streaming.js":
  3063. /*!*******************************************************************!*\
  3064. !*** ./node_modules/sockjs-client/lib/transport/xhr-streaming.js ***!
  3065. \*******************************************************************/
  3066. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3067. "use strict";
  3068. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  3069. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js"),
  3070. XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js"),
  3071. XHRCorsObject = __webpack_require__(/*! ./sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js"),
  3072. XHRLocalObject = __webpack_require__(/*! ./sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js"),
  3073. browser = __webpack_require__(/*! ../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js");
  3074. function XhrStreamingTransport(transUrl) {
  3075. if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {
  3076. throw new Error('Transport created when disabled');
  3077. }
  3078. AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XHRCorsObject);
  3079. }
  3080. inherits(XhrStreamingTransport, AjaxBasedTransport);
  3081. XhrStreamingTransport.enabled = function (info) {
  3082. if (info.nullOrigin) {
  3083. return false;
  3084. }
  3085. // Opera doesn't support xhr-streaming #60
  3086. // But it might be able to #92
  3087. if (browser.isOpera()) {
  3088. return false;
  3089. }
  3090. return XHRCorsObject.enabled;
  3091. };
  3092. XhrStreamingTransport.transportName = 'xhr-streaming';
  3093. XhrStreamingTransport.roundTrips = 2; // preflight, ajax
  3094. // Safari gets confused when a streaming ajax request is started
  3095. // before onload. This causes the load indicator to spin indefinetely.
  3096. // Only require body when used in a browser
  3097. XhrStreamingTransport.needBody = !!__webpack_require__.g.document;
  3098. module.exports = XhrStreamingTransport;
  3099. /***/ }),
  3100. /***/ "./node_modules/sockjs-client/lib/utils/browser-crypto.js":
  3101. /*!****************************************************************!*\
  3102. !*** ./node_modules/sockjs-client/lib/utils/browser-crypto.js ***!
  3103. \****************************************************************/
  3104. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3105. "use strict";
  3106. if (__webpack_require__.g.crypto && __webpack_require__.g.crypto.getRandomValues) {
  3107. module.exports.randomBytes = function (length) {
  3108. var bytes = new Uint8Array(length);
  3109. __webpack_require__.g.crypto.getRandomValues(bytes);
  3110. return bytes;
  3111. };
  3112. } else {
  3113. module.exports.randomBytes = function (length) {
  3114. var bytes = new Array(length);
  3115. for (var i = 0; i < length; i++) {
  3116. bytes[i] = Math.floor(Math.random() * 256);
  3117. }
  3118. return bytes;
  3119. };
  3120. }
  3121. /***/ }),
  3122. /***/ "./node_modules/sockjs-client/lib/utils/browser.js":
  3123. /*!*********************************************************!*\
  3124. !*** ./node_modules/sockjs-client/lib/utils/browser.js ***!
  3125. \*********************************************************/
  3126. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3127. "use strict";
  3128. module.exports = {
  3129. isOpera: function isOpera() {
  3130. return __webpack_require__.g.navigator && /opera/i.test(__webpack_require__.g.navigator.userAgent);
  3131. },
  3132. isKonqueror: function isKonqueror() {
  3133. return __webpack_require__.g.navigator && /konqueror/i.test(__webpack_require__.g.navigator.userAgent);
  3134. }
  3135. // #187 wrap document.domain in try/catch because of WP8 from file:///
  3136. ,
  3137. hasDomain: function hasDomain() {
  3138. // non-browser client always has a domain
  3139. if (!__webpack_require__.g.document) {
  3140. return true;
  3141. }
  3142. try {
  3143. return !!__webpack_require__.g.document.domain;
  3144. } catch (e) {
  3145. return false;
  3146. }
  3147. }
  3148. };
  3149. /***/ }),
  3150. /***/ "./node_modules/sockjs-client/lib/utils/escape.js":
  3151. /*!********************************************************!*\
  3152. !*** ./node_modules/sockjs-client/lib/utils/escape.js ***!
  3153. \********************************************************/
  3154. /***/ (function(module) {
  3155. "use strict";
  3156. // Some extra characters that Chrome gets wrong, and substitutes with
  3157. // something else on the wire.
  3158. // eslint-disable-next-line no-control-regex, no-misleading-character-class
  3159. var extraEscapable = /[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g,
  3160. extraLookup;
  3161. // This may be quite slow, so let's delay until user actually uses bad
  3162. // characters.
  3163. var unrollLookup = function unrollLookup(escapable) {
  3164. var i;
  3165. var unrolled = {};
  3166. var c = [];
  3167. for (i = 0; i < 65536; i++) {
  3168. c.push(String.fromCharCode(i));
  3169. }
  3170. escapable.lastIndex = 0;
  3171. c.join('').replace(escapable, function (a) {
  3172. unrolled[a] = "\\u" + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
  3173. return '';
  3174. });
  3175. escapable.lastIndex = 0;
  3176. return unrolled;
  3177. };
  3178. // Quote string, also taking care of unicode characters that browsers
  3179. // often break. Especially, take care of unicode surrogates:
  3180. // http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates
  3181. module.exports = {
  3182. quote: function quote(string) {
  3183. var quoted = JSON.stringify(string);
  3184. // In most cases this should be very fast and good enough.
  3185. extraEscapable.lastIndex = 0;
  3186. if (!extraEscapable.test(quoted)) {
  3187. return quoted;
  3188. }
  3189. if (!extraLookup) {
  3190. extraLookup = unrollLookup(extraEscapable);
  3191. }
  3192. return quoted.replace(extraEscapable, function (a) {
  3193. return extraLookup[a];
  3194. });
  3195. }
  3196. };
  3197. /***/ }),
  3198. /***/ "./node_modules/sockjs-client/lib/utils/event.js":
  3199. /*!*******************************************************!*\
  3200. !*** ./node_modules/sockjs-client/lib/utils/event.js ***!
  3201. \*******************************************************/
  3202. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3203. "use strict";
  3204. var random = __webpack_require__(/*! ./random */ "./node_modules/sockjs-client/lib/utils/random.js");
  3205. var onUnload = {},
  3206. afterUnload = false
  3207. // detect google chrome packaged apps because they don't allow the 'unload' event
  3208. ,
  3209. isChromePackagedApp = __webpack_require__.g.chrome && __webpack_require__.g.chrome.app && __webpack_require__.g.chrome.app.runtime;
  3210. module.exports = {
  3211. attachEvent: function attachEvent(event, listener) {
  3212. if (typeof __webpack_require__.g.addEventListener !== 'undefined') {
  3213. __webpack_require__.g.addEventListener(event, listener, false);
  3214. } else if (__webpack_require__.g.document && __webpack_require__.g.attachEvent) {
  3215. // IE quirks.
  3216. // According to: http://stevesouders.com/misc/test-postmessage.php
  3217. // the message gets delivered only to 'document', not 'window'.
  3218. __webpack_require__.g.document.attachEvent('on' + event, listener);
  3219. // I get 'window' for ie8.
  3220. __webpack_require__.g.attachEvent('on' + event, listener);
  3221. }
  3222. },
  3223. detachEvent: function detachEvent(event, listener) {
  3224. if (typeof __webpack_require__.g.addEventListener !== 'undefined') {
  3225. __webpack_require__.g.removeEventListener(event, listener, false);
  3226. } else if (__webpack_require__.g.document && __webpack_require__.g.detachEvent) {
  3227. __webpack_require__.g.document.detachEvent('on' + event, listener);
  3228. __webpack_require__.g.detachEvent('on' + event, listener);
  3229. }
  3230. },
  3231. unloadAdd: function unloadAdd(listener) {
  3232. if (isChromePackagedApp) {
  3233. return null;
  3234. }
  3235. var ref = random.string(8);
  3236. onUnload[ref] = listener;
  3237. if (afterUnload) {
  3238. setTimeout(this.triggerUnloadCallbacks, 0);
  3239. }
  3240. return ref;
  3241. },
  3242. unloadDel: function unloadDel(ref) {
  3243. if (ref in onUnload) {
  3244. delete onUnload[ref];
  3245. }
  3246. },
  3247. triggerUnloadCallbacks: function triggerUnloadCallbacks() {
  3248. for (var ref in onUnload) {
  3249. onUnload[ref]();
  3250. delete onUnload[ref];
  3251. }
  3252. }
  3253. };
  3254. var unloadTriggered = function unloadTriggered() {
  3255. if (afterUnload) {
  3256. return;
  3257. }
  3258. afterUnload = true;
  3259. module.exports.triggerUnloadCallbacks();
  3260. };
  3261. // 'unload' alone is not reliable in opera within an iframe, but we
  3262. // can't use `beforeunload` as IE fires it on javascript: links.
  3263. if (!isChromePackagedApp) {
  3264. module.exports.attachEvent('unload', unloadTriggered);
  3265. }
  3266. /***/ }),
  3267. /***/ "./node_modules/sockjs-client/lib/utils/iframe.js":
  3268. /*!********************************************************!*\
  3269. !*** ./node_modules/sockjs-client/lib/utils/iframe.js ***!
  3270. \********************************************************/
  3271. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3272. "use strict";
  3273. var eventUtils = __webpack_require__(/*! ./event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  3274. browser = __webpack_require__(/*! ./browser */ "./node_modules/sockjs-client/lib/utils/browser.js");
  3275. var debug = function debug() {};
  3276. if (true) {
  3277. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:utils:iframe');
  3278. }
  3279. module.exports = {
  3280. WPrefix: '_jp',
  3281. currentWindowId: null,
  3282. polluteGlobalNamespace: function polluteGlobalNamespace() {
  3283. if (!(module.exports.WPrefix in __webpack_require__.g)) {
  3284. __webpack_require__.g[module.exports.WPrefix] = {};
  3285. }
  3286. },
  3287. postMessage: function postMessage(type, data) {
  3288. if (__webpack_require__.g.parent !== __webpack_require__.g) {
  3289. __webpack_require__.g.parent.postMessage(JSON.stringify({
  3290. windowId: module.exports.currentWindowId,
  3291. type: type,
  3292. data: data || ''
  3293. }), '*');
  3294. } else {
  3295. debug('Cannot postMessage, no parent window.', type, data);
  3296. }
  3297. },
  3298. createIframe: function createIframe(iframeUrl, errorCallback) {
  3299. var iframe = __webpack_require__.g.document.createElement('iframe');
  3300. var tref, unloadRef;
  3301. var unattach = function unattach() {
  3302. debug('unattach');
  3303. clearTimeout(tref);
  3304. // Explorer had problems with that.
  3305. try {
  3306. iframe.onload = null;
  3307. } catch (x) {
  3308. // intentionally empty
  3309. }
  3310. iframe.onerror = null;
  3311. };
  3312. var cleanup = function cleanup() {
  3313. debug('cleanup');
  3314. if (iframe) {
  3315. unattach();
  3316. // This timeout makes chrome fire onbeforeunload event
  3317. // within iframe. Without the timeout it goes straight to
  3318. // onunload.
  3319. setTimeout(function () {
  3320. if (iframe) {
  3321. iframe.parentNode.removeChild(iframe);
  3322. }
  3323. iframe = null;
  3324. }, 0);
  3325. eventUtils.unloadDel(unloadRef);
  3326. }
  3327. };
  3328. var onerror = function onerror(err) {
  3329. debug('onerror', err);
  3330. if (iframe) {
  3331. cleanup();
  3332. errorCallback(err);
  3333. }
  3334. };
  3335. var post = function post(msg, origin) {
  3336. debug('post', msg, origin);
  3337. setTimeout(function () {
  3338. try {
  3339. // When the iframe is not loaded, IE raises an exception
  3340. // on 'contentWindow'.
  3341. if (iframe && iframe.contentWindow) {
  3342. iframe.contentWindow.postMessage(msg, origin);
  3343. }
  3344. } catch (x) {
  3345. // intentionally empty
  3346. }
  3347. }, 0);
  3348. };
  3349. iframe.src = iframeUrl;
  3350. iframe.style.display = 'none';
  3351. iframe.style.position = 'absolute';
  3352. iframe.onerror = function () {
  3353. onerror('onerror');
  3354. };
  3355. iframe.onload = function () {
  3356. debug('onload');
  3357. // `onload` is triggered before scripts on the iframe are
  3358. // executed. Give it few seconds to actually load stuff.
  3359. clearTimeout(tref);
  3360. tref = setTimeout(function () {
  3361. onerror('onload timeout');
  3362. }, 2000);
  3363. };
  3364. __webpack_require__.g.document.body.appendChild(iframe);
  3365. tref = setTimeout(function () {
  3366. onerror('timeout');
  3367. }, 15000);
  3368. unloadRef = eventUtils.unloadAdd(cleanup);
  3369. return {
  3370. post: post,
  3371. cleanup: cleanup,
  3372. loaded: unattach
  3373. };
  3374. }
  3375. /* eslint no-undef: "off", new-cap: "off" */,
  3376. createHtmlfile: function createHtmlfile(iframeUrl, errorCallback) {
  3377. var axo = ['Active'].concat('Object').join('X');
  3378. var doc = new __webpack_require__.g[axo]('htmlfile');
  3379. var tref, unloadRef;
  3380. var iframe;
  3381. var unattach = function unattach() {
  3382. clearTimeout(tref);
  3383. iframe.onerror = null;
  3384. };
  3385. var cleanup = function cleanup() {
  3386. if (doc) {
  3387. unattach();
  3388. eventUtils.unloadDel(unloadRef);
  3389. iframe.parentNode.removeChild(iframe);
  3390. iframe = doc = null;
  3391. CollectGarbage();
  3392. }
  3393. };
  3394. var onerror = function onerror(r) {
  3395. debug('onerror', r);
  3396. if (doc) {
  3397. cleanup();
  3398. errorCallback(r);
  3399. }
  3400. };
  3401. var post = function post(msg, origin) {
  3402. try {
  3403. // When the iframe is not loaded, IE raises an exception
  3404. // on 'contentWindow'.
  3405. setTimeout(function () {
  3406. if (iframe && iframe.contentWindow) {
  3407. iframe.contentWindow.postMessage(msg, origin);
  3408. }
  3409. }, 0);
  3410. } catch (x) {
  3411. // intentionally empty
  3412. }
  3413. };
  3414. doc.open();
  3415. doc.write('<html><s' + 'cript>' + 'document.domain="' + __webpack_require__.g.document.domain + '";' + '</s' + 'cript></html>');
  3416. doc.close();
  3417. doc.parentWindow[module.exports.WPrefix] = __webpack_require__.g[module.exports.WPrefix];
  3418. var c = doc.createElement('div');
  3419. doc.body.appendChild(c);
  3420. iframe = doc.createElement('iframe');
  3421. c.appendChild(iframe);
  3422. iframe.src = iframeUrl;
  3423. iframe.onerror = function () {
  3424. onerror('onerror');
  3425. };
  3426. tref = setTimeout(function () {
  3427. onerror('timeout');
  3428. }, 15000);
  3429. unloadRef = eventUtils.unloadAdd(cleanup);
  3430. return {
  3431. post: post,
  3432. cleanup: cleanup,
  3433. loaded: unattach
  3434. };
  3435. }
  3436. };
  3437. module.exports.iframeEnabled = false;
  3438. if (__webpack_require__.g.document) {
  3439. // postMessage misbehaves in konqueror 4.6.5 - the messages are delivered with
  3440. // huge delay, or not at all.
  3441. module.exports.iframeEnabled = (typeof __webpack_require__.g.postMessage === 'function' || typeof __webpack_require__.g.postMessage === 'object') && !browser.isKonqueror();
  3442. }
  3443. /***/ }),
  3444. /***/ "./node_modules/sockjs-client/lib/utils/log.js":
  3445. /*!*****************************************************!*\
  3446. !*** ./node_modules/sockjs-client/lib/utils/log.js ***!
  3447. \*****************************************************/
  3448. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3449. "use strict";
  3450. var logObject = {};
  3451. ['log', 'debug', 'warn'].forEach(function (level) {
  3452. var levelExists;
  3453. try {
  3454. levelExists = __webpack_require__.g.console && __webpack_require__.g.console[level] && __webpack_require__.g.console[level].apply;
  3455. } catch (e) {
  3456. // do nothing
  3457. }
  3458. logObject[level] = levelExists ? function () {
  3459. return __webpack_require__.g.console[level].apply(__webpack_require__.g.console, arguments);
  3460. } : level === 'log' ? function () {} : logObject.log;
  3461. });
  3462. module.exports = logObject;
  3463. /***/ }),
  3464. /***/ "./node_modules/sockjs-client/lib/utils/object.js":
  3465. /*!********************************************************!*\
  3466. !*** ./node_modules/sockjs-client/lib/utils/object.js ***!
  3467. \********************************************************/
  3468. /***/ (function(module) {
  3469. "use strict";
  3470. module.exports = {
  3471. isObject: function isObject(obj) {
  3472. var type = typeof obj;
  3473. return type === 'function' || type === 'object' && !!obj;
  3474. },
  3475. extend: function extend(obj) {
  3476. if (!this.isObject(obj)) {
  3477. return obj;
  3478. }
  3479. var source, prop;
  3480. for (var i = 1, length = arguments.length; i < length; i++) {
  3481. source = arguments[i];
  3482. for (prop in source) {
  3483. if (Object.prototype.hasOwnProperty.call(source, prop)) {
  3484. obj[prop] = source[prop];
  3485. }
  3486. }
  3487. }
  3488. return obj;
  3489. }
  3490. };
  3491. /***/ }),
  3492. /***/ "./node_modules/sockjs-client/lib/utils/random.js":
  3493. /*!********************************************************!*\
  3494. !*** ./node_modules/sockjs-client/lib/utils/random.js ***!
  3495. \********************************************************/
  3496. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3497. "use strict";
  3498. var crypto = __webpack_require__(/*! crypto */ "./node_modules/sockjs-client/lib/utils/browser-crypto.js");
  3499. // This string has length 32, a power of 2, so the modulus doesn't introduce a
  3500. // bias.
  3501. var _randomStringChars = 'abcdefghijklmnopqrstuvwxyz012345';
  3502. module.exports = {
  3503. string: function string(length) {
  3504. var max = _randomStringChars.length;
  3505. var bytes = crypto.randomBytes(length);
  3506. var ret = [];
  3507. for (var i = 0; i < length; i++) {
  3508. ret.push(_randomStringChars.substr(bytes[i] % max, 1));
  3509. }
  3510. return ret.join('');
  3511. },
  3512. number: function number(max) {
  3513. return Math.floor(Math.random() * max);
  3514. },
  3515. numberString: function numberString(max) {
  3516. var t = ('' + (max - 1)).length;
  3517. var p = new Array(t + 1).join('0');
  3518. return (p + this.number(max)).slice(-t);
  3519. }
  3520. };
  3521. /***/ }),
  3522. /***/ "./node_modules/sockjs-client/lib/utils/transport.js":
  3523. /*!***********************************************************!*\
  3524. !*** ./node_modules/sockjs-client/lib/utils/transport.js ***!
  3525. \***********************************************************/
  3526. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3527. "use strict";
  3528. var debug = function debug() {};
  3529. if (true) {
  3530. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:utils:transport');
  3531. }
  3532. module.exports = function (availableTransports) {
  3533. return {
  3534. filterToEnabled: function filterToEnabled(transportsWhitelist, info) {
  3535. var transports = {
  3536. main: [],
  3537. facade: []
  3538. };
  3539. if (!transportsWhitelist) {
  3540. transportsWhitelist = [];
  3541. } else if (typeof transportsWhitelist === 'string') {
  3542. transportsWhitelist = [transportsWhitelist];
  3543. }
  3544. availableTransports.forEach(function (trans) {
  3545. if (!trans) {
  3546. return;
  3547. }
  3548. if (trans.transportName === 'websocket' && info.websocket === false) {
  3549. debug('disabled from server', 'websocket');
  3550. return;
  3551. }
  3552. if (transportsWhitelist.length && transportsWhitelist.indexOf(trans.transportName) === -1) {
  3553. debug('not in whitelist', trans.transportName);
  3554. return;
  3555. }
  3556. if (trans.enabled(info)) {
  3557. debug('enabled', trans.transportName);
  3558. transports.main.push(trans);
  3559. if (trans.facadeTransport) {
  3560. transports.facade.push(trans.facadeTransport);
  3561. }
  3562. } else {
  3563. debug('disabled', trans.transportName);
  3564. }
  3565. });
  3566. return transports;
  3567. }
  3568. };
  3569. };
  3570. /***/ }),
  3571. /***/ "./node_modules/sockjs-client/lib/utils/url.js":
  3572. /*!*****************************************************!*\
  3573. !*** ./node_modules/sockjs-client/lib/utils/url.js ***!
  3574. \*****************************************************/
  3575. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3576. "use strict";
  3577. var URL = __webpack_require__(/*! url-parse */ "./node_modules/url-parse/index.js");
  3578. var debug = function debug() {};
  3579. if (true) {
  3580. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:utils:url');
  3581. }
  3582. module.exports = {
  3583. getOrigin: function getOrigin(url) {
  3584. if (!url) {
  3585. return null;
  3586. }
  3587. var p = new URL(url);
  3588. if (p.protocol === 'file:') {
  3589. return null;
  3590. }
  3591. var port = p.port;
  3592. if (!port) {
  3593. port = p.protocol === 'https:' ? '443' : '80';
  3594. }
  3595. return p.protocol + '//' + p.hostname + ':' + port;
  3596. },
  3597. isOriginEqual: function isOriginEqual(a, b) {
  3598. var res = this.getOrigin(a) === this.getOrigin(b);
  3599. debug('same', a, b, res);
  3600. return res;
  3601. },
  3602. isSchemeEqual: function isSchemeEqual(a, b) {
  3603. return a.split(':')[0] === b.split(':')[0];
  3604. },
  3605. addPath: function addPath(url, path) {
  3606. var qs = url.split('?');
  3607. return qs[0] + path + (qs[1] ? '?' + qs[1] : '');
  3608. },
  3609. addQuery: function addQuery(url, q) {
  3610. return url + (url.indexOf('?') === -1 ? '?' + q : '&' + q);
  3611. },
  3612. isLoopbackAddr: function isLoopbackAddr(addr) {
  3613. return /^127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || /^\[::1\]$/.test(addr);
  3614. }
  3615. };
  3616. /***/ }),
  3617. /***/ "./node_modules/sockjs-client/lib/version.js":
  3618. /*!***************************************************!*\
  3619. !*** ./node_modules/sockjs-client/lib/version.js ***!
  3620. \***************************************************/
  3621. /***/ (function(module) {
  3622. module.exports = '1.6.1';
  3623. /***/ }),
  3624. /***/ "./node_modules/sockjs-client/node_modules/debug/src/browser.js":
  3625. /*!**********************************************************************!*\
  3626. !*** ./node_modules/sockjs-client/node_modules/debug/src/browser.js ***!
  3627. \**********************************************************************/
  3628. /***/ (function(module, exports, __webpack_require__) {
  3629. "use strict";
  3630. function _typeof(obj) {
  3631. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  3632. _typeof = function _typeof(obj) {
  3633. return typeof obj;
  3634. };
  3635. } else {
  3636. _typeof = function _typeof(obj) {
  3637. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  3638. };
  3639. }
  3640. return _typeof(obj);
  3641. }
  3642. /* eslint-env browser */
  3643. /**
  3644. * This is the web browser implementation of `debug()`.
  3645. */
  3646. exports.log = log;
  3647. exports.formatArgs = formatArgs;
  3648. exports.save = save;
  3649. exports.load = load;
  3650. exports.useColors = useColors;
  3651. exports.storage = localstorage();
  3652. /**
  3653. * Colors.
  3654. */
  3655. exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
  3656. /**
  3657. * Currently only WebKit-based Web Inspectors, Firefox >= v31,
  3658. * and the Firebug extension (any Firefox version) are known
  3659. * to support "%c" CSS customizations.
  3660. *
  3661. * TODO: add a `localStorage` variable to explicitly enable/disable colors
  3662. */
  3663. // eslint-disable-next-line complexity
  3664. function useColors() {
  3665. // NB: In an Electron preload script, document will be defined but not fully
  3666. // initialized. Since we know we're in Chrome, we'll just detect this case
  3667. // explicitly
  3668. if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
  3669. return true;
  3670. } // Internet Explorer and Edge do not support colors.
  3671. if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
  3672. return false;
  3673. } // Is webkit? http://stackoverflow.com/a/16459606/376773
  3674. // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
  3675. return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||
  3676. // Is firebug? http://stackoverflow.com/a/398120/376773
  3677. typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||
  3678. // Is firefox >= v31?
  3679. // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
  3680. typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||
  3681. // Double check webkit in userAgent just in case we are in a worker
  3682. typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
  3683. }
  3684. /**
  3685. * Colorize log arguments if enabled.
  3686. *
  3687. * @api public
  3688. */
  3689. function formatArgs(args) {
  3690. args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
  3691. if (!this.useColors) {
  3692. return;
  3693. }
  3694. var c = 'color: ' + this.color;
  3695. args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
  3696. // arguments passed either before or after the %c, so we need to
  3697. // figure out the correct index to insert the CSS into
  3698. var index = 0;
  3699. var lastC = 0;
  3700. args[0].replace(/%[a-zA-Z%]/g, function (match) {
  3701. if (match === '%%') {
  3702. return;
  3703. }
  3704. index++;
  3705. if (match === '%c') {
  3706. // We only are interested in the *last* %c
  3707. // (the user may have provided their own)
  3708. lastC = index;
  3709. }
  3710. });
  3711. args.splice(lastC, 0, c);
  3712. }
  3713. /**
  3714. * Invokes `console.log()` when available.
  3715. * No-op when `console.log` is not a "function".
  3716. *
  3717. * @api public
  3718. */
  3719. function log() {
  3720. var _console;
  3721. // This hackery is required for IE8/9, where
  3722. // the `console.log` function doesn't have 'apply'
  3723. return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
  3724. }
  3725. /**
  3726. * Save `namespaces`.
  3727. *
  3728. * @param {String} namespaces
  3729. * @api private
  3730. */
  3731. function save(namespaces) {
  3732. try {
  3733. if (namespaces) {
  3734. exports.storage.setItem('debug', namespaces);
  3735. } else {
  3736. exports.storage.removeItem('debug');
  3737. }
  3738. } catch (error) {// Swallow
  3739. // XXX (@Qix-) should we be logging these?
  3740. }
  3741. }
  3742. /**
  3743. * Load `namespaces`.
  3744. *
  3745. * @return {String} returns the previously persisted debug modes
  3746. * @api private
  3747. */
  3748. function load() {
  3749. var r;
  3750. try {
  3751. r = exports.storage.getItem('debug');
  3752. } catch (error) {} // Swallow
  3753. // XXX (@Qix-) should we be logging these?
  3754. // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
  3755. if (!r && typeof process !== 'undefined' && 'env' in process) {
  3756. r = process.env.DEBUG;
  3757. }
  3758. return r;
  3759. }
  3760. /**
  3761. * Localstorage attempts to return the localstorage.
  3762. *
  3763. * This is necessary because safari throws
  3764. * when a user disables cookies/localstorage
  3765. * and you attempt to access it.
  3766. *
  3767. * @return {LocalStorage}
  3768. * @api private
  3769. */
  3770. function localstorage() {
  3771. try {
  3772. // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
  3773. // The Browser also has localStorage in the global context.
  3774. return localStorage;
  3775. } catch (error) {// Swallow
  3776. // XXX (@Qix-) should we be logging these?
  3777. }
  3778. }
  3779. module.exports = __webpack_require__(/*! ./common */ "./node_modules/sockjs-client/node_modules/debug/src/common.js")(exports);
  3780. var formatters = module.exports.formatters;
  3781. /**
  3782. * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
  3783. */
  3784. formatters.j = function (v) {
  3785. try {
  3786. return JSON.stringify(v);
  3787. } catch (error) {
  3788. return '[UnexpectedJSONParseError]: ' + error.message;
  3789. }
  3790. };
  3791. /***/ }),
  3792. /***/ "./node_modules/sockjs-client/node_modules/debug/src/common.js":
  3793. /*!*********************************************************************!*\
  3794. !*** ./node_modules/sockjs-client/node_modules/debug/src/common.js ***!
  3795. \*********************************************************************/
  3796. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3797. "use strict";
  3798. /**
  3799. * This is the common logic for both the Node.js and web browser
  3800. * implementations of `debug()`.
  3801. */
  3802. function setup(env) {
  3803. createDebug.debug = createDebug;
  3804. createDebug.default = createDebug;
  3805. createDebug.coerce = coerce;
  3806. createDebug.disable = disable;
  3807. createDebug.enable = enable;
  3808. createDebug.enabled = enabled;
  3809. createDebug.humanize = __webpack_require__(/*! ms */ "./node_modules/ms/index.js");
  3810. Object.keys(env).forEach(function (key) {
  3811. createDebug[key] = env[key];
  3812. });
  3813. /**
  3814. * Active `debug` instances.
  3815. */
  3816. createDebug.instances = [];
  3817. /**
  3818. * The currently active debug mode names, and names to skip.
  3819. */
  3820. createDebug.names = [];
  3821. createDebug.skips = [];
  3822. /**
  3823. * Map of special "%n" handling functions, for the debug "format" argument.
  3824. *
  3825. * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
  3826. */
  3827. createDebug.formatters = {};
  3828. /**
  3829. * Selects a color for a debug namespace
  3830. * @param {String} namespace The namespace string for the for the debug instance to be colored
  3831. * @return {Number|String} An ANSI color code for the given namespace
  3832. * @api private
  3833. */
  3834. function selectColor(namespace) {
  3835. var hash = 0;
  3836. for (var i = 0; i < namespace.length; i++) {
  3837. hash = (hash << 5) - hash + namespace.charCodeAt(i);
  3838. hash |= 0; // Convert to 32bit integer
  3839. }
  3840. return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
  3841. }
  3842. createDebug.selectColor = selectColor;
  3843. /**
  3844. * Create a debugger with the given `namespace`.
  3845. *
  3846. * @param {String} namespace
  3847. * @return {Function}
  3848. * @api public
  3849. */
  3850. function createDebug(namespace) {
  3851. var prevTime;
  3852. function debug() {
  3853. // Disabled?
  3854. if (!debug.enabled) {
  3855. return;
  3856. }
  3857. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  3858. args[_key] = arguments[_key];
  3859. }
  3860. var self = debug; // Set `diff` timestamp
  3861. var curr = Number(new Date());
  3862. var ms = curr - (prevTime || curr);
  3863. self.diff = ms;
  3864. self.prev = prevTime;
  3865. self.curr = curr;
  3866. prevTime = curr;
  3867. args[0] = createDebug.coerce(args[0]);
  3868. if (typeof args[0] !== 'string') {
  3869. // Anything else let's inspect with %O
  3870. args.unshift('%O');
  3871. } // Apply any `formatters` transformations
  3872. var index = 0;
  3873. args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
  3874. // If we encounter an escaped % then don't increase the array index
  3875. if (match === '%%') {
  3876. return match;
  3877. }
  3878. index++;
  3879. var formatter = createDebug.formatters[format];
  3880. if (typeof formatter === 'function') {
  3881. var val = args[index];
  3882. match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
  3883. args.splice(index, 1);
  3884. index--;
  3885. }
  3886. return match;
  3887. }); // Apply env-specific formatting (colors, etc.)
  3888. createDebug.formatArgs.call(self, args);
  3889. var logFn = self.log || createDebug.log;
  3890. logFn.apply(self, args);
  3891. }
  3892. debug.namespace = namespace;
  3893. debug.enabled = createDebug.enabled(namespace);
  3894. debug.useColors = createDebug.useColors();
  3895. debug.color = selectColor(namespace);
  3896. debug.destroy = destroy;
  3897. debug.extend = extend; // Debug.formatArgs = formatArgs;
  3898. // debug.rawLog = rawLog;
  3899. // env-specific initialization logic for debug instances
  3900. if (typeof createDebug.init === 'function') {
  3901. createDebug.init(debug);
  3902. }
  3903. createDebug.instances.push(debug);
  3904. return debug;
  3905. }
  3906. function destroy() {
  3907. var index = createDebug.instances.indexOf(this);
  3908. if (index !== -1) {
  3909. createDebug.instances.splice(index, 1);
  3910. return true;
  3911. }
  3912. return false;
  3913. }
  3914. function extend(namespace, delimiter) {
  3915. return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
  3916. }
  3917. /**
  3918. * Enables a debug mode by namespaces. This can include modes
  3919. * separated by a colon and wildcards.
  3920. *
  3921. * @param {String} namespaces
  3922. * @api public
  3923. */
  3924. function enable(namespaces) {
  3925. createDebug.save(namespaces);
  3926. createDebug.names = [];
  3927. createDebug.skips = [];
  3928. var i;
  3929. var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
  3930. var len = split.length;
  3931. for (i = 0; i < len; i++) {
  3932. if (!split[i]) {
  3933. // ignore empty strings
  3934. continue;
  3935. }
  3936. namespaces = split[i].replace(/\*/g, '.*?');
  3937. if (namespaces[0] === '-') {
  3938. createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
  3939. } else {
  3940. createDebug.names.push(new RegExp('^' + namespaces + '$'));
  3941. }
  3942. }
  3943. for (i = 0; i < createDebug.instances.length; i++) {
  3944. var instance = createDebug.instances[i];
  3945. instance.enabled = createDebug.enabled(instance.namespace);
  3946. }
  3947. }
  3948. /**
  3949. * Disable debug output.
  3950. *
  3951. * @api public
  3952. */
  3953. function disable() {
  3954. createDebug.enable('');
  3955. }
  3956. /**
  3957. * Returns true if the given mode name is enabled, false otherwise.
  3958. *
  3959. * @param {String} name
  3960. * @return {Boolean}
  3961. * @api public
  3962. */
  3963. function enabled(name) {
  3964. if (name[name.length - 1] === '*') {
  3965. return true;
  3966. }
  3967. var i;
  3968. var len;
  3969. for (i = 0, len = createDebug.skips.length; i < len; i++) {
  3970. if (createDebug.skips[i].test(name)) {
  3971. return false;
  3972. }
  3973. }
  3974. for (i = 0, len = createDebug.names.length; i < len; i++) {
  3975. if (createDebug.names[i].test(name)) {
  3976. return true;
  3977. }
  3978. }
  3979. return false;
  3980. }
  3981. /**
  3982. * Coerce `val`.
  3983. *
  3984. * @param {Mixed} val
  3985. * @return {Mixed}
  3986. * @api private
  3987. */
  3988. function coerce(val) {
  3989. if (val instanceof Error) {
  3990. return val.stack || val.message;
  3991. }
  3992. return val;
  3993. }
  3994. createDebug.enable(createDebug.load());
  3995. return createDebug;
  3996. }
  3997. module.exports = setup;
  3998. /***/ }),
  3999. /***/ "./node_modules/url-parse/index.js":
  4000. /*!*****************************************!*\
  4001. !*** ./node_modules/url-parse/index.js ***!
  4002. \*****************************************/
  4003. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  4004. "use strict";
  4005. var required = __webpack_require__(/*! requires-port */ "./node_modules/requires-port/index.js"),
  4006. qs = __webpack_require__(/*! querystringify */ "./node_modules/querystringify/index.js"),
  4007. controlOrWhitespace = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,
  4008. CRHTLF = /[\n\r\t]/g,
  4009. slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//,
  4010. port = /:\d+$/,
  4011. protocolre = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,
  4012. windowsDriveLetter = /^[a-zA-Z]:/;
  4013. /**
  4014. * Remove control characters and whitespace from the beginning of a string.
  4015. *
  4016. * @param {Object|String} str String to trim.
  4017. * @returns {String} A new string representing `str` stripped of control
  4018. * characters and whitespace from its beginning.
  4019. * @public
  4020. */
  4021. function trimLeft(str) {
  4022. return (str ? str : '').toString().replace(controlOrWhitespace, '');
  4023. }
  4024. /**
  4025. * These are the parse rules for the URL parser, it informs the parser
  4026. * about:
  4027. *
  4028. * 0. The char it Needs to parse, if it's a string it should be done using
  4029. * indexOf, RegExp using exec and NaN means set as current value.
  4030. * 1. The property we should set when parsing this value.
  4031. * 2. Indication if it's backwards or forward parsing, when set as number it's
  4032. * the value of extra chars that should be split off.
  4033. * 3. Inherit from location if non existing in the parser.
  4034. * 4. `toLowerCase` the resulting value.
  4035. */
  4036. var rules = [['#', 'hash'],
  4037. // Extract from the back.
  4038. ['?', 'query'],
  4039. // Extract from the back.
  4040. function sanitize(address, url) {
  4041. // Sanitize what is left of the address
  4042. return isSpecial(url.protocol) ? address.replace(/\\/g, '/') : address;
  4043. }, ['/', 'pathname'],
  4044. // Extract from the back.
  4045. ['@', 'auth', 1],
  4046. // Extract from the front.
  4047. [NaN, 'host', undefined, 1, 1],
  4048. // Set left over value.
  4049. [/:(\d*)$/, 'port', undefined, 1],
  4050. // RegExp the back.
  4051. [NaN, 'hostname', undefined, 1, 1] // Set left over.
  4052. ];
  4053. /**
  4054. * These properties should not be copied or inherited from. This is only needed
  4055. * for all non blob URL's as a blob URL does not include a hash, only the
  4056. * origin.
  4057. *
  4058. * @type {Object}
  4059. * @private
  4060. */
  4061. var ignore = {
  4062. hash: 1,
  4063. query: 1
  4064. };
  4065. /**
  4066. * The location object differs when your code is loaded through a normal page,
  4067. * Worker or through a worker using a blob. And with the blobble begins the
  4068. * trouble as the location object will contain the URL of the blob, not the
  4069. * location of the page where our code is loaded in. The actual origin is
  4070. * encoded in the `pathname` so we can thankfully generate a good "default"
  4071. * location from it so we can generate proper relative URL's again.
  4072. *
  4073. * @param {Object|String} loc Optional default location object.
  4074. * @returns {Object} lolcation object.
  4075. * @public
  4076. */
  4077. function lolcation(loc) {
  4078. var globalVar;
  4079. if (typeof window !== 'undefined') globalVar = window;else if (typeof __webpack_require__.g !== 'undefined') globalVar = __webpack_require__.g;else if (typeof self !== 'undefined') globalVar = self;else globalVar = {};
  4080. var location = globalVar.location || {};
  4081. loc = loc || location;
  4082. var finaldestination = {},
  4083. type = typeof loc,
  4084. key;
  4085. if ('blob:' === loc.protocol) {
  4086. finaldestination = new Url(unescape(loc.pathname), {});
  4087. } else if ('string' === type) {
  4088. finaldestination = new Url(loc, {});
  4089. for (key in ignore) delete finaldestination[key];
  4090. } else if ('object' === type) {
  4091. for (key in loc) {
  4092. if (key in ignore) continue;
  4093. finaldestination[key] = loc[key];
  4094. }
  4095. if (finaldestination.slashes === undefined) {
  4096. finaldestination.slashes = slashes.test(loc.href);
  4097. }
  4098. }
  4099. return finaldestination;
  4100. }
  4101. /**
  4102. * Check whether a protocol scheme is special.
  4103. *
  4104. * @param {String} The protocol scheme of the URL
  4105. * @return {Boolean} `true` if the protocol scheme is special, else `false`
  4106. * @private
  4107. */
  4108. function isSpecial(scheme) {
  4109. return scheme === 'file:' || scheme === 'ftp:' || scheme === 'http:' || scheme === 'https:' || scheme === 'ws:' || scheme === 'wss:';
  4110. }
  4111. /**
  4112. * @typedef ProtocolExtract
  4113. * @type Object
  4114. * @property {String} protocol Protocol matched in the URL, in lowercase.
  4115. * @property {Boolean} slashes `true` if protocol is followed by "//", else `false`.
  4116. * @property {String} rest Rest of the URL that is not part of the protocol.
  4117. */
  4118. /**
  4119. * Extract protocol information from a URL with/without double slash ("//").
  4120. *
  4121. * @param {String} address URL we want to extract from.
  4122. * @param {Object} location
  4123. * @return {ProtocolExtract} Extracted information.
  4124. * @private
  4125. */
  4126. function extractProtocol(address, location) {
  4127. address = trimLeft(address);
  4128. address = address.replace(CRHTLF, '');
  4129. location = location || {};
  4130. var match = protocolre.exec(address);
  4131. var protocol = match[1] ? match[1].toLowerCase() : '';
  4132. var forwardSlashes = !!match[2];
  4133. var otherSlashes = !!match[3];
  4134. var slashesCount = 0;
  4135. var rest;
  4136. if (forwardSlashes) {
  4137. if (otherSlashes) {
  4138. rest = match[2] + match[3] + match[4];
  4139. slashesCount = match[2].length + match[3].length;
  4140. } else {
  4141. rest = match[2] + match[4];
  4142. slashesCount = match[2].length;
  4143. }
  4144. } else {
  4145. if (otherSlashes) {
  4146. rest = match[3] + match[4];
  4147. slashesCount = match[3].length;
  4148. } else {
  4149. rest = match[4];
  4150. }
  4151. }
  4152. if (protocol === 'file:') {
  4153. if (slashesCount >= 2) {
  4154. rest = rest.slice(2);
  4155. }
  4156. } else if (isSpecial(protocol)) {
  4157. rest = match[4];
  4158. } else if (protocol) {
  4159. if (forwardSlashes) {
  4160. rest = rest.slice(2);
  4161. }
  4162. } else if (slashesCount >= 2 && isSpecial(location.protocol)) {
  4163. rest = match[4];
  4164. }
  4165. return {
  4166. protocol: protocol,
  4167. slashes: forwardSlashes || isSpecial(protocol),
  4168. slashesCount: slashesCount,
  4169. rest: rest
  4170. };
  4171. }
  4172. /**
  4173. * Resolve a relative URL pathname against a base URL pathname.
  4174. *
  4175. * @param {String} relative Pathname of the relative URL.
  4176. * @param {String} base Pathname of the base URL.
  4177. * @return {String} Resolved pathname.
  4178. * @private
  4179. */
  4180. function resolve(relative, base) {
  4181. if (relative === '') return base;
  4182. var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/')),
  4183. i = path.length,
  4184. last = path[i - 1],
  4185. unshift = false,
  4186. up = 0;
  4187. while (i--) {
  4188. if (path[i] === '.') {
  4189. path.splice(i, 1);
  4190. } else if (path[i] === '..') {
  4191. path.splice(i, 1);
  4192. up++;
  4193. } else if (up) {
  4194. if (i === 0) unshift = true;
  4195. path.splice(i, 1);
  4196. up--;
  4197. }
  4198. }
  4199. if (unshift) path.unshift('');
  4200. if (last === '.' || last === '..') path.push('');
  4201. return path.join('/');
  4202. }
  4203. /**
  4204. * The actual URL instance. Instead of returning an object we've opted-in to
  4205. * create an actual constructor as it's much more memory efficient and
  4206. * faster and it pleases my OCD.
  4207. *
  4208. * It is worth noting that we should not use `URL` as class name to prevent
  4209. * clashes with the global URL instance that got introduced in browsers.
  4210. *
  4211. * @constructor
  4212. * @param {String} address URL we want to parse.
  4213. * @param {Object|String} [location] Location defaults for relative paths.
  4214. * @param {Boolean|Function} [parser] Parser for the query string.
  4215. * @private
  4216. */
  4217. function Url(address, location, parser) {
  4218. address = trimLeft(address);
  4219. address = address.replace(CRHTLF, '');
  4220. if (!(this instanceof Url)) {
  4221. return new Url(address, location, parser);
  4222. }
  4223. var relative,
  4224. extracted,
  4225. parse,
  4226. instruction,
  4227. index,
  4228. key,
  4229. instructions = rules.slice(),
  4230. type = typeof location,
  4231. url = this,
  4232. i = 0;
  4233. //
  4234. // The following if statements allows this module two have compatibility with
  4235. // 2 different API:
  4236. //
  4237. // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments
  4238. // where the boolean indicates that the query string should also be parsed.
  4239. //
  4240. // 2. The `URL` interface of the browser which accepts a URL, object as
  4241. // arguments. The supplied object will be used as default values / fall-back
  4242. // for relative paths.
  4243. //
  4244. if ('object' !== type && 'string' !== type) {
  4245. parser = location;
  4246. location = null;
  4247. }
  4248. if (parser && 'function' !== typeof parser) parser = qs.parse;
  4249. location = lolcation(location);
  4250. //
  4251. // Extract protocol information before running the instructions.
  4252. //
  4253. extracted = extractProtocol(address || '', location);
  4254. relative = !extracted.protocol && !extracted.slashes;
  4255. url.slashes = extracted.slashes || relative && location.slashes;
  4256. url.protocol = extracted.protocol || location.protocol || '';
  4257. address = extracted.rest;
  4258. //
  4259. // When the authority component is absent the URL starts with a path
  4260. // component.
  4261. //
  4262. if (extracted.protocol === 'file:' && (extracted.slashesCount !== 2 || windowsDriveLetter.test(address)) || !extracted.slashes && (extracted.protocol || extracted.slashesCount < 2 || !isSpecial(url.protocol))) {
  4263. instructions[3] = [/(.*)/, 'pathname'];
  4264. }
  4265. for (; i < instructions.length; i++) {
  4266. instruction = instructions[i];
  4267. if (typeof instruction === 'function') {
  4268. address = instruction(address, url);
  4269. continue;
  4270. }
  4271. parse = instruction[0];
  4272. key = instruction[1];
  4273. if (parse !== parse) {
  4274. url[key] = address;
  4275. } else if ('string' === typeof parse) {
  4276. index = parse === '@' ? address.lastIndexOf(parse) : address.indexOf(parse);
  4277. if (~index) {
  4278. if ('number' === typeof instruction[2]) {
  4279. url[key] = address.slice(0, index);
  4280. address = address.slice(index + instruction[2]);
  4281. } else {
  4282. url[key] = address.slice(index);
  4283. address = address.slice(0, index);
  4284. }
  4285. }
  4286. } else if (index = parse.exec(address)) {
  4287. url[key] = index[1];
  4288. address = address.slice(0, index.index);
  4289. }
  4290. url[key] = url[key] || (relative && instruction[3] ? location[key] || '' : '');
  4291. //
  4292. // Hostname, host and protocol should be lowercased so they can be used to
  4293. // create a proper `origin`.
  4294. //
  4295. if (instruction[4]) url[key] = url[key].toLowerCase();
  4296. }
  4297. //
  4298. // Also parse the supplied query string in to an object. If we're supplied
  4299. // with a custom parser as function use that instead of the default build-in
  4300. // parser.
  4301. //
  4302. if (parser) url.query = parser(url.query);
  4303. //
  4304. // If the URL is relative, resolve the pathname against the base URL.
  4305. //
  4306. if (relative && location.slashes && url.pathname.charAt(0) !== '/' && (url.pathname !== '' || location.pathname !== '')) {
  4307. url.pathname = resolve(url.pathname, location.pathname);
  4308. }
  4309. //
  4310. // Default to a / for pathname if none exists. This normalizes the URL
  4311. // to always have a /
  4312. //
  4313. if (url.pathname.charAt(0) !== '/' && isSpecial(url.protocol)) {
  4314. url.pathname = '/' + url.pathname;
  4315. }
  4316. //
  4317. // We should not add port numbers if they are already the default port number
  4318. // for a given protocol. As the host also contains the port number we're going
  4319. // override it with the hostname which contains no port number.
  4320. //
  4321. if (!required(url.port, url.protocol)) {
  4322. url.host = url.hostname;
  4323. url.port = '';
  4324. }
  4325. //
  4326. // Parse down the `auth` for the username and password.
  4327. //
  4328. url.username = url.password = '';
  4329. if (url.auth) {
  4330. index = url.auth.indexOf(':');
  4331. if (~index) {
  4332. url.username = url.auth.slice(0, index);
  4333. url.username = encodeURIComponent(decodeURIComponent(url.username));
  4334. url.password = url.auth.slice(index + 1);
  4335. url.password = encodeURIComponent(decodeURIComponent(url.password));
  4336. } else {
  4337. url.username = encodeURIComponent(decodeURIComponent(url.auth));
  4338. }
  4339. url.auth = url.password ? url.username + ':' + url.password : url.username;
  4340. }
  4341. url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host ? url.protocol + '//' + url.host : 'null';
  4342. //
  4343. // The href is just the compiled result.
  4344. //
  4345. url.href = url.toString();
  4346. }
  4347. /**
  4348. * This is convenience method for changing properties in the URL instance to
  4349. * insure that they all propagate correctly.
  4350. *
  4351. * @param {String} part Property we need to adjust.
  4352. * @param {Mixed} value The newly assigned value.
  4353. * @param {Boolean|Function} fn When setting the query, it will be the function
  4354. * used to parse the query.
  4355. * When setting the protocol, double slash will be
  4356. * removed from the final url if it is true.
  4357. * @returns {URL} URL instance for chaining.
  4358. * @public
  4359. */
  4360. function set(part, value, fn) {
  4361. var url = this;
  4362. switch (part) {
  4363. case 'query':
  4364. if ('string' === typeof value && value.length) {
  4365. value = (fn || qs.parse)(value);
  4366. }
  4367. url[part] = value;
  4368. break;
  4369. case 'port':
  4370. url[part] = value;
  4371. if (!required(value, url.protocol)) {
  4372. url.host = url.hostname;
  4373. url[part] = '';
  4374. } else if (value) {
  4375. url.host = url.hostname + ':' + value;
  4376. }
  4377. break;
  4378. case 'hostname':
  4379. url[part] = value;
  4380. if (url.port) value += ':' + url.port;
  4381. url.host = value;
  4382. break;
  4383. case 'host':
  4384. url[part] = value;
  4385. if (port.test(value)) {
  4386. value = value.split(':');
  4387. url.port = value.pop();
  4388. url.hostname = value.join(':');
  4389. } else {
  4390. url.hostname = value;
  4391. url.port = '';
  4392. }
  4393. break;
  4394. case 'protocol':
  4395. url.protocol = value.toLowerCase();
  4396. url.slashes = !fn;
  4397. break;
  4398. case 'pathname':
  4399. case 'hash':
  4400. if (value) {
  4401. var char = part === 'pathname' ? '/' : '#';
  4402. url[part] = value.charAt(0) !== char ? char + value : value;
  4403. } else {
  4404. url[part] = value;
  4405. }
  4406. break;
  4407. case 'username':
  4408. case 'password':
  4409. url[part] = encodeURIComponent(value);
  4410. break;
  4411. case 'auth':
  4412. var index = value.indexOf(':');
  4413. if (~index) {
  4414. url.username = value.slice(0, index);
  4415. url.username = encodeURIComponent(decodeURIComponent(url.username));
  4416. url.password = value.slice(index + 1);
  4417. url.password = encodeURIComponent(decodeURIComponent(url.password));
  4418. } else {
  4419. url.username = encodeURIComponent(decodeURIComponent(value));
  4420. }
  4421. }
  4422. for (var i = 0; i < rules.length; i++) {
  4423. var ins = rules[i];
  4424. if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase();
  4425. }
  4426. url.auth = url.password ? url.username + ':' + url.password : url.username;
  4427. url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host ? url.protocol + '//' + url.host : 'null';
  4428. url.href = url.toString();
  4429. return url;
  4430. }
  4431. /**
  4432. * Transform the properties back in to a valid and full URL string.
  4433. *
  4434. * @param {Function} stringify Optional query stringify function.
  4435. * @returns {String} Compiled version of the URL.
  4436. * @public
  4437. */
  4438. function toString(stringify) {
  4439. if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify;
  4440. var query,
  4441. url = this,
  4442. host = url.host,
  4443. protocol = url.protocol;
  4444. if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':';
  4445. var result = protocol + (url.protocol && url.slashes || isSpecial(url.protocol) ? '//' : '');
  4446. if (url.username) {
  4447. result += url.username;
  4448. if (url.password) result += ':' + url.password;
  4449. result += '@';
  4450. } else if (url.password) {
  4451. result += ':' + url.password;
  4452. result += '@';
  4453. } else if (url.protocol !== 'file:' && isSpecial(url.protocol) && !host && url.pathname !== '/') {
  4454. //
  4455. // Add back the empty userinfo, otherwise the original invalid URL
  4456. // might be transformed into a valid one with `url.pathname` as host.
  4457. //
  4458. result += '@';
  4459. }
  4460. //
  4461. // Trailing colon is removed from `url.host` when it is parsed. If it still
  4462. // ends with a colon, then add back the trailing colon that was removed. This
  4463. // prevents an invalid URL from being transformed into a valid one.
  4464. //
  4465. if (host[host.length - 1] === ':' || port.test(url.hostname) && !url.port) {
  4466. host += ':';
  4467. }
  4468. result += host + url.pathname;
  4469. query = 'object' === typeof url.query ? stringify(url.query) : url.query;
  4470. if (query) result += '?' !== query.charAt(0) ? '?' + query : query;
  4471. if (url.hash) result += url.hash;
  4472. return result;
  4473. }
  4474. Url.prototype = {
  4475. set: set,
  4476. toString: toString
  4477. };
  4478. //
  4479. // Expose the URL parser and some additional properties that might be useful for
  4480. // others or testing.
  4481. //
  4482. Url.extractProtocol = extractProtocol;
  4483. Url.location = lolcation;
  4484. Url.trimLeft = trimLeft;
  4485. Url.qs = qs;
  4486. module.exports = Url;
  4487. /***/ })
  4488. /******/ });
  4489. /************************************************************************/
  4490. /******/ // The module cache
  4491. /******/ var __webpack_module_cache__ = {};
  4492. /******/
  4493. /******/ // The require function
  4494. /******/ function __webpack_require__(moduleId) {
  4495. /******/ // Check if module is in cache
  4496. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  4497. /******/ if (cachedModule !== undefined) {
  4498. /******/ return cachedModule.exports;
  4499. /******/ }
  4500. /******/ // Create a new module (and put it into the cache)
  4501. /******/ var module = __webpack_module_cache__[moduleId] = {
  4502. /******/ // no module.id needed
  4503. /******/ // no module.loaded needed
  4504. /******/ exports: {}
  4505. /******/ };
  4506. /******/
  4507. /******/ // Execute the module function
  4508. /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
  4509. /******/
  4510. /******/ // Return the exports of the module
  4511. /******/ return module.exports;
  4512. /******/ }
  4513. /******/
  4514. /************************************************************************/
  4515. /******/ /* webpack/runtime/compat get default export */
  4516. /******/ !function() {
  4517. /******/ // getDefaultExport function for compatibility with non-harmony modules
  4518. /******/ __webpack_require__.n = function(module) {
  4519. /******/ var getter = module && module.__esModule ?
  4520. /******/ function() { return module['default']; } :
  4521. /******/ function() { return module; };
  4522. /******/ __webpack_require__.d(getter, { a: getter });
  4523. /******/ return getter;
  4524. /******/ };
  4525. /******/ }();
  4526. /******/
  4527. /******/ /* webpack/runtime/define property getters */
  4528. /******/ !function() {
  4529. /******/ // define getter functions for harmony exports
  4530. /******/ __webpack_require__.d = function(exports, definition) {
  4531. /******/ for(var key in definition) {
  4532. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  4533. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  4534. /******/ }
  4535. /******/ }
  4536. /******/ };
  4537. /******/ }();
  4538. /******/
  4539. /******/ /* webpack/runtime/global */
  4540. /******/ !function() {
  4541. /******/ __webpack_require__.g = (function() {
  4542. /******/ if (typeof globalThis === 'object') return globalThis;
  4543. /******/ try {
  4544. /******/ return this || new Function('return this')();
  4545. /******/ } catch (e) {
  4546. /******/ if (typeof window === 'object') return window;
  4547. /******/ }
  4548. /******/ })();
  4549. /******/ }();
  4550. /******/
  4551. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  4552. /******/ !function() {
  4553. /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
  4554. /******/ }();
  4555. /******/
  4556. /******/ /* webpack/runtime/make namespace object */
  4557. /******/ !function() {
  4558. /******/ // define __esModule on exports
  4559. /******/ __webpack_require__.r = function(exports) {
  4560. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  4561. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  4562. /******/ }
  4563. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  4564. /******/ };
  4565. /******/ }();
  4566. /******/
  4567. /************************************************************************/
  4568. var __webpack_exports__ = {};
  4569. // This entry need to be wrapped in an IIFE because it need to be in strict mode.
  4570. !function() {
  4571. "use strict";
  4572. /*!***************************************************!*\
  4573. !*** ./client-src/modules/sockjs-client/index.js ***!
  4574. \***************************************************/
  4575. __webpack_require__.r(__webpack_exports__);
  4576. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4577. /* harmony export */ "default": function() { return /* reexport default from dynamic */ sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a; }
  4578. /* harmony export */ });
  4579. /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! sockjs-client */ "./node_modules/sockjs-client/lib/entry.js");
  4580. /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sockjs_client__WEBPACK_IMPORTED_MODULE_0__);
  4581. // eslint-disable-next-line import/no-extraneous-dependencies
  4582. }();
  4583. /******/ return __webpack_exports__;
  4584. /******/ })()
  4585. ;
  4586. });