vendor.js 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pagesHome/common/vendor"],{
  2. /***/ 100:
  3. /*!********************************************************************************!*\
  4. !*** D:/project/新医院随访2023/follow_applet/node_modules/websocket/lib/version.js ***!
  5. \********************************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. module.exports = __webpack_require__(/*! ../package.json */ 101).version;
  9. /***/ }),
  10. /***/ 101:
  11. /*!******************************************************************************!*\
  12. !*** D:/project/新医院随访2023/follow_applet/node_modules/websocket/package.json ***!
  13. \******************************************************************************/
  14. /*! exports provided: name, description, keywords, author, contributors, version, repository, homepage, engines, dependencies, devDependencies, config, scripts, main, directories, browser, license, default */
  15. /***/ (function(module) {
  16. module.exports = JSON.parse("{\"name\":\"websocket\",\"description\":\"Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.\",\"keywords\":[\"websocket\",\"websockets\",\"socket\",\"networking\",\"comet\",\"push\",\"RFC-6455\",\"realtime\",\"server\",\"client\"],\"author\":\"Brian McKelvey <theturtle32@gmail.com> (https://github.com/theturtle32)\",\"contributors\":[\"Iñaki Baz Castillo <ibc@aliax.net> (http://dev.sipdoc.net)\"],\"version\":\"1.0.34\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/theturtle32/WebSocket-Node.git\"},\"homepage\":\"https://github.com/theturtle32/WebSocket-Node\",\"engines\":{\"node\":\">=4.0.0\"},\"dependencies\":{\"bufferutil\":\"^4.0.1\",\"debug\":\"^2.2.0\",\"es5-ext\":\"^0.10.50\",\"typedarray-to-buffer\":\"^3.1.5\",\"utf-8-validate\":\"^5.0.2\",\"yaeti\":\"^0.0.6\"},\"devDependencies\":{\"buffer-equal\":\"^1.0.0\",\"gulp\":\"^4.0.2\",\"gulp-jshint\":\"^2.0.4\",\"jshint-stylish\":\"^2.2.1\",\"jshint\":\"^2.0.0\",\"tape\":\"^4.9.1\"},\"config\":{\"verbose\":false},\"scripts\":{\"test\":\"tape test/unit/*.js\",\"gulp\":\"gulp\"},\"main\":\"index\",\"directories\":{\"lib\":\"./lib\"},\"browser\":\"lib/browser.js\",\"license\":\"Apache-2.0\"}");
  17. /***/ }),
  18. /***/ 93:
  19. /*!**************************************************************!*\
  20. !*** D:/project/新医院随访2023/follow_applet/common/websocket.js ***!
  21. \**************************************************************/
  22. /*! no static exports found */
  23. /***/ (function(module, exports, __webpack_require__) {
  24. "use strict";
  25. /* WEBPACK VAR INJECTION */(function(uni) {
  26. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  27. Object.defineProperty(exports, "__esModule", {
  28. value: true
  29. });
  30. exports.default = void 0;
  31. var _stompjs = _interopRequireDefault(__webpack_require__(/*! stompjs */ 94));
  32. var socketOpen = false;
  33. var socketMsgQueue = [];
  34. var _default = {
  35. client: null,
  36. init: function init(url, header, connectWS) {
  37. var _this = this;
  38. if (this.client) {
  39. return Promise.resolve(this.client);
  40. }
  41. return new Promise(function (resolve, reject) {
  42. var ws = {
  43. send: _this.sendMessage,
  44. onopen: null,
  45. onmessage: null
  46. };
  47. uni.connectSocket({
  48. url: url,
  49. header: header
  50. });
  51. uni.onSocketOpen(function (res) {
  52. console.log('WebSocket连接已打开!', res);
  53. socketOpen = true;
  54. for (var i = 0; i < socketMsgQueue.length; i++) {
  55. ws.send(socketMsgQueue[i]);
  56. }
  57. socketMsgQueue = [];
  58. ws.onopen && ws.onopen();
  59. });
  60. uni.onSocketMessage(function (res) {
  61. // ios 缺少 0x00 导致解析失败
  62. if (res && res.data) {
  63. var value = res.data;
  64. var code = value.charCodeAt(value.length - 1);
  65. if (code !== 0x00) {
  66. value += String.fromCharCode(0x00);
  67. res.data = value;
  68. }
  69. }
  70. ws.onmessage && ws.onmessage(res);
  71. });
  72. uni.onSocketError(function (res) {
  73. console.log('WebSocket 错误!', res);
  74. });
  75. uni.onSocketClose(function (res) {
  76. _this.client = null;
  77. socketOpen = false;
  78. console.log('WebSocket 已关闭!', res);
  79. if (res.code !== 1000) {
  80. setTimeout(function () {
  81. connectWS();
  82. }, 3000);
  83. }
  84. });
  85. _stompjs.default.setInterval = function (interval, f) {
  86. return setInterval(f, interval);
  87. };
  88. _stompjs.default.clearInterval = function (id) {
  89. return clearInterval(id);
  90. };
  91. var client = _this.client = _stompjs.default.over(ws);
  92. // 关闭连接
  93. client.close = function () {
  94. uni.closeSocket();
  95. };
  96. client.connect(header, function () {
  97. console.log('stomp connected');
  98. resolve(client);
  99. });
  100. });
  101. },
  102. sendMessage: function sendMessage(message) {
  103. if (socketOpen) {
  104. uni.sendSocketMessage({
  105. data: message
  106. });
  107. } else {
  108. socketMsgQueue.push(message);
  109. }
  110. }
  111. };
  112. exports.default = _default;
  113. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  114. /***/ }),
  115. /***/ 94:
  116. /*!************************************************************************!*\
  117. !*** D:/project/新医院随访2023/follow_applet/node_modules/stompjs/index.js ***!
  118. \************************************************************************/
  119. /*! no static exports found */
  120. /***/ (function(module, exports, __webpack_require__) {
  121. // Copyright (C) 2013 [Jeff Mesnil](http://jmesnil.net/)
  122. //
  123. // Stomp Over WebSocket http://www.jmesnil.net/stomp-websocket/doc/ | Apache License V2.0
  124. //
  125. // The library can be used in node.js app to connect to STOMP brokers over TCP
  126. // or Web sockets.
  127. // Root of the `stompjs module`
  128. var Stomp = __webpack_require__(/*! ./lib/stomp.js */ 95);
  129. var StompNode = __webpack_require__(/*! ./lib/stomp-node.js */ 96);
  130. module.exports = Stomp.Stomp;
  131. module.exports.overTCP = StompNode.overTCP;
  132. module.exports.overWS = StompNode.overWS;
  133. /***/ }),
  134. /***/ 95:
  135. /*!****************************************************************************!*\
  136. !*** D:/project/新医院随访2023/follow_applet/node_modules/stompjs/lib/stomp.js ***!
  137. \****************************************************************************/
  138. /*! no static exports found */
  139. /***/ (function(module, exports, __webpack_require__) {
  140. // Generated by CoffeeScript 1.7.1
  141. /*
  142. Stomp Over WebSocket http://www.jmesnil.net/stomp-websocket/doc/ | Apache License V2.0
  143. Copyright (C) 2010-2013 [Jeff Mesnil](http://jmesnil.net/)
  144. Copyright (C) 2012 [FuseSource, Inc.](http://fusesource.com)
  145. */
  146. (function () {
  147. var Byte,
  148. Client,
  149. Frame,
  150. Stomp,
  151. __hasProp = {}.hasOwnProperty,
  152. __slice = [].slice;
  153. Byte = {
  154. LF: '\x0A',
  155. NULL: '\x00'
  156. };
  157. Frame = function () {
  158. var unmarshallSingle;
  159. function Frame(command, headers, body) {
  160. this.command = command;
  161. this.headers = headers != null ? headers : {};
  162. this.body = body != null ? body : '';
  163. }
  164. Frame.prototype.toString = function () {
  165. var lines, name, skipContentLength, value, _ref;
  166. lines = [this.command];
  167. skipContentLength = this.headers['content-length'] === false ? true : false;
  168. if (skipContentLength) {
  169. delete this.headers['content-length'];
  170. }
  171. _ref = this.headers;
  172. for (name in _ref) {
  173. if (!__hasProp.call(_ref, name)) continue;
  174. value = _ref[name];
  175. lines.push("" + name + ":" + value);
  176. }
  177. if (this.body && !skipContentLength) {
  178. lines.push("content-length:" + Frame.sizeOfUTF8(this.body));
  179. }
  180. lines.push(Byte.LF + this.body);
  181. return lines.join(Byte.LF);
  182. };
  183. Frame.sizeOfUTF8 = function (s) {
  184. if (s) {
  185. return encodeURI(s).match(/%..|./g).length;
  186. } else {
  187. return 0;
  188. }
  189. };
  190. unmarshallSingle = function unmarshallSingle(data) {
  191. var body, chr, command, divider, headerLines, headers, i, idx, len, line, start, trim, _i, _j, _len, _ref, _ref1;
  192. divider = data.search(RegExp("" + Byte.LF + Byte.LF));
  193. headerLines = data.substring(0, divider).split(Byte.LF);
  194. command = headerLines.shift();
  195. headers = {};
  196. trim = function trim(str) {
  197. return str.replace(/^\s+|\s+$/g, '');
  198. };
  199. _ref = headerLines.reverse();
  200. for (_i = 0, _len = _ref.length; _i < _len; _i++) {
  201. line = _ref[_i];
  202. idx = line.indexOf(':');
  203. headers[trim(line.substring(0, idx))] = trim(line.substring(idx + 1));
  204. }
  205. body = '';
  206. start = divider + 2;
  207. if (headers['content-length']) {
  208. len = parseInt(headers['content-length']);
  209. body = ('' + data).substring(start, start + len);
  210. } else {
  211. chr = null;
  212. for (i = _j = start, _ref1 = data.length; start <= _ref1 ? _j < _ref1 : _j > _ref1; i = start <= _ref1 ? ++_j : --_j) {
  213. chr = data.charAt(i);
  214. if (chr === Byte.NULL) {
  215. break;
  216. }
  217. body += chr;
  218. }
  219. }
  220. return new Frame(command, headers, body);
  221. };
  222. Frame.unmarshall = function (datas) {
  223. var data;
  224. return function () {
  225. var _i, _len, _ref, _results;
  226. _ref = datas.split(RegExp("" + Byte.NULL + Byte.LF + "*"));
  227. _results = [];
  228. for (_i = 0, _len = _ref.length; _i < _len; _i++) {
  229. data = _ref[_i];
  230. if ((data != null ? data.length : void 0) > 0) {
  231. _results.push(unmarshallSingle(data));
  232. }
  233. }
  234. return _results;
  235. }();
  236. };
  237. Frame.marshall = function (command, headers, body) {
  238. var frame;
  239. frame = new Frame(command, headers, body);
  240. return frame.toString() + Byte.NULL;
  241. };
  242. return Frame;
  243. }();
  244. Client = function () {
  245. var now;
  246. function Client(ws) {
  247. this.ws = ws;
  248. this.ws.binaryType = "arraybuffer";
  249. this.counter = 0;
  250. this.connected = false;
  251. this.heartbeat = {
  252. outgoing: 10000,
  253. incoming: 10000
  254. };
  255. this.maxWebSocketFrameSize = 16 * 1024;
  256. this.subscriptions = {};
  257. }
  258. Client.prototype.debug = function (message) {
  259. var _ref;
  260. return typeof window !== "undefined" && window !== null ? (_ref = window.console) != null ? _ref.log(message) : void 0 : void 0;
  261. };
  262. now = function now() {
  263. if (Date.now) {
  264. return Date.now();
  265. } else {
  266. return new Date().valueOf;
  267. }
  268. };
  269. Client.prototype._transmit = function (command, headers, body) {
  270. var out;
  271. out = Frame.marshall(command, headers, body);
  272. if (typeof this.debug === "function") {
  273. this.debug(">>> " + out);
  274. }
  275. while (true) {
  276. if (out.length > this.maxWebSocketFrameSize) {
  277. this.ws.send(out.substring(0, this.maxWebSocketFrameSize));
  278. out = out.substring(this.maxWebSocketFrameSize);
  279. if (typeof this.debug === "function") {
  280. this.debug("remaining = " + out.length);
  281. }
  282. } else {
  283. return this.ws.send(out);
  284. }
  285. }
  286. };
  287. Client.prototype._setupHeartbeat = function (headers) {
  288. var serverIncoming, serverOutgoing, ttl, v, _ref, _ref1;
  289. if ((_ref = headers.version) !== Stomp.VERSIONS.V1_1 && _ref !== Stomp.VERSIONS.V1_2) {
  290. return;
  291. }
  292. _ref1 = function () {
  293. var _i, _len, _ref1, _results;
  294. _ref1 = headers['heart-beat'].split(",");
  295. _results = [];
  296. for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
  297. v = _ref1[_i];
  298. _results.push(parseInt(v));
  299. }
  300. return _results;
  301. }(), serverOutgoing = _ref1[0], serverIncoming = _ref1[1];
  302. if (!(this.heartbeat.outgoing === 0 || serverIncoming === 0)) {
  303. ttl = Math.max(this.heartbeat.outgoing, serverIncoming);
  304. if (typeof this.debug === "function") {
  305. this.debug("send PING every " + ttl + "ms");
  306. }
  307. this.pinger = Stomp.setInterval(ttl, function (_this) {
  308. return function () {
  309. _this.ws.send(Byte.LF);
  310. return typeof _this.debug === "function" ? _this.debug(">>> PING") : void 0;
  311. };
  312. }(this));
  313. }
  314. if (!(this.heartbeat.incoming === 0 || serverOutgoing === 0)) {
  315. ttl = Math.max(this.heartbeat.incoming, serverOutgoing);
  316. if (typeof this.debug === "function") {
  317. this.debug("check PONG every " + ttl + "ms");
  318. }
  319. return this.ponger = Stomp.setInterval(ttl, function (_this) {
  320. return function () {
  321. var delta;
  322. delta = now() - _this.serverActivity;
  323. if (delta > ttl * 2) {
  324. if (typeof _this.debug === "function") {
  325. _this.debug("did not receive server activity for the last " + delta + "ms");
  326. }
  327. return _this.ws.close();
  328. }
  329. };
  330. }(this));
  331. }
  332. };
  333. Client.prototype._parseConnect = function () {
  334. var args, connectCallback, errorCallback, headers;
  335. args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
  336. headers = {};
  337. switch (args.length) {
  338. case 2:
  339. headers = args[0], connectCallback = args[1];
  340. break;
  341. case 3:
  342. if (args[1] instanceof Function) {
  343. headers = args[0], connectCallback = args[1], errorCallback = args[2];
  344. } else {
  345. headers.login = args[0], headers.passcode = args[1], connectCallback = args[2];
  346. }
  347. break;
  348. case 4:
  349. headers.login = args[0], headers.passcode = args[1], connectCallback = args[2], errorCallback = args[3];
  350. break;
  351. default:
  352. headers.login = args[0], headers.passcode = args[1], connectCallback = args[2], errorCallback = args[3], headers.host = args[4];
  353. }
  354. return [headers, connectCallback, errorCallback];
  355. };
  356. Client.prototype.connect = function () {
  357. var args, errorCallback, headers, out;
  358. args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
  359. out = this._parseConnect.apply(this, args);
  360. headers = out[0], this.connectCallback = out[1], errorCallback = out[2];
  361. if (typeof this.debug === "function") {
  362. this.debug("Opening Web Socket...");
  363. }
  364. this.ws.onmessage = function (_this) {
  365. return function (evt) {
  366. var arr, c, client, data, frame, messageID, onreceive, subscription, _i, _len, _ref, _results;
  367. data = typeof ArrayBuffer !== 'undefined' && evt.data instanceof ArrayBuffer ? (arr = new Uint8Array(evt.data), typeof _this.debug === "function" ? _this.debug("--- got data length: " + arr.length) : void 0, function () {
  368. var _i, _len, _results;
  369. _results = [];
  370. for (_i = 0, _len = arr.length; _i < _len; _i++) {
  371. c = arr[_i];
  372. _results.push(String.fromCharCode(c));
  373. }
  374. return _results;
  375. }().join('')) : evt.data;
  376. _this.serverActivity = now();
  377. if (data === Byte.LF) {
  378. if (typeof _this.debug === "function") {
  379. _this.debug("<<< PONG");
  380. }
  381. return;
  382. }
  383. if (typeof _this.debug === "function") {
  384. _this.debug("<<< " + data);
  385. }
  386. _ref = Frame.unmarshall(data);
  387. _results = [];
  388. for (_i = 0, _len = _ref.length; _i < _len; _i++) {
  389. frame = _ref[_i];
  390. switch (frame.command) {
  391. case "CONNECTED":
  392. if (typeof _this.debug === "function") {
  393. _this.debug("connected to server " + frame.headers.server);
  394. }
  395. _this.connected = true;
  396. _this._setupHeartbeat(frame.headers);
  397. _results.push(typeof _this.connectCallback === "function" ? _this.connectCallback(frame) : void 0);
  398. break;
  399. case "MESSAGE":
  400. subscription = frame.headers.subscription;
  401. onreceive = _this.subscriptions[subscription] || _this.onreceive;
  402. if (onreceive) {
  403. client = _this;
  404. messageID = frame.headers["message-id"];
  405. frame.ack = function (headers) {
  406. if (headers == null) {
  407. headers = {};
  408. }
  409. return client.ack(messageID, subscription, headers);
  410. };
  411. frame.nack = function (headers) {
  412. if (headers == null) {
  413. headers = {};
  414. }
  415. return client.nack(messageID, subscription, headers);
  416. };
  417. _results.push(onreceive(frame));
  418. } else {
  419. _results.push(typeof _this.debug === "function" ? _this.debug("Unhandled received MESSAGE: " + frame) : void 0);
  420. }
  421. break;
  422. case "RECEIPT":
  423. _results.push(typeof _this.onreceipt === "function" ? _this.onreceipt(frame) : void 0);
  424. break;
  425. case "ERROR":
  426. _results.push(typeof errorCallback === "function" ? errorCallback(frame) : void 0);
  427. break;
  428. default:
  429. _results.push(typeof _this.debug === "function" ? _this.debug("Unhandled frame: " + frame) : void 0);
  430. }
  431. }
  432. return _results;
  433. };
  434. }(this);
  435. this.ws.onclose = function (_this) {
  436. return function () {
  437. var msg;
  438. msg = "Whoops! Lost connection to " + _this.ws.url;
  439. if (typeof _this.debug === "function") {
  440. _this.debug(msg);
  441. }
  442. _this._cleanUp();
  443. return typeof errorCallback === "function" ? errorCallback(msg) : void 0;
  444. };
  445. }(this);
  446. return this.ws.onopen = function (_this) {
  447. return function () {
  448. if (typeof _this.debug === "function") {
  449. _this.debug('Web Socket Opened...');
  450. }
  451. headers["accept-version"] = Stomp.VERSIONS.supportedVersions();
  452. headers["heart-beat"] = [_this.heartbeat.outgoing, _this.heartbeat.incoming].join(',');
  453. return _this._transmit("CONNECT", headers);
  454. };
  455. }(this);
  456. };
  457. Client.prototype.disconnect = function (disconnectCallback, headers) {
  458. if (headers == null) {
  459. headers = {};
  460. }
  461. this._transmit("DISCONNECT", headers);
  462. this.ws.onclose = null;
  463. this.ws.close();
  464. this._cleanUp();
  465. return typeof disconnectCallback === "function" ? disconnectCallback() : void 0;
  466. };
  467. Client.prototype._cleanUp = function () {
  468. this.connected = false;
  469. if (this.pinger) {
  470. Stomp.clearInterval(this.pinger);
  471. }
  472. if (this.ponger) {
  473. return Stomp.clearInterval(this.ponger);
  474. }
  475. };
  476. Client.prototype.send = function (destination, headers, body) {
  477. if (headers == null) {
  478. headers = {};
  479. }
  480. if (body == null) {
  481. body = '';
  482. }
  483. headers.destination = destination;
  484. return this._transmit("SEND", headers, body);
  485. };
  486. Client.prototype.subscribe = function (destination, callback, headers) {
  487. var client;
  488. if (headers == null) {
  489. headers = {};
  490. }
  491. if (!headers.id) {
  492. headers.id = "sub-" + this.counter++;
  493. }
  494. headers.destination = destination;
  495. this.subscriptions[headers.id] = callback;
  496. this._transmit("SUBSCRIBE", headers);
  497. client = this;
  498. return {
  499. id: headers.id,
  500. unsubscribe: function unsubscribe() {
  501. return client.unsubscribe(headers.id);
  502. }
  503. };
  504. };
  505. Client.prototype.unsubscribe = function (id) {
  506. delete this.subscriptions[id];
  507. return this._transmit("UNSUBSCRIBE", {
  508. id: id
  509. });
  510. };
  511. Client.prototype.begin = function (transaction) {
  512. var client, txid;
  513. txid = transaction || "tx-" + this.counter++;
  514. this._transmit("BEGIN", {
  515. transaction: txid
  516. });
  517. client = this;
  518. return {
  519. id: txid,
  520. commit: function commit() {
  521. return client.commit(txid);
  522. },
  523. abort: function abort() {
  524. return client.abort(txid);
  525. }
  526. };
  527. };
  528. Client.prototype.commit = function (transaction) {
  529. return this._transmit("COMMIT", {
  530. transaction: transaction
  531. });
  532. };
  533. Client.prototype.abort = function (transaction) {
  534. return this._transmit("ABORT", {
  535. transaction: transaction
  536. });
  537. };
  538. Client.prototype.ack = function (messageID, subscription, headers) {
  539. if (headers == null) {
  540. headers = {};
  541. }
  542. headers["message-id"] = messageID;
  543. headers.subscription = subscription;
  544. return this._transmit("ACK", headers);
  545. };
  546. Client.prototype.nack = function (messageID, subscription, headers) {
  547. if (headers == null) {
  548. headers = {};
  549. }
  550. headers["message-id"] = messageID;
  551. headers.subscription = subscription;
  552. return this._transmit("NACK", headers);
  553. };
  554. return Client;
  555. }();
  556. Stomp = {
  557. VERSIONS: {
  558. V1_0: '1.0',
  559. V1_1: '1.1',
  560. V1_2: '1.2',
  561. supportedVersions: function supportedVersions() {
  562. return '1.1,1.0';
  563. }
  564. },
  565. client: function client(url, protocols) {
  566. var klass, ws;
  567. if (protocols == null) {
  568. protocols = ['v10.stomp', 'v11.stomp'];
  569. }
  570. klass = Stomp.WebSocketClass || WebSocket;
  571. ws = new klass(url, protocols);
  572. return new Client(ws);
  573. },
  574. over: function over(ws) {
  575. return new Client(ws);
  576. },
  577. Frame: Frame
  578. };
  579. if ( true && exports !== null) {
  580. exports.Stomp = Stomp;
  581. }
  582. if (typeof window !== "undefined" && window !== null) {
  583. Stomp.setInterval = function (interval, f) {
  584. return window.setInterval(f, interval);
  585. };
  586. Stomp.clearInterval = function (id) {
  587. return window.clearInterval(id);
  588. };
  589. window.Stomp = Stomp;
  590. } else if (!exports) {
  591. self.Stomp = Stomp;
  592. }
  593. }).call(this);
  594. /***/ }),
  595. /***/ 96:
  596. /*!*********************************************************************************!*\
  597. !*** D:/project/新医院随访2023/follow_applet/node_modules/stompjs/lib/stomp-node.js ***!
  598. \*********************************************************************************/
  599. /*! no static exports found */
  600. /***/ (function(module, exports, __webpack_require__) {
  601. // Generated by CoffeeScript 1.7.1
  602. /*
  603. Stomp Over WebSocket http://www.jmesnil.net/stomp-websocket/doc/ | Apache License V2.0
  604. Copyright (C) 2013 [Jeff Mesnil](http://jmesnil.net/)
  605. */
  606. (function () {
  607. var Stomp, net, overTCP, overWS, wrapTCP, wrapWS;
  608. Stomp = __webpack_require__(/*! ./stomp */ 95);
  609. net = __webpack_require__(/*! net */ 97);
  610. Stomp.Stomp.setInterval = function (interval, f) {
  611. return setInterval(f, interval);
  612. };
  613. Stomp.Stomp.clearInterval = function (id) {
  614. return clearInterval(id);
  615. };
  616. wrapTCP = function wrapTCP(port, host) {
  617. var socket, ws;
  618. socket = null;
  619. ws = {
  620. url: 'tcp:// ' + host + ':' + port,
  621. send: function send(d) {
  622. return socket.write(d);
  623. },
  624. close: function close() {
  625. return socket.end();
  626. }
  627. };
  628. socket = net.connect(port, host, function (e) {
  629. return ws.onopen();
  630. });
  631. socket.on('error', function (e) {
  632. return typeof ws.onclose === "function" ? ws.onclose(e) : void 0;
  633. });
  634. socket.on('close', function (e) {
  635. return typeof ws.onclose === "function" ? ws.onclose(e) : void 0;
  636. });
  637. socket.on('data', function (data) {
  638. var event;
  639. event = {
  640. 'data': data.toString()
  641. };
  642. return ws.onmessage(event);
  643. });
  644. return ws;
  645. };
  646. wrapWS = function wrapWS(url) {
  647. var WebSocketClient, connection, socket, ws;
  648. WebSocketClient = __webpack_require__(/*! websocket */ 98).client;
  649. connection = null;
  650. ws = {
  651. url: url,
  652. send: function send(d) {
  653. return connection.sendUTF(d);
  654. },
  655. close: function close() {
  656. return connection.close();
  657. }
  658. };
  659. socket = new WebSocketClient();
  660. socket.on('connect', function (conn) {
  661. connection = conn;
  662. ws.onopen();
  663. connection.on('error', function (error) {
  664. return typeof ws.onclose === "function" ? ws.onclose(error) : void 0;
  665. });
  666. connection.on('close', function () {
  667. return typeof ws.onclose === "function" ? ws.onclose() : void 0;
  668. });
  669. return connection.on('message', function (message) {
  670. var event;
  671. if (message.type === 'utf8') {
  672. event = {
  673. 'data': message.utf8Data
  674. };
  675. return ws.onmessage(event);
  676. }
  677. });
  678. });
  679. socket.connect(url);
  680. return ws;
  681. };
  682. overTCP = function overTCP(host, port) {
  683. var socket;
  684. socket = wrapTCP(port, host);
  685. return Stomp.Stomp.over(socket);
  686. };
  687. overWS = function overWS(url) {
  688. var socket;
  689. socket = wrapWS(url);
  690. return Stomp.Stomp.over(socket);
  691. };
  692. exports.overTCP = overTCP;
  693. exports.overWS = overWS;
  694. }).call(this);
  695. /***/ }),
  696. /***/ 97:
  697. /*!******************************************************!*\
  698. !*** ./node_modules/node-libs-browser/mock/empty.js ***!
  699. \******************************************************/
  700. /*! no static exports found */
  701. /***/ (function(module, exports) {
  702. /***/ }),
  703. /***/ 98:
  704. /*!********************************************************************************!*\
  705. !*** D:/project/新医院随访2023/follow_applet/node_modules/websocket/lib/browser.js ***!
  706. \********************************************************************************/
  707. /*! no static exports found */
  708. /***/ (function(module, exports, __webpack_require__) {
  709. var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  710. var _globalThis;
  711. if ((typeof globalThis === "undefined" ? "undefined" : _typeof(globalThis)) === 'object') {
  712. _globalThis = globalThis;
  713. } else {
  714. try {
  715. _globalThis = __webpack_require__(/*! es5-ext/global */ 99);
  716. } catch (error) {} finally {
  717. if (!_globalThis && typeof window !== 'undefined') {
  718. _globalThis = window;
  719. }
  720. if (!_globalThis) {
  721. throw new Error('Could not determine global this');
  722. }
  723. }
  724. }
  725. var NativeWebSocket = _globalThis.WebSocket || _globalThis.MozWebSocket;
  726. var websocket_version = __webpack_require__(/*! ./version */ 100);
  727. /**
  728. * Expose a W3C WebSocket class with just one or two arguments.
  729. */
  730. function W3CWebSocket(uri, protocols) {
  731. var native_instance;
  732. if (protocols) {
  733. native_instance = new NativeWebSocket(uri, protocols);
  734. } else {
  735. native_instance = new NativeWebSocket(uri);
  736. }
  737. /**
  738. * 'native_instance' is an instance of nativeWebSocket (the browser's WebSocket
  739. * class). Since it is an Object it will be returned as it is when creating an
  740. * instance of W3CWebSocket via 'new W3CWebSocket()'.
  741. *
  742. * ECMAScript 5: http://bclary.com/2004/11/07/#a-13.2.2
  743. */
  744. return native_instance;
  745. }
  746. if (NativeWebSocket) {
  747. ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'].forEach(function (prop) {
  748. Object.defineProperty(W3CWebSocket, prop, {
  749. get: function get() {
  750. return NativeWebSocket[prop];
  751. }
  752. });
  753. });
  754. }
  755. /**
  756. * Module exports.
  757. */
  758. module.exports = {
  759. 'w3cwebsocket': NativeWebSocket ? W3CWebSocket : null,
  760. 'version': websocket_version
  761. };
  762. /***/ }),
  763. /***/ 99:
  764. /*!*************************************************************************!*\
  765. !*** D:/project/新医院随访2023/follow_applet/node_modules/es5-ext/global.js ***!
  766. \*************************************************************************/
  767. /*! no static exports found */
  768. /***/ (function(module, exports, __webpack_require__) {
  769. var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  770. var naiveFallback = function naiveFallback() {
  771. if ((typeof self === "undefined" ? "undefined" : _typeof(self)) === "object" && self) return self;
  772. if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" && window) return window;
  773. throw new Error("Unable to resolve global `this`");
  774. };
  775. module.exports = function () {
  776. if (this) return this;
  777. // Unexpected strict mode (may happen if e.g. bundled into ESM module)
  778. // Fallback to standard globalThis if available
  779. if ((typeof globalThis === "undefined" ? "undefined" : _typeof(globalThis)) === "object" && globalThis) return globalThis;
  780. // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis
  781. // In all ES5+ engines global object inherits from Object.prototype
  782. // (if you approached one that doesn't please report)
  783. try {
  784. Object.defineProperty(Object.prototype, "__global__", {
  785. get: function get() {
  786. return this;
  787. },
  788. configurable: true
  789. });
  790. } catch (error) {
  791. // Unfortunate case of updates to Object.prototype being restricted
  792. // via preventExtensions, seal or freeze
  793. return naiveFallback();
  794. }
  795. try {
  796. // Safari case (window.__global__ works, but __global__ does not)
  797. if (!__global__) return naiveFallback();
  798. return __global__;
  799. } finally {
  800. delete Object.prototype.__global__;
  801. }
  802. }();
  803. /***/ })
  804. }]);
  805. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pagesHome/common/vendor.js.map