diff --git a/pages/index/index.vue b/pages/index/index.vue index b3e08a3..e83ea64 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -52,6 +52,8 @@ }, data() { return { + wssType: 'nongye', // 网络连接类型 + avatarType: "/static/icon/ny.png", // AI头像类型 talkList: [], ajax: { rows: 15, //每页数量 @@ -316,7 +318,7 @@ "id": new Date().getTime(), "content": '', "type": 2, - "pic": "/static/icon/ny.png" + "pic": this.avatarType }); this.n_content = ''; this.c_content = ''; @@ -339,7 +341,7 @@ let realThis = this; this.socketTask = uni.connectSocket({ //url: encodeURI(encodeURI(myUrl).replace(/\+/g, '%2B')), - url: `wss://chat.lihaink.cn/chat?type=农业咨询×tamp=${Date.now()}`, + url: `wss://chat.lihaink.cn/chat?type=${this.wssType}×tamp=${Date.now()}`, method: 'GET', token: '', success: res => { diff --git a/unpackage/dist/dev/app-plus/app-config-service.js b/unpackage/dist/dev/app-plus/app-config-service.js index 02db4d8..6280a94 100644 --- a/unpackage/dist/dev/app-plus/app-config-service.js +++ b/unpackage/dist/dev/app-plus/app-config-service.js @@ -1,8 +1,8 @@ var isReady=false;var onReadyCallbacks=[]; var isServiceReady=false;var onServiceReadyCallbacks=[]; -var __uniConfig = {"pages":["pages/index/index","pages/index/chat"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"人工智能","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"xunfeiAi","compilerVersion":"3.8.12","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}}; -var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true},"window":{"navigationBarTitleText":"讯飞AI","bounce":"none"}},{"path":"/pages/index/chat","meta":{},"window":{"navigationBarTitleText":"讯飞星火","bounce":"none"}}]; +var __uniConfig = {"pages":["pages/index/index"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"人工智能","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"农业咨询","compilerVersion":"3.8.12","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}}; +var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true},"window":{"navigationBarTitleText":"农业咨询","bounce":"none"}}]; __uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}}); __uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}}); service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}}); diff --git a/unpackage/dist/dev/app-plus/app-service.js b/unpackage/dist/dev/app-plus/app-service.js index 9b20895..6c6f8ea 100644 --- a/unpackage/dist/dev/app-plus/app-service.js +++ b/unpackage/dist/dev/app-plus/app-service.js @@ -7,7 +7,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 1);\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 2));\n__webpack_require__(/*! uni-pages */ 6);\nvar _App = _interopRequireDefault(__webpack_require__(/*! ./App */ 213));\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 216));\n__webpack_require__(/*! ./uni.promisify.adaptor */ 217);\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n_vue.default.config.productionTip = false;\n_App.default.mpType = 'app';\nvar app = new _vue.default(_objectSpread({}, _App.default));\napp.$mount();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVuaS1hcHA6Ly8vbWFpbi5qcyJdLCJuYW1lcyI6WyJWdWUiLCJjb25maWciLCJwcm9kdWN0aW9uVGlwIiwiQXBwIiwibXBUeXBlIiwiYXBwIiwiJG1vdW50Il0sIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFBbUI7QUFHbkI7QUFDQTtBQUFnQztBQUFBO0FBQ2hDQSxZQUFHLENBQUNDLE1BQU0sQ0FBQ0MsYUFBYSxHQUFHLEtBQUs7QUFDaENDLFlBQUcsQ0FBQ0MsTUFBTSxHQUFHLEtBQUs7QUFDbEIsSUFBTUMsR0FBRyxHQUFHLElBQUlMLFlBQUcsbUJBQ2RHLFlBQUcsRUFDTjtBQUNGRSxHQUFHLENBQUNDLE1BQU0sRUFBRSIsImZpbGUiOiIwLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICd1bmktcGFnZXMnO2ltcG9ydCBBcHAgZnJvbSAnLi9BcHAnXG5cblxuaW1wb3J0IFZ1ZSBmcm9tICd2dWUnXG5pbXBvcnQgJy4vdW5pLnByb21pc2lmeS5hZGFwdG9yJ1xuVnVlLmNvbmZpZy5wcm9kdWN0aW9uVGlwID0gZmFsc2VcbkFwcC5tcFR5cGUgPSAnYXBwJ1xuY29uc3QgYXBwID0gbmV3IFZ1ZSh7XG4gIC4uLkFwcFxufSlcbmFwcC4kbW91bnQoKVxuXG5cblxuXG5cblxuXG5cblxuXG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///0\n"); +eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 1);\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 2));\n__webpack_require__(/*! uni-pages */ 6);\nvar _App = _interopRequireDefault(__webpack_require__(/*! ./App */ 208));\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 211));\n__webpack_require__(/*! ./uni.promisify.adaptor */ 212);\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n_vue.default.config.productionTip = false;\n_App.default.mpType = 'app';\nvar app = new _vue.default(_objectSpread({}, _App.default));\napp.$mount();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVuaS1hcHA6Ly8vbWFpbi5qcyJdLCJuYW1lcyI6WyJWdWUiLCJjb25maWciLCJwcm9kdWN0aW9uVGlwIiwiQXBwIiwibXBUeXBlIiwiYXBwIiwiJG1vdW50Il0sIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFBbUI7QUFHbkI7QUFDQTtBQUFnQztBQUFBO0FBQ2hDQSxZQUFHLENBQUNDLE1BQU0sQ0FBQ0MsYUFBYSxHQUFHLEtBQUs7QUFDaENDLFlBQUcsQ0FBQ0MsTUFBTSxHQUFHLEtBQUs7QUFDbEIsSUFBTUMsR0FBRyxHQUFHLElBQUlMLFlBQUcsbUJBQ2RHLFlBQUcsRUFDTjtBQUNGRSxHQUFHLENBQUNDLE1BQU0sRUFBRSIsImZpbGUiOiIwLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICd1bmktcGFnZXMnO2ltcG9ydCBBcHAgZnJvbSAnLi9BcHAnXG5cblxuaW1wb3J0IFZ1ZSBmcm9tICd2dWUnXG5pbXBvcnQgJy4vdW5pLnByb21pc2lmeS5hZGFwdG9yJ1xuVnVlLmNvbmZpZy5wcm9kdWN0aW9uVGlwID0gZmFsc2VcbkFwcC5tcFR5cGUgPSAnYXBwJ1xuY29uc3QgYXBwID0gbmV3IFZ1ZSh7XG4gIC4uLkFwcFxufSlcbmFwcC4kbW91bnQoKVxuXG5cblxuXG5cblxuXG5cblxuXG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///0\n"); /***/ }), /* 1 */ @@ -148,9 +148,6 @@ if (uni.restoreGlobal) { __definePage('pages/index/index', function () { return Vue.extend(__webpack_require__(/*! pages/index/index.vue?mpType=page */ 7).default); }); -__definePage('pages/index/chat', function () { - return Vue.extend(__webpack_require__(/*! pages/index/chat.vue?mpType=page */ 208).default); -}); /***/ }), /* 7 */ @@ -293,7 +290,11 @@ var render = function () { _c("image", { staticClass: _vm._$s("7-" + $30, "sc", "pic"), attrs: { - src: _vm._$s("7-" + $30, "a-src", item.pic), + src: _vm._$s( + "7-" + $30, + "a-src", + item.type == 1 ? _vm.avatar : item.pic + ), _i: "7-" + $30, }, }), @@ -1057,7 +1058,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _HBu /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("/* WEBPACK VAR INJECTION */(function(__f__) {\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 1);\nvar _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 4);\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 33));\nvar _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 22));\nvar _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 35));\nvar base64 = _interopRequireWildcard(__webpack_require__(/*! base-64 */ 36));\nvar _cryptoJs = _interopRequireDefault(__webpack_require__(/*! ../../static/crypto-js/crypto-js.js */ 40));\nvar _parser = _interopRequireDefault(__webpack_require__(/*! ../../static/fast-xml-parser/src/parser */ 198));\nvar utf8 = _interopRequireWildcard(__webpack_require__(/*! utf8 */ 207));\nvar _bingMath = _interopRequireDefault(__webpack_require__(/*! @/components/bing-math/bing-math.vue */ 10));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n components: {\n 'bing-math': _bingMath.default\n },\n data: function data() {\n return {\n talkList: [],\n ajax: {\n rows: 15,\n //每页数量\n page: 1,\n //页码\n flag: false,\n // 请求开关\n loading: false,\n // 加载中\n loadText: '正在获取消息'\n },\n keyboardHeight: 0,\n showplc: true,\n content: '',\n c_content: '',\n n_content: '',\n params: [],\n // 发送的消息内容\n timer: '',\n socketTask: {},\n TEXT: '',\n historyTextList: [],\n // 历史会话信息,由于最大token12000,可以结合实际使用,进行移出\n tempRes: '',\n // 临时答复保存\n socketing: false,\n // 是否正在接收\n showStop: false,\n // 是否显示中断按钮\n scrollTop: 0,\n shouldScrollToBottom: true\n };\n },\n mounted: function mounted() {\n var _this = this;\n this.$nextTick(function () {\n _this.getHistoryMsg();\n });\n uni.onKeyboardHeightChange(function (e) {\n var h = _this.keyboardHeight;\n _this.keyboardHeight = e.height;\n _this.$nextTick(function () {\n setTimeout(function () {\n uni.pageScrollTo({\n scrollTop: 9999999,\n // 当前位置向下滚动\n duration: 300 // 滚动过渡时间为300ms,默认值为300ms\n });\n }, 0);\n });\n });\n },\n beforeDestroy: function beforeDestroy() {\n uni.offKeyboardHeightChange();\n },\n onPageScroll: function onPageScroll(e) {\n if (e.scrollTop < 5) {\n this.getHistoryMsg();\n }\n },\n watch: {\n n_content: function n_content(n, o) {\n var _this2 = this;\n // this.c_content = n;\n if (this.timer) clearInterval(this.timer);\n var cl = this.c_content.length;\n var nc = this.n_content.split('');\n this.timer = setInterval(function () {\n if (cl < nc.length) {\n _this2.c_content += nc[cl];\n cl++;\n if (cl % 6 == 0) _this2.$nextTick(function () {\n uni.pageScrollTo({\n scrollTop: 999999\n });\n });\n } else {\n // console.log(this.socketing==false, cl == nc.length);\n if (_this2.socketing == false) _this2.showStop = false;\n clearInterval(_this2.timer);\n _this2.$nextTick(function () {\n uni.pageScrollTo({\n scrollTop: 9999999\n });\n });\n }\n }, 60);\n }\n },\n methods: {\n copyText: function copyText(str) {\n uni.setClipboardData({\n data: str,\n success: function success() {\n uni.showToast({\n icon: 'none',\n title: '复制成功'\n });\n }\n });\n },\n // 获取历史消息\n getHistoryMsg: function getHistoryMsg() {\n var _this3 = this;\n return;\n if (this.ajax.flag) {\n return; //\n }\n\n var get = /*#__PURE__*/function () {\n var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {\n var data, selector;\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _this3.hideLoadTips();\n _this3.ajax.flag = false;\n _context.next = 4;\n return _this3.joinHistoryMsg();\n case 4:\n data = _context.sent;\n __f__(\"log\", '----- 模拟数据格式,供参考 -----', \" at pages/index/index.vue:159\");\n __f__(\"log\", data, \" at pages/index/index.vue:160\"); // 查看请求返回的数据结构 \n\n // 获取待滚动元素选择器,解决插入数据后,滚动条定位时使用\n selector = '';\n if (_this3.ajax.page > 1) {\n // 非第一页,则取历史消息数据的第一条信息元素\n selector = \"#msg-\".concat(_this3.talkList[0].id);\n } else {\n // 第一页,则取当前消息数据的最后一条信息元素\n selector = \"#msg-\".concat(data[data.length - 1].id);\n }\n\n // 将获取到的消息数据合并到消息数组中\n _this3.talkList = [].concat((0, _toConsumableArray2.default)(data), (0, _toConsumableArray2.default)(_this3.talkList));\n\n // 数据挂载后执行,不懂的请自行阅读 Vue.js 文档对 Vue.nextTick 函数说明。\n _this3.$nextTick(function () {\n // 设置当前滚动的位置\n _this3.setPageScrollTo(selector);\n _this3.hideLoadTips(true);\n if (data.length < _this3.ajax.rows) {\n // 当前消息数据条数小于请求要求条数时,则无更多消息,不再允许请求。\n // 可在此处编写无更多消息数据时的逻辑\n } else {\n _this3.ajax.page++;\n\n // 延迟 200ms ,以保证设置窗口滚动已完成\n setTimeout(function () {\n _this3.ajax.flag = true;\n }, 200);\n }\n });\n case 11:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return function get() {\n return _ref.apply(this, arguments);\n };\n }();\n get();\n },\n // 拼接历史记录消息\n joinHistoryMsg: function joinHistoryMsg() {\n var _this4 = this;\n var join = function join() {\n var arr = [];\n\n //通过当前页码及页数,模拟数据内容\n var startIndex = (_this4.ajax.page - 1) * _this4.ajax.rows;\n var endIndex = startIndex + _this4.ajax.rows;\n for (var i = startIndex; i < endIndex; i++) {\n arr.push({\n \"id\": i,\n // 消息的ID\n \"content\": \"\\u8FD9\\u662F\\u5386\\u53F2\\u8BB0\\u5F55\\u7684\\u7B2C\".concat(i + 1, \"\\u6761\\u6D88\\u606F\"),\n // 消息内容\n \"type\": Math.random() > 0.5 ? 1 : 0,\n // 此为消息类别,设 1 为发出去的消息,0 为收到对方的消息,\n \"pic\": \"/static/avatar.png\" // 头像\n });\n }\n\n /*\n \t颠倒数组中元素的顺序。将最新的数据排在本次接口返回数据的最后面。\n \t后端接口按 消息的时间降序查找出当前页的数据后,再将本页数据按消息时间降序排序返回。\n \t这是数据的重点,因为页面滚动条和上拉加载历史的问题。\n */\n arr.reverse();\n return arr;\n };\n\n // 此处用到 ES6 的 Promise 知识,不懂的请自行学习。\n return new Promise(function (done, fail) {\n // 无数据请求接口,由 setTimeout 模拟,正式项目替换为 ajax 即可。\n setTimeout(function () {\n var data = join();\n done(data);\n }, 1500);\n });\n },\n focus: function focus() {\n // this.$nextTick(()=>{\n // setTimeout(()=>{\n // uni.pageScrollTo({\n // scrollTop: 9999999, // 当前位置向下滚动\n // duration: 300 // 滚动过渡时间为300ms,默认值为300ms\n // });\n // }, 0)\n // })\n },\n // 设置页面滚动位置\n setPageScrollTo: function setPageScrollTo(selector) {\n var view = uni.createSelectorQuery().in(this).select(selector);\n view.boundingClientRect(function (res) {\n uni.pageScrollTo({\n scrollTop: res.top - 30,\n // -30 为多显示出大半个消息的高度,示意上面还有信息。\n duration: 0\n });\n }).exec();\n },\n // 隐藏加载提示\n hideLoadTips: function hideLoadTips(flag) {\n var _this5 = this;\n if (flag) {\n this.ajax.loadText = '消息获取成功';\n setTimeout(function () {\n _this5.ajax.loading = false;\n }, 300);\n } else {\n this.ajax.loading = true;\n this.ajax.loadText = '正在获取消息';\n }\n },\n // 关闭连接\n closeSocketTask: function closeSocketTask() {\n var _this6 = this;\n try {\n clearInterval(this.timer);\n this.talkList[this.talkList.length - 1].content = this.c_content + '';\n // console.log(this.talkList[this.talkList.length - 1].content);\n // this.c_content = '';\n // this.n_content = '';\n this.socketTask.close({\n code: 500,\n // APP端存在BUG,正常关闭的code为1000,无法正常关闭,需要将code换为其他值\n complete: function complete(res) {\n _this6.showStop = false;\n __f__(\"log\", '主动断开', res, \" at pages/index/index.vue:279\");\n _this6.wsLiveFlag = false;\n }\n });\n } catch (e) {\n //TODO handle the exception\n }\n },\n // 发送信息\n send: function send() {\n var _this7 = this;\n if (!this.content) {\n uni.showToast({\n title: '请输入有效的内容',\n icon: 'none'\n });\n return;\n }\n this.showStop = true;\n // 将当前发送信息 添加到消息列表。\n var data = {\n \"id\": new Date().getTime(),\n \"content\": this.content,\n \"type\": 1,\n \"pic\": \"/static/avatar.png\"\n };\n this.TEXT = this.content;\n this.talkList.push(data);\n this.talkList.push({\n \"id\": new Date().getTime(),\n \"content\": '',\n \"type\": 2,\n \"pic\": \"/static/avatar.png\"\n });\n this.n_content = '';\n this.c_content = '';\n this.socketing = true;\n // return ;\n this.$nextTick(function () {\n // 清空内容框中的内容\n _this7.content = '';\n // uni.pageScrollTo({\n // scrollTop: 999999, // 设置一个超大值,以保证滚动条滚动到底部\n // duration: 0\n // });\n });\n\n this.sendToSpark();\n },\n sendToSpark: function sendToSpark() {\n var _this8 = this;\n return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {\n var realThis;\n return _regenerator.default.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n // let myUrl = await this.getWebSocketUrl();\n _this8.tempRes = \"\";\n realThis = _this8;\n _this8.socketTask = uni.connectSocket({\n //url: encodeURI(encodeURI(myUrl).replace(/\\+/g, '%2B')),\n url: 'wss://chat.lihaink.cn/chat' + '?timestamp=' + Date.now(),\n method: 'GET',\n success: function success(res) {\n __f__(\"log\", res, \"ws成功连接...\", \" at pages/index/index.vue:336\");\n realThis.wsLiveFlag = true;\n }\n });\n realThis.socketTask.onError(function (res) {\n __f__(\"log\", \"连接发生错误,请检查appid是否填写\", res, \" at pages/index/index.vue:341\");\n });\n realThis.socketTask.onOpen(function (res) {\n _this8.historyTextList.push({\n \"role\": \"user\",\n \"content\": _this8.TEXT\n });\n // 第一帧..........................................\n __f__(\"log\", '连接成功...', \" at pages/index/index.vue:349\");\n // let params = {\n // \"header\": {\n // \"app_id\": this.APPID,\n // \"uid\": \"aef9f963-7\"\n // },\n // \"parameter\": {\n // \"chat\": {\n // \"domain\": \"generalv2\",\n // \"temperature\": 0.5,\n // \"max_tokens\": 1024\n // }\n // },\n // \"payload\": {\n // \"message\": {\n // \"text\": this.historyTextList\n // }\n // }\n // };\n if (_this8.historyTextList.length > 9) _this8.params = JSON.parse(JSON.stringify(_this8.historyTextList.splice(-9)));else _this8.params = JSON.parse(JSON.stringify(_this8.historyTextList));\n _this8.isSurpass();\n realThis.socketTask.send({\n // 发送消息,,都用uni的官方版本\n data: JSON.stringify(_this8.params),\n success: function success() {\n __f__(\"log\", '第一帧发送成功', \" at pages/index/index.vue:375\");\n }\n });\n });\n\n // 接受到消息时\n realThis.socketTask.onMessage(function (res) {\n __f__(\"log\", '收到API返回的内容:', res.data, \" at pages/index/index.vue:382\");\n var obj = JSON.parse(res.data);\n // console.log(\"我打印的\"+obj.payload);\n if (!realThis.wsLiveFlag) return;\n var dataArray = obj.payload.choices.text;\n for (var i = 0; i < dataArray.length; i++) {\n _this8.talkList[_this8.talkList.length - 1].content += dataArray[i].content;\n _this8.n_content = _this8.talkList[_this8.talkList.length - 1].content;\n realThis.tempRes = realThis.tempRes + dataArray[i].content;\n }\n var temp = JSON.parse(res.data);\n // console.log(\"0726\",temp.header.code)\n if (temp.header.code !== 0) {\n _this8.socketing = false;\n __f__(\"log\", \"\".concat(temp.header.code, \":\").concat(temp.message), \" at pages/index/index.vue:396\");\n realThis.socketTask.close({\n success: function success(res) {\n __f__(\"log\", '关闭成功', res, \" at pages/index/index.vue:399\");\n realThis.wsLiveFlag = false;\n },\n fail: function fail(err) {\n __f__(\"log\", '关闭失败', err, \" at pages/index/index.vue:403\");\n }\n });\n }\n if (temp.header.code === 0) {\n if (res.data && temp.header.status === 2) {\n _this8.socketing = false;\n _this8.historyTextList.push({\n \"role\": \"assistant\",\n \"content\": _this8.tempRes\n });\n setTimeout(function () {\n realThis.socketTask.close({\n success: function success(res) {\n __f__(\"log\", '关闭成功', res, \" at pages/index/index.vue:417\");\n realThis.wsLiveFlag = false;\n },\n fail: function fail(err) {\n // console.log('关闭失败', err)\n }\n });\n }, 1000);\n }\n }\n });\n case 6:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }))();\n },\n // 判断文字是否超过五千字\n isSurpass: function isSurpass() {\n var sum = this.params.reduce(function (accumulator, currentValue) {\n return accumulator + currentValue.content;\n }, '');\n if (sum.length > 5000) {\n this.params.shift();\n return this.isSurpass();\n } else {\n __f__(\"log\", \"\\u672C\\u6B21\\u53D1\\u9001\".concat(sum.length, \"\\u5B57\"), \" at pages/index/index.vue:438\");\n return sum;\n }\n },\n // 鉴权\n getWebSocketUrl: function getWebSocketUrl() {\n var _this9 = this;\n return new Promise(function (resolve, reject) {\n // https://spark-api.xf-yun.com/v1.1/chat V1.5 domain general\n // https://spark-api.xf-yun.com/v2.1/chat V2.0 domain generalv2\n var url = \"wss://spark-api.xf-yun.com/v2.1/chat\";\n var host = \"spark-api.xf-yun.com\";\n var apiKeyName = \"api_key\";\n var date = new Date().toGMTString();\n var algorithm = \"hmac-sha256\";\n var headers = \"host date request-line\";\n var signatureOrigin = \"host: \".concat(host, \"\\ndate: \").concat(date, \"\\nGET /v2.1/chat HTTP/1.1\");\n var signatureSha = _cryptoJs.default.HmacSHA256(signatureOrigin, _this9.APISecret);\n var signature = _cryptoJs.default.enc.Base64.stringify(signatureSha);\n var authorizationOrigin = \"\".concat(apiKeyName, \"=\\\"\").concat(_this9.APIKey, \"\\\", algorithm=\\\"\").concat(algorithm, \"\\\", headers=\\\"\").concat(headers, \"\\\", signature=\\\"\").concat(signature, \"\\\"\");\n var authorization = base64.encode(authorizationOrigin);\n url = \"\".concat(url, \"?authorization=\").concat(authorization, \"&date=\").concat(encodeURI(date), \"&host=\").concat(host);\n\n // console.log(url)\n resolve(url);\n });\n },\n // 滚动到头部\n bindScroll: function bindScroll() {\n if (this.userId == 0) {\n this.getHistory();\n this.getproductInfo();\n this.getOrderInfo();\n this.getRefundDetail();\n this.getStoreDetail();\n } else {\n this.getMerHistory();\n }\n },\n // 当滑动页面时,收起键盘,与微信聊天效果保持一致\n touchmove: function touchmove(e) {\n uni.hideKeyboard();\n }\n }\n};\nexports.default = _default;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/lib/format-log.js */ 21)[\"default\"]))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVuaS1hcHA6Ly8vcGFnZXMvaW5kZXgvaW5kZXgudnVlIl0sIm5hbWVzIjpbImNvbXBvbmVudHMiLCJkYXRhIiwidGFsa0xpc3QiLCJhamF4Iiwicm93cyIsInBhZ2UiLCJmbGFnIiwibG9hZGluZyIsImxvYWRUZXh0Iiwia2V5Ym9hcmRIZWlnaHQiLCJzaG93cGxjIiwiY29udGVudCIsImNfY29udGVudCIsIm5fY29udGVudCIsInBhcmFtcyIsInRpbWVyIiwic29ja2V0VGFzayIsIlRFWFQiLCJoaXN0b3J5VGV4dExpc3QiLCJ0ZW1wUmVzIiwic29ja2V0aW5nIiwic2hvd1N0b3AiLCJzY3JvbGxUb3AiLCJzaG91bGRTY3JvbGxUb0JvdHRvbSIsIm1vdW50ZWQiLCJ1bmkiLCJzZXRUaW1lb3V0IiwiZHVyYXRpb24iLCJiZWZvcmVEZXN0cm95Iiwib25QYWdlU2Nyb2xsIiwid2F0Y2giLCJjbCIsImNsZWFySW50ZXJ2YWwiLCJtZXRob2RzIiwiY29weVRleHQiLCJzdWNjZXNzIiwiaWNvbiIsInRpdGxlIiwiZ2V0SGlzdG9yeU1zZyIsInNlbGVjdG9yIiwiZ2V0Iiwiam9pbkhpc3RvcnlNc2ciLCJhcnIiLCJkb25lIiwiZm9jdXMiLCJzZXRQYWdlU2Nyb2xsVG8iLCJ2aWV3IiwiaGlkZUxvYWRUaXB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XN0cm95KCkge1xyXG4gICAgICAvLyAjaWZkZWYgQVBQLVBMVVNcclxuICAgICAgdW5pLm9mZktleWJvYXJkSGVpZ2h0Q2hhbmdlKCk7XHJcbiAgICAgIC8vICNlbmRpZlxyXG4gICAgfSxcclxuICAgIG9uUGFnZVNjcm9sbChlKSB7XHJcbiAgICAgIGlmIChlLnNjcm9sbFRvcCA8IDUpIHtcclxuICAgICAgICB0aGlzLmdldEhpc3RvcnlNc2coKTtcclxuICAgICAgfVxyXG4gICAgfSxcclxuICAgIHdhdGNoOiB7XHJcbiAgICAgIG5fY29udGVudChuLCBvKSB7XHJcbiAgICAgICAgLy8gdGhpcy5jX2NvbnRlbnQgPSBuO1xyXG4gICAgICAgIGlmICh0aGlzLnRpbWVyKSBjbGVhckludGVydmFsKHRoaXMudGltZXIpO1xyXG4gICAgICAgIGxldCBjbCA9IHRoaXMuY19jb250ZW50Lmxlbmd0aDtcclxuICAgICAgICBsZXQgbmMgPSB0aGlzLm5fY29udGVudC5zcGxpdCgnJyk7XHJcbiAgICAgICAgdGhpcy50aW1lciA9IHNldEludGVydmFsKCgpID0+IHtcclxuICAgICAgICAgIGlmIChjbCA8IG5jLmxlbmd0aCkge1xyXG4gICAgICAgICAgICB0aGlzLmNfY29udGVudCArPSBuY1tjbF07XHJcbiAgICAgICAgICAgIGNsKys7XHJcbiAgICAgICAgICAgIGlmIChjbCAlIDYgPT0gMCkgdGhpcy4kbmV4dFRpY2soKCkgPT4ge1xyXG4gICAgICAgICAgICAgIHVuaS5wYWdlU2Nyb2xsVG8oe1xyXG4gICAgICAgICAgICAgICAgc2Nyb2xsVG9wOiA5OTk5OTksXHJcbiAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgfSlcclxuICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIC8vIGNvbnNvbGUubG9nKHRoaXMuc29ja2V0aW5nPT1mYWxzZSwgY2wgPT0gbmMubGVuZ3RoKTtcclxuICAgICAgICAgICAgaWYgKHRoaXMuc29ja2V0aW5nID09IGZhbHNlKSB0aGlzLnNob3dTdG9wID0gZmFsc2U7XHJcbiAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGhpcy50aW1lcik7XHJcbiAgICAgICAgICAgIHRoaXMuJG5leHRUaWNrKCgpID0+IHtcclxuICAgICAgICAgICAgICB1bmkucGFnZVNjcm9sbFRvKHtcclxuICAgICAgICAgICAgICAgIHNjcm9sbFRvcDogOTk5OTk5OSxcclxuICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH0sIDYwKVxyXG4gICAgICB9LFxyXG4gICAgfSxcclxuICAgIG1ldGhvZHM6IHtcclxuICAgICAgY29weVRleHQoc3RyKSB7XHJcbiAgICAgICAgdW5pLnNldENsaXBib2FyZERhdGEoe1xyXG4gICAgICAgICAgZGF0YTogc3RyLFxyXG4gICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24oKSB7XHJcbiAgICAgICAgICAgIHVuaS5zaG93VG9hc3Qoe1xyXG4gICAgICAgICAgICAgIGljb246ICdub25lJyxcclxuICAgICAgICAgICAgICB0aXRsZTogJ+WkjeWItuaIkOWKnydcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICAgIH0sXHJcbiAgICAgIC8vIOiOt+WPluWOhuWPsua2iOaBr1xyXG4gICAgICBnZXRIaXN0b3J5TXNnKCkge1xyXG4gICAgICAgIHJldHVybjtcclxuICAgICAgICBpZiAodGhpcy5hamF4LmZsYWcpIHtcclxuICAgICAgICAgIHJldHVybjsgLy9cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGxldCBnZXQgPSBhc3luYyAoKSA9PiB7XHJcbiAgICAgICAgICB0aGlzLmhpZGVMb2FkVGlwcygpO1xyXG4gICAgICAgICAgdGhpcy5hamF4LmZsYWcgPSBmYWxzZTtcclxuICAgICAgICAgIGxldCBkYXRhID0gYXd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+ihjO+8jOS4jeaHgueahOivt+iHquihjOmYheivuyBWdWUuanMg5paH5qGj5a+5IFZ1ZS5uZXh0VGljayDlh73mlbDor7TmmI7jgIJcclxuICAgICAgICAgIHRoaXMuJG5leHRUaWNrKCgpID0+IHtcclxuICAgICAgICAgICAgLy8g6K6+572u5b2T5YmN5rua5Yqo55qE5L2N572uXHJcbiAgICAgICAgICAgIHRoaXMuc2V0UGFnZVNjcm9sbFRvKHNlbGVjdG9yKTtcclxuXHJcbiAgICAgICAgICAgIHRoaXMuaGlkZUxvYWRUaXBzKHRydWUpO1xyXG5cclxuICAgICAgICAgICAgaWYgKGRhdGEubGVuZ3RoIDwgdGhpcy5hamF4LnJvd3MpIHtcclxuICAgICAgICAgICAgICAvLyDlvZPliY3mtojmga/mlbDmja7mnaHmlbDlsI/kuo7or7fmsYLopoHmsYLmnaHmlbDml7bvvIzliJnml6Dmm7TlpJrmtojmga/vvIzkuI3lho3lhYHorrjor7fmsYLjgIJcclxuICAgICAgICAgICAgICAvLyDlj6/lnKjmraTlpITnvJblhpnml6Dmm7TlpJrmtojmga/mlbDmja7ml7bnmoTpgLvovpFcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICB0aGlzLmFqYXgucGFnZSsrO1xyXG5cclxuICAgICAgICAgICAgICAvLyDlu7bov58gMjAwbXMg77yM5Lul5L+d6K+B6K6+572u56qX5Y+j5rua5Yqo5bey5a6M5oiQXHJcbiAgICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmFqYXguZmxhZyA9IHRydWU7XHJcbiAgICAgICAgICAgICAgfSwgMjAwKVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgfSlcclxuICAgICAgICB9XHJcbiAgICAgICAgZ2V0KCk7XHJcbiAgICAgIH0sXHJcbiAgICAgIC8vIOaLvOaOpeWOhuWPsuiusOW9lea2iOaBr1xyXG4gICAgICBqb2luSGlzdG9yeU1zZygpIHtcclxuICAgICAgICBsZXQgam9pbiA9ICgpID0+IHtcclxuICAgICAgICAgIGxldCBhcnIgPSBbXTtcclxuXHJcbiAgICAgICAgICAvL+mAmui/h+W9k+WJjemhteeggeWPiumhteaVsO+8jOaooeaLn+aVsOaNruWGheWuuVxyXG4gICAgICAgICAgbGV0IHN0YXJ0SW5kZXggPSAodGhpcy5hamF4LnBhZ2UgLSAxKSAqIHRoaXMuYWpheC5yb3dzO1xyXG4gICAgICAgICAgbGV0IGVuZEluZGV4ID0gc3RhcnRJbmRleCArIHRoaXMuYWpheC5yb3dzO1xyXG4gICAgICAgICAgZm9yIChsZXQgaSA9IHN0YXJ0SW5kZXg7IGkgPCBlbmRJbmRleDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGFyci5wdXNoKHtcclxuICAgICAgICAgICAgICBcImlkXCI6IGksIC8vIOa2iOaBr+eahElEXHJcbiAgICAgICAgICAgICAgXCJjb250ZW50XCI6IGDov5nmmK/ljoblj7LorrDlvZXnmoTnrKwke2krMX3mnaHmtojmga9gLCAvLyDmtojmga/lhoXlrrlcclxuICAgICAgICAgICAgICBcInR5cGVcIjogTWF0aC5yYW5kb20oKSA+IDAuNSA/IDEgOiAwLCAvLyDmraTkuLrmtojmga/nsbvliKvvvIzorr4gMSDkuLrlj5Hlh7rljrvnmoTmtojmga/vvIwwIOS4uuaUtuWIsOWvueaWueeahOa2iOaBryxcclxuICAgICAgICAgICAgICBcInBpY1wiOiBcIi9zdGF0aWMvYXZhdGFyLnBuZ1wiIC8vIOWktOWDj1xyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgICAgfVxyXG5cclxuICAgICAgICAgIC8qXHJcbiAgICAgICAgICBcdOmioOWAkuaVsOe7hOS4reWFg+e0oOeahOmhuuW6j+OAguWwhuacgOaWsOeahOaVsOaNruaOkuWcqOacrOasoeaOpeWPo+i/lOWbnuaVsOaNrueahOacgOWQjumdouOAglxyXG4gICAgICAgICAgXHTlkI7nq6/mjqXlj6PmjIkg5raI5oGv55qE5pe26Ze06ZmN5bqP5p+l5om+5Ye65b2T5YmN6aG155qE5pWw5o2u5ZCO77yM5YaN5bCG5pys6aG15pWw5o2u5oyJ5raI5oGv5pe26Ze06ZmN5bqP5o6S5bqP6L+U5Zue44CCXHJcbiAgICAgICAgICBcdOi/meaYr+aVsOaNrueahOmHjeeCue+8jOWboOS4uumhtemdoua7muWKqOadoeWSjOS4iuaLieWKoOi9veWOhuWPsueahOmXrumimOOAglxyXG4gICAgICAgICAgICovXHJcbiAgICAgICAgICBhcnIucmV2ZXJzZSgpO1xyXG5cclxuICAgICAgICAgIHJldHVybiBhcnI7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyDmraTlpITnlKjliLAgRVM2IOeahCBQcm9taXNlIOefpeivhu+8jOS4jeaHgueahOivt+iHquihjOWtpuS5oOOAglxyXG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgoZG9uZSwgZmFpbCkgPT4ge1xyXG4gICAgICAgICAgLy8g5peg5pWw5o2u6K+35rGC5o6l5Y+j77yM55SxIHNldFRpbWVvdXQg5qih5ouf77yM5q2j5byP6aG555uu5pu/5o2i5Li6IGFqYXgg5Y2z5Y+v44CCXHJcbiAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcclxuICAgICAgICAgICAgbGV0IGRhdGEgPSBqb2luKCk7XHJcbiAgICAgICAgICAgIGRvbmUoZGF0YSk7XHJcbiAgICAgICAgICB9LCAxNTAwKTtcclxuICAgICAgICB9KVxyXG4gICAgICB9LFxyXG4gICAgICBmb2N1cygpIHtcclxuICAgICAgICAvLyB0aGlzLiRuZXh0VGljaygoKT0+e1xyXG4gICAgICAgIC8vICAgc2V0VGltZW91dCgoKT0+e1xyXG4gICAgICAgIC8vICAgICB1bmkucGFnZVNjcm9sbFRvKHtcclxuICAgICAgICAvLyAgICAgICBzY3JvbGxUb3A6IDk5OTk5OTksIC8vIOW9k+WJjeS9jee9ruWQkeS4i+a7muWKqFxyXG4gICAgICAgIC8vICAgICAgIGR1cmF0aW9uOiAzMDAgLy8g5rua5Yqo6L+H5rih5pe26Ze05Li6MzAwbXPvvIzpu5jorqTlgLzkuLozMDBtc1xyXG4gICAgICAgIC8vICAgICB9KTtcclxuICAgICAgICAvLyAgIH0sIDApXHJcbiAgICAgICAgLy8gfSlcclxuICAgICAgfSxcclxuICAgICAgLy8g6K6+572u6aG16Z2i5rua5Yqo5L2N572uXHJcbiAgICAgIHNldFBhZ2VTY3JvbGxUbyhzZWxlY3Rvcikge1xyXG4gICAgICAgIGxldCB2aWV3ID0gdW5pLmNyZWF0ZVNlbGVjdG9yUXVlcnkoKS5pbih0aGlzKS5zZWxlY3Qoc2VsZWN0b3IpO1xyXG4gICAgICAgIHZpZXcuYm91bmRpbmdDbGllbnRSZWN0KChyZXMpID0+IHtcclxuICAgICAgICAgIHVuaS5wYWdlU2Nyb2xsVG8oe1xyXG4gICAgICAgICAgICBzY3JvbGxUb3A6IHJlcy50b3AgLSAzMCwgLy8gLTMwIOS4uuWkmuaYvuekuuWHuuWkp+WNiuS4qua2iOaBr+eahOmrmOW6pu+8jOekuuaEj+S4iumdoui/mOacieS/oeaBr+OAglxyXG4gICAgICAgICAgICBkdXJhdGlvbjogMFxyXG4gICAgICAgICAgfSk7XHJcbiAgICAgICAgfSkuZXhlYygpO1xyXG4gICAgICB9LFxyXG4gICAgICAvLyDpmpDol4/liqDovb3mj5DnpLpcclxuICAgICAgaGlkZUxvYWRUaXBzKGZsYWcpIHtcclxuICAgICAgICBpZiAoZmxhZykge1xyXG4gICAgICAgICAgdGhpcy5hamF4LmxvYWRUZXh0ID0gJ+a2iOaBr+iOt+WPluaIkOWKnyc7XHJcbiAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcclxuICAgICAgICAgICAgdGhpcy5hamF4LmxvYWRpbmcgPSBmYWxzZTtcclxuICAgICAgICAgIH0sIDMwMCk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgIHRoaXMuYWpheC5sb2FkaW5nID0gdHJ1ZTtcclxuICAgICAgICAgIHRoaXMuYWpheC5sb2FkVGV4dCA9ICfmraPlnKjojrflj5bmtojmga8nO1xyXG4gICAgICAgIH1cclxuICAgICAgfSxcclxuICAgICAgLy8g5YWz6Zet6L+e5o6lXHJcbiAgICAgIGNsb3NlU29ja2V0VGFzaygpIHtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aGlzLnRpbWVyKTtcclxuICAgICAgICAgIHRoaXMudGFsa0xpc3RbdGhpcy50YWxrTGlzdC5sZW5ndGggLSAxXS5jb250ZW50ID0gdGhpcy5jX2NvbnRlbnQgKyAnJztcclxuICAgICAgICAgIC8vIGNvbnNvbGUubG9nKHRoaXMudGFsa0xpc3RbdGhpcy50YWxrTGlzdC5sZW5ndGggLSAxXS5jb250ZW50KTtcclxuICAgICAgICAgIC8vIHRoaXMuY19jb250ZW50ID0gJyc7XHJcbiAgICAgICAgICAvLyB0aGlzLm5fY29udGVudCA9ICcnO1xyXG4gICAgICAgICAgdGhpcy5zb2NrZXRUYXNrLmNsb3NlKHtcclxuICAgICAgICAgICAgY29kZTogNTAwLCAgICAgIC8vIEFQUOerr+WtmOWcqEJVRyzmraPluLjlhbPpl63nmoRjb2Rl5Li6MTAwMCzml6Dms5XmraPluLjlhbPpl60s6ZyA6KaB5bCGY29kZeaNouS4uuWFtuS7luWAvFxyXG4gICAgICAgICAgICBjb21wbGV0ZTogKHJlcyk9PntcclxuICAgICAgICAgICAgICB0aGlzLnNob3dTdG9wID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+S4u+WKqOaWreW8gCcsIHJlcyk7XHJcbiAgICAgICAgICAgICAgdGhpcy53c0xpdmVGbGFnID0gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH0pXHJcbiAgICAgICAgfSBjYXRjaCAoZSkge1xyXG4gICAgICAgICAgLy9UT0RPIGhhbmRsZSB0aGUgZXhjZXB0aW9uXHJcbiAgICAgICAgfVxyXG4gICAgICB9LFxyXG4gICAgICAvLyDlj5HpgIHkv6Hmga9cclxuICAgICAgc2VuZCgpIHtcclxuICAgICAgICBpZiAoIXRoaXMuY29udGVudCkge1xyXG4gICAgICAgICAgdW5pLnNob3dUb2FzdCh7XHJcbiAgICAgICAgICAgIHRpdGxlOiAn6K+36L6T5YWl5pyJ5pWI55qE5YaF5a65JyxcclxuICAgICAgICAgICAgaWNvbjogJ25vbmUnXHJcbiAgICAgICAgICB9KVxyXG4gICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuICAgICAgICB0aGlzLnNob3dTdG9wID0gdHJ1ZTtcclxuICAgICAgICAvLyDlsIblvZPliY3lj5HpgIHkv6Hmga8g5re75Yqg5Yiw5raI5oGv5YiX6KGo44CCXHJcbiAgICAgICAgbGV0IGRhdGEgPSB7XHJcbiAgICAgICAgICBcImlkXCI6IG5ldyBEYXRlKCkuZ2V0VGltZSgpLFxyXG4gICAgICAgICAgXCJjb250ZW50XCI6IHRoaXMuY29udGVudCxcclxuICAgICAgICAgIFwidHlwZVwiOiAxLFxyXG4gICAgICAgICAgXCJwaWNcIjogXCIvc3RhdGljL2F2YXRhci5wbmdcIlxyXG4gICAgICAgIH1cclxuICAgICAgICB0aGlzLlRFWFQgPSB0aGlzLmNvbnRlbnQ7XHJcbiAgICAgICAgdGhpcy50YWxrTGlzdC5wdXNoKGRhdGEpO1xyXG4gICAgICAgIHRoaXMudGFsa0xpc3QucHVzaCh7XHJcbiAgICAgICAgICBcImlkXCI6IG5ldyBEYXRlKCkuZ2V0VGltZSgpLFxyXG4gICAgICAgICAgXCJjb250ZW50XCI6ICcnLFxyXG4gICAgICAgICAgXCJ0eXBlXCI6IDIsXHJcbiAgICAgICAgICBcInBpY1wiOiBcIi9zdGF0aWMvYXZhdGFyLnBuZ1wiXHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgdGhpcy5uX2NvbnRlbnQgPSAnJztcclxuICAgICAgICB0aGlzLmNfY29udGVudCA9ICcnO1xyXG4gICAgICAgIHRoaXMuc29ja2V0aW5nID0gdHJ1ZTtcclxuICAgICAgICAvLyByZXR1cm4gO1xyXG4gICAgICAgIHRoaXMuJG5leHRUaWNrKCgpID0+IHtcclxuICAgICAgICAgIC8vIOa4heepuuWGheWuueahhuS4reeahOWGheWuuVxyXG4gICAgICAgICAgdGhpcy5jb250ZW50ID0gJyc7XHJcbiAgICAgICAgICAvLyB1bmkucGFnZVNjcm9sbFRvKHtcclxuICAgICAgICAgIC8vICAgc2Nyb2xsVG9wOiA5OTk5OTksIC8vIOiuvue9ruS4gOS4qui2heWkp+WAvO+8jOS7peS/neivgea7muWKqOadoea7muWKqOWIsOW6lemDqFxyXG4gICAgICAgICAgLy8gICBkdXJhdGlvbjogMFxyXG4gICAgICAgICAgLy8gfSk7XHJcbiAgICAgICAgfSlcclxuICAgICAgICB0aGlzLnNlbmRUb1NwYXJrKCk7XHJcblxyXG4gICAgICB9LFxyXG4gICAgICBhc3luYyBzZW5kVG9TcGFyaygpIHtcclxuICAgICAgICAvLyBsZXQgbXlVcmwgPSBhd2FpdCB0aGlzLmdldFdlYlNvY2tldFVybCgpO1xyXG4gICAgICAgIHRoaXMudGVtcFJlcyA9IFwiXCI7XHJcbiAgICAgICAgbGV0IHJlYWxUaGlzID0gdGhpcztcclxuICAgICAgICB0aGlzLnNvY2tldFRhc2sgPSB1bmkuY29ubmVjdFNvY2tldCh7XHJcbiAgICAgICAgICAvL3VybDogZW5jb2RlVVJJKGVuY29kZVVSSShteVVybCkucmVwbGFjZSgvXFwrL2csICclMkInKSksXHJcbiAgICAgICAgICB1cmw6ICd3c3M6Ly9jaGF0LmxpaGFpbmsuY24vY2hhdCcgKyAnP3RpbWVzdGFtcD0nICsgRGF0ZS5ub3coKSxcclxuICAgICAgICAgIG1ldGhvZDogJ0dFVCcsXHJcbiAgICAgICAgICBzdWNjZXNzOiByZXMgPT4ge1xyXG4gICAgICAgICAgICBjb25zb2xlLmxvZyhyZXMsIFwid3PmiJDlip/ov57mjqUuLi5cIilcclxuICAgICAgICAgICAgcmVhbFRoaXMud3NMaXZlRmxhZyA9IHRydWU7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfSlcclxuICAgICAgICByZWFsVGhpcy5zb2NrZXRUYXNrLm9uRXJyb3IoKHJlcykgPT4ge1xyXG4gICAgICAgICAgY29uc29sZS5sb2coXCLov57mjqXlj5HnlJ/plJnor6/vvIzor7fmo4Dmn6VhcHBpZOaYr+WQpuWhq+WGmVwiLCByZXMpXHJcbiAgICAgICAgfSlcclxuICAgICAgICByZWFsVGhpcy5zb2NrZXRUYXNrLm9uT3BlbigocmVzKSA9PiB7XHJcbiAgICAgICAgICB0aGlzLmhpc3RvcnlUZXh0TGlzdC5wdXNoKHtcclxuICAgICAgICAgICAgXCJyb2xlXCI6IFwidXNlclwiLFxyXG4gICAgICAgICAgICBcImNvbnRlbnRcIjogdGhpcy5URVhUXHJcbiAgICAgICAgICB9KVxyXG4gICAgICAgICAgLy8g56ys5LiA5binLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uXHJcbiAgICAgICAgICBjb25zb2xlLmxvZygn6L+e5o6l5oiQ5YqfLi4uJylcclxuICAgICAgICAgIC8vIGxldCBwYXJhbXMgPSB7XHJcbiAgICAgICAgICAvLyAgIFwiaGVhZGVyXCI6IHtcclxuICAgICAgICAgIC8vICAgICBcImFwcF9pZFwiOiB0aGlzLkFQUElELFxyXG4gICAgICAgICAgLy8gICAgIFwidWlkXCI6IFwiYWVmOWY5NjMtN1wiXHJcbiAgICAgICAgICAvLyAgIH0sXHJcbiAgICAgICAgICAvLyAgIFwicGFyYW1ldGVyXCI6IHtcclxuICAgICAgICAgIC8vICAgICBcImNoYXRcIjoge1xyXG4gICAgICAgICAgLy8gICAgICAgXCJkb21haW5cIjogXCJnZW5lcmFsdjJcIixcclxuICAgICAgICAgIC8vICAgICAgIFwidGVtcGVyYXR1cmVcIjogMC41LFxyXG4gICAgICAgICAgLy8gICAgICAgXCJtYXhfdG9rZW5zXCI6IDEwMjRcclxuICAgICAgICAgIC8vICAgICB9XHJcbiAgICAgICAgICAvLyAgIH0sXHJcbiAgICAgICAgICAvLyAgIFwicGF5bG9hZFwiOiB7XHJcbiAgICAgICAgICAvLyAgICAgXCJtZXNzYWdlXCI6IHtcclxuICAgICAgICAgIC8vICAgICAgIFwidGV4dFwiOiB0aGlzLmhpc3RvcnlUZXh0TGlzdFxyXG4gICAgICAgICAgLy8gICAgIH1cclxuICAgICAgICAgIC8vICAgfVxyXG4gICAgICAgICAgLy8gfTtcclxuICAgICAgICAgIGlmICh0aGlzLmhpc3RvcnlUZXh0TGlzdC5sZW5ndGggPiA5KSB0aGlzLnBhcmFtcyA9IEpTT04ucGFyc2UoSlNPTi5zdHJpbmdpZnkodGhpcy5oaXN0b3J5VGV4dExpc3RcclxuICAgICAgICAgICAgLnNwbGljZSgtOSkpKTtcclxuICAgICAgICAgIGVsc2UgdGhpcy5wYXJhbXMgPSBKU09OLnBhcnNlKEpTT04uc3RyaW5naWZ5KHRoaXMuaGlzdG9yeVRleHRMaXN0KSk7XHJcbiAgICAgICAgICB0aGlzLmlzU3VycGFzcygpO1xyXG4gICAgICAgICAgcmVhbFRoaXMuc29ja2V0VGFzay5zZW5kKHsgLy8g5Y+R6YCB5raI5oGv77yM77yM6YO955SodW5p55qE5a6Y5pa554mI5pysXHJcbiAgICAgICAgICAgIGRhdGE6IEpTT04uc3RyaW5naWZ5KHRoaXMucGFyYW1zKSxcclxuICAgICAgICAgICAgc3VjY2VzcygpIHtcclxuICAgICAgICAgICAgICBjb25zb2xlLmxvZygn56ys5LiA5bin5Y+R6YCB5oiQ5YqfJyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLyDmjqXlj5fliLDmtojmga/ml7ZcclxuICAgICAgICByZWFsVGhpcy5zb2NrZXRUYXNrLm9uTWVzc2FnZSgocmVzKSA9PiB7XHJcbiAgICAgICAgICBjb25zb2xlLmxvZygn5pS25YiwQVBJ6L+U5Zue55qE5YaF5a6577yaJywgcmVzLmRhdGEpO1xyXG4gICAgICAgICAgbGV0IG9iaiA9IEpTT04ucGFyc2UocmVzLmRhdGEpXHJcbiAgICAgICAgICAvLyBjb25zb2xlLmxvZyhcIuaIkeaJk+WNsOeahFwiK29iai5wYXlsb2FkKTtcclxuICAgICAgICAgIGlmKCFyZWFsVGhpcy53c0xpdmVGbGFnKSByZXR1cm4gO1xyXG4gICAgICAgICAgbGV0IGRhdGFBcnJheSA9IG9iai5wYXlsb2FkLmNob2ljZXMudGV4dDtcclxuICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZGF0YUFycmF5Lmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIHRoaXMudGFsa0xpc3RbdGhpcy50YWxrTGlzdC5sZW5ndGggLSAxXS5jb250ZW50ICs9IGRhdGFBcnJheVtpXS5jb250ZW50O1xyXG4gICAgICAgICAgICB0aGlzLm5fY29udGVudCA9IHRoaXMudGFsa0xpc3RbdGhpcy50YWxrTGlzdC5sZW5ndGggLSAxXS5jb250ZW50O1xyXG4gICAgICAgICAgICByZWFsVGhpcy50ZW1wUmVzID0gcmVhbFRoaXMudGVtcFJlcyArIGRhdGFBcnJheVtpXS5jb250ZW50XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBsZXQgdGVtcCA9IEpTT04ucGFyc2UocmVzLmRhdGEpXHJcbiAgICAgICAgICAvLyBjb25zb2xlLmxvZyhcIjA3MjZcIix0ZW1wLmhlYWRlci5jb2RlKVxyXG4gICAgICAgICAgaWYgKHRlbXAuaGVhZGVyLmNvZGUgIT09IDApIHtcclxuICAgICAgICAgICAgdGhpcy5zb2NrZXRpbmcgPSBmYWxzZTtcclxuICAgICAgICAgICAgY29uc29sZS5sb2coYCR7dGVtcC5oZWFkZXIuY29kZX06JHt0ZW1wLm1lc3NhZ2V9YCk7XHJcbiAgICAgICAgICAgIHJlYWxUaGlzLnNvY2tldFRhc2suY2xvc2Uoe1xyXG4gICAgICAgICAgICAgIHN1Y2Nlc3MocmVzKSB7XHJcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5YWz6Zet5oiQ5YqfJywgcmVzKVxyXG4gICAgICAgICAgICAgICAgcmVhbFRoaXMud3NMaXZlRmxhZyA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgZmFpbChlcnIpIHtcclxuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCflhbPpl63lpLHotKUnLCBlcnIpXHJcbiAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgaWYgKHRlbXAuaGVhZGVyLmNvZGUgPT09IDApIHtcclxuICAgICAgICAgICAgaWYgKHJlcy5kYXRhICYmIHRlbXAuaGVhZGVyLnN0YXR1cyA9PT0gMikge1xyXG4gICAgICAgICAgICAgIHRoaXMuc29ja2V0aW5nID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgdGhpcy5oaXN0b3J5VGV4dExpc3QucHVzaCh7XHJcbiAgICAgICAgICAgICAgICBcInJvbGVcIjogXCJhc3Npc3RhbnRcIixcclxuICAgICAgICAgICAgICAgIFwiY29udGVudFwiOiB0aGlzLnRlbXBSZXNcclxuICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgcmVhbFRoaXMuc29ja2V0VGFzay5jbG9zZSh7XHJcbiAgICAgICAgICAgICAgICAgIHN1Y2Nlc3MocmVzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+WFs+mXreaIkOWKnycsIHJlcylcclxuICAgICAgICAgICAgICAgICAgICByZWFsVGhpcy53c0xpdmVGbGFnID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgIGZhaWwoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gY29uc29sZS5sb2coJ+WFs+mXreWksei0pScsIGVycilcclxuICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICB9LCAxMDAwKVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfSlcclxuICAgICAgfSxcclxuICAgICAgLy8g5Yik5pat5paH5a2X5piv5ZCm6LaF6L+H5LqU5Y2D5a2XXHJcbiAgICAgIGlzU3VycGFzcygpIHtcclxuICAgICAgICBsZXQgc3VtID0gdGhpcy5wYXJhbXMucmVkdWNlKChhY2N1bXVsYXRvciwgY3VycmVudFZhbHVlKSA9PiB7XHJcbiAgICAgICAgICByZXR1cm4gYWNjdW11bGF0b3IgKyBjdXJyZW50VmFsdWUuY29udGVudDtcclxuICAgICAgICB9LCAnJyk7XHJcbiAgICAgICAgaWYgKHN1bS5sZW5ndGggPiA1MDAwKSB7XHJcbiAgICAgICAgICB0aGlzLnBhcmFtcy5zaGlmdCgpO1xyXG4gICAgICAgICAgcmV0dXJuIHRoaXMuaXNTdXJwYXNzKCk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgIGNvbnNvbGUubG9nKGDmnKzmrKHlj5HpgIEke3N1bS5sZW5ndGh95a2XYCk7XHJcbiAgICAgICAgICByZXR1cm4gc3VtO1xyXG4gICAgICAgIH1cclxuICAgICAgfSxcclxuICAgICAgLy8g6Ym05p2DXHJcbiAgICAgIGdldFdlYlNvY2tldFVybCgpIHtcclxuICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xyXG4gICAgICAgICAgLy8gaHR0cHM6Ly9zcGFyay1hcGkueGYteXVuLmNvbS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mU9XCIke3NpZ25hdHVyZX1cImA7XHJcbiAgICAgICAgICB2YXIgYXV0aG9yaXphdGlvbiA9IGJhc2U2NC5lbmNvZGUoYXV0aG9yaXphdGlvbk9yaWdpbik7XHJcbiAgICAgICAgICB1cmwgPSBgJHt1cmx9P2F1dGhvcml6YXRpb249JHthdXRob3JpemF0aW9ufSZkYXRlPSR7ZW5jb2RlVVJJKGRhdGUpfSZob3N0PSR7aG9zdH1gO1xyXG5cclxuICAgICAgICAgIC8vIGNvbnNvbGUubG9nKHVybClcclxuICAgICAgICAgIHJlc29sdmUodXJsKTtcclxuICAgICAgICB9KTtcclxuICAgICAgfSxcclxuICAgICAgLy8g5rua5Yqo5Yiw5aS06YOoXHJcbiAgICAgIGJpbmRTY3JvbGwoKSB7XHJcbiAgICAgICAgaWYgKHRoaXMudXNlcklkID09IDApIHtcclxuICAgICAgICAgIHRoaXMuZ2V0SGlzdG9yeSgpO1xyXG4gICAgICAgICAgdGhpcy5nZXRwcm9kdWN0SW5mbygpO1xyXG4gICAgICAgICAgdGhpcy5nZXRPcmRlckluZm8oKTtcclxuICAgICAgICAgIHRoaXMuZ2V0UmVmdW5kRGV0YWlsKCk7XHJcbiAgICAgICAgICB0aGlzLmdldFN0b3JlRGV0YWlsKCk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgIHRoaXMuZ2V0TWVySGlzdG9yeSgpO1xyXG4gICAgICAgIH1cclxuICAgICAgfSxcclxuICAgICAgLy8g5b2T5ruR5Yqo6aG16Z2i5pe2LOaUtui1t+mUruebmCzkuI7lvq7kv6HogYrlpKnmlYjmnpzkv53mjIHkuIDoh7RcclxuICAgICAgdG91Y2htb3ZlKGUpIHtcclxuICAgICAgICB1bmkuaGlkZUtleWJvYXJkKClcclxuICAgICAgfVxyXG4gICAgfVxyXG4gIH1cclxuPC9zY3JpcHQ+XHJcblxyXG48c3R5bGUgbGFuZz1cInNjc3NcIj5cclxuICBAaW1wb3J0IFwiLi4vLi4vbGliL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NTtcclxuICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgwKTtcclxuICAgIC8qIOWIneWni+WMliB0cmFuc2Zvcm0g5bGe5oCnICovXHJcbiAgICB0cmFuc2l0aW9uOiB0cmFuc2Zvcm0gMC4zcyBlYXNlO1xyXG4gICAgLyog5re75Yqg6L+H5rih5pWI5p6cICovXHJcblxyXG4gICAgLyog5YW85a65aVBob25lWCAqL1xyXG4gICAgcGFkZGluZy1ib3R0b206IDA7XHJcbiAgICBwYWRkaW5nLWJvdHRvbTogY29uc3RhbnQoc2FmZS1hcmVhLWluc2V0LWJvdHRvbSk7XHJcbiAgICBwYWRkaW5nLWJvdHRvbTogZW52KHNhZmUtYXJlYS1pbnNldC1ib3R0b20pO1xyXG5cclxuICAgID52aWV3IHtcclxuICAgICAgcGFkZGluZzogMCAyMHJweDtcclxuICAgICAgaGVpZ2h0OiAxMDBycHg7XHJcbiAgICB9XHJcblxyXG4gICAgLmNvbnRlbnQge1xyXG4gICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmO1xyXG4gICAgICBoZWlnaHQ6IDY0cnB4O1xyXG4gICAgICBwYWRkaW5nOiAwIDIwcnB4O1xyXG4gICAgICBib3JkZXItcmFkaXVzOiA2cnB4O1xyXG4gICAgICBmb250LXNpemU6IDI4cnB4O1xyXG4gICAgfVxyXG5cclxuICAgIC5zZW5kIHtcclxuICAgICAgYmFja2dyb3VuZC1jb2xvcjogIzI1NzNmYjtcclxuICAgICAgY29sb3I6ICNmZmY7XHJcbiAgICAgIGhlaWdodDogNjRycHg7XHJcbiAgICAgIG1hcmdpbi1sZWZ0OiAyMHJweDtcclxuICAgICAgYm9yZGVyLXJhZGl1czogNnJweDtcclxuICAgICAgcGFkZGluZzogMDtcclxuICAgICAgd2lkdGg6IDEyMHJweDtcclxuICAgICAgbGluZS1oZWlnaHQ6IDYycnB4O1xyXG5cclxuICAgICAgJjphY3RpdmUge1xyXG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6ICMxNTczZmI7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICB9XHJcblxyXG4gIC50YWxrLWxpc3Qge1xyXG4gICAgcGFkZGluZy1ib3R0b206IDIwcnB4O1xyXG5cclxuICAgIC8qIOa2iOaBr+mhue+8jOWfuuehgOexuyAqL1xyXG4gICAgLml0ZW0ge1xyXG4gICAgICBwYWRkaW5nOiAyMHJweCAyMHJweCAwIDIwcnB4O1xyXG4gICAgICBhbGlnbi1pdGVtczogZmxleC1zdGFydDtcclxuICAgICAgYWxpZ24tY29udGVudDogZmxleC1zdGFydDtcclxuICAgICAgY29sb3I6ICMzMzM7XHJcblxyXG4gICAgICAucGljIHtcclxuICAgICAgICB3aWR0aDogOTJycHg7XHJcbiAgICAgICAgaGVpZ2h0OiA5MnJweDtcclxuICAgICAgICBib3JkZXItcmFkaXVzOiA1MCU7XHJcbiAgICAgICAgYm9yZGVyOiAjZmZmIHNvbGlkIDFweDtcclxuICAgICAgfVxyXG5cclxuICAgICAgLmNvbnRlbnQge1xyXG4gICAgICAgIHBhZGRpbmc6IDIwcnB4O1xyXG4gICAgICAgIGJvcmRlci1yYWRpdXM6IDRweDtcclxuICAgICAgICBtYXgtd2lkdGg6IDUwMHJweDtcclxuICAgICAgICB3b3JkLWJyZWFrOiBicmVhay1hbGw7XHJcbiAgICAgICAgbGluZS1oZWlnaHQ6IDUycnB4O1xyXG4gICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcclxuICAgICAgfVxyXG5cclxuICAgICAgLyog5pS25Yiw55qE5raI5oGvICovXHJcbiAgICAgICYucHVsbCB7XHJcbiAgICAgICAgLmNvbnRlbnQge1xyXG4gICAgICAgICAgbWluLXdpZHRoOiAyMHJweDtcclxuICAgICAgICAgIG1pbi1oZWlnaHQ6IDUycnB4O1xyXG4gICAgICAgICAgbWFyZ2luLWxlZnQ6IDMycnB4O1xyXG4gICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjtcclxuXHJcbiAgICAgICAgICAmOjphZnRlciB7XHJcbiAgICAgICAgICAgIGNvbnRlbnQ6ICcnO1xyXG4gICAgICAgICAgICBkaXNwbGF5OiBibG9jaztcclxuICAgICAgICAgICAgd2lkdGg6IDA7XHJcbiAgICAgICAgICAgIGhlaWdodDogMDtcclxuICAgICAgICAgICAgYm9yZGVyLXRvcDogMTZycHggc29saWQgdHJhbnNwYXJlbnQ7XHJcbiAgICAgICAgICAgIGJvcmRlci1ib3R0b206IDE2cnB4IHNvbGlkIHRyYW5zcGFyZW50O1xyXG4gICAgICAgICAgICBib3JkZXItcmlnaHQ6IDIwcnB4IHNvbGlkICNmZmY7XHJcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcclxuICAgICAgICAgICAgdG9wOiAzMHJweDtcclxuICAgICAgICAgICAgbGVmdDogLTE4cnB4O1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG5cclxuICAgICAgLyog5Y+R5Ye655qE5raI5oGvICovXHJcbiAgICAgICYucHVzaCB7XHJcbiAgICAgICAgLyog5Li76L205Li65rC05bmz5pa55ZCR77yM6LW354K55Zyo5Y+z56uv44CC5L2/5LiN5L+u5pS5RE9N57uT5p6E77yM5Lmf6IO95pS55Y+Y5YWD57Sg5o6S5YiX6aG65bqPICovXHJcbiAgICAgICAgZmxleC1kaXJlY3Rpb246IHJvdy1yZXZlcnNlO1xyXG5cclxuICAgICAgICAuY29udGVudCB7XHJcbiAgICAgICAgICBtaW4td2lkdGg6IDIwcnB4O1xyXG4gICAgICAgICAgbWluLWhlaWdodDogNTJycHg7XHJcbiAgICAgICAgICBtYXJnaW4tcmlnaHQ6IDMycnB4O1xyXG4gICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogIzI1NzNmYjtcclxuICAgICAgICAgIGNvbG9yOiAjZmZmO1xyXG5cclxuICAgICAgICAgICY6OmFmdGVyIHtcclxuICAgICAgICAgICAgY29udGVudDogJyc7XHJcbiAgICAgICAgICAgIGRpc3BsYXk6IGJsb2NrO1xyXG4gICAgICAgICAgICB3aWR0aDogMDtcclxuICAgICAgICAgICAgaGVpZ2h0OiAwO1xyXG4gICAgICAgICAgICBib3JkZXItdG9wOiAxNnJweCBzb2xpZCB0cmFuc3BhcmVudDtcclxuICAgICAgICAgICAgYm9yZGVyLWJvdHRvbTogMTZycHggc29saWQgdHJhbnNwYXJlbnQ7XHJcbiAgICAgICAgICAgIGJvcmRlci1sZWZ0OiAyMHJweCBzb2xpZCAjMjU3M2ZiO1xyXG4gICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XHJcbiAgICAgICAgICAgIHRvcDogMzBycHg7XHJcbiAgICAgICAgICAgIHJpZ2h0OiAtMThycHg7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICAuYmluZy1tYXRoIHtcclxuICAgIG1hcmdpbjogMCAhaW1wb3J0YW50O1xyXG4gICAgcGFkZGluZzogMCAhaW1wb3J0YW50O1xyXG4gIH1cclxuXHJcbiAgLnBsYWNlaG9sZGVyIHtcclxuICAgIHdpZHRoOiAxMDB2dztcclxuICAgIGJhY2tncm91bmQtY29sb3I6ICMxNTczZmI7XHJcbiAgICAvLyBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcclxuICAgIC8vIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgwKTsgLyog5Yid5aeL5YyWIHRyYW5zZm9ybSDlsZ7mgKcgKi9cclxuICAgIC8vIHRyYW5zaXRpb246IHRyYW5zZm9ybSAwLjNzIGVhc2U7IC8qIOa3u+WKoOi/h+a4oeaViOaenCAqL1xyXG4gIH1cclxuXHJcbiAgLmRvd25zb2NrZXQge1xyXG4gICAgZGlzcGxheTogZmxleDtcclxuICAgIGp1c3RpZnktY29udGVudDogY2VudGVyO1xyXG4gICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcclxuICAgIGJhY2tncm91bmQtY29sb3I6ICMyNTczZmIgIWltcG9ydGFudDtcclxuICAgIGNvbG9yOiAjZmZmICFpbXBvcnRhbnQ7XHJcbiAgfVxyXG48L3N0eWxlPiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///32\n"); +eval("/* WEBPACK VAR INJECTION */(function(__f__) {\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 1);\nvar _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 4);\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 33));\nvar _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 22));\nvar _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 35));\nvar base64 = _interopRequireWildcard(__webpack_require__(/*! base-64 */ 36));\nvar _cryptoJs = _interopRequireDefault(__webpack_require__(/*! ../../static/crypto-js/crypto-js.js */ 40));\nvar _parser = _interopRequireDefault(__webpack_require__(/*! ../../static/fast-xml-parser/src/parser */ 198));\nvar utf8 = _interopRequireWildcard(__webpack_require__(/*! utf8 */ 207));\nvar _bingMath = _interopRequireDefault(__webpack_require__(/*! @/components/bing-math/bing-math.vue */ 10));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n components: {\n 'bing-math': _bingMath.default\n },\n data: function data() {\n return {\n wssType: 'nongye',\n // 网络连接类型\n avatarType: \"/static/icon/ny.png\",\n // AI头像类型\n talkList: [],\n ajax: {\n rows: 15,\n //每页数量\n page: 1,\n //页码\n flag: false,\n // 请求开关\n loading: false,\n // 加载中\n loadText: '正在获取消息'\n },\n keyboardHeight: 0,\n showplc: true,\n content: '',\n c_content: '',\n n_content: '',\n avatar: '/static/avatar.png',\n // 用户头像\n params: [],\n // 发送的消息内容\n timer: '',\n socketTask: {},\n TEXT: '',\n historyTextList: [],\n // 历史会话信息,由于最大token12000,可以结合实际使用,进行移出\n tempRes: '',\n // 临时答复保存\n socketing: false,\n // 是否正在接收\n showStop: false,\n // 是否显示中断按钮\n scrollTop: 0,\n shouldScrollToBottom: true\n };\n },\n mounted: function mounted() {\n var _this = this;\n this.$nextTick(function () {\n _this.getHistoryMsg();\n });\n uni.onKeyboardHeightChange(function (e) {\n var h = _this.keyboardHeight;\n _this.keyboardHeight = e.height;\n _this.$nextTick(function () {\n setTimeout(function () {\n uni.pageScrollTo({\n scrollTop: 9999999,\n // 当前位置向下滚动\n duration: 300 // 滚动过渡时间为300ms,默认值为300ms\n });\n }, 0);\n });\n });\n },\n onLoad: function onLoad() {\n var _this2 = this;\n var avatar = uni.getStorageSync('avatar');\n avatar ? this.avatar = avatar : null;\n uni.$on('MPinfo', function (e) {\n _this2.avatar = e.avatar;\n });\n },\n beforeDestroy: function beforeDestroy() {\n uni.offKeyboardHeightChange();\n },\n onPageScroll: function onPageScroll(e) {\n if (e.scrollTop < 5) {\n this.getHistoryMsg();\n }\n },\n watch: {\n n_content: function n_content(n, o) {\n var _this3 = this;\n // this.c_content = n;\n if (this.timer) clearInterval(this.timer);\n var cl = this.c_content.length;\n var nc = this.n_content.split('');\n this.timer = setInterval(function () {\n if (cl < nc.length) {\n _this3.c_content += nc[cl];\n cl++;\n if (cl % 6 == 0) _this3.$nextTick(function () {\n uni.pageScrollTo({\n scrollTop: 999999\n });\n });\n } else {\n // console.log(this.socketing==false, cl == nc.length);\n if (_this3.socketing == false) _this3.showStop = false;\n clearInterval(_this3.timer);\n _this3.$nextTick(function () {\n uni.pageScrollTo({\n scrollTop: 9999999\n });\n });\n }\n }, 60);\n }\n },\n methods: {\n copyText: function copyText(str) {\n uni.setClipboardData({\n data: str,\n success: function success() {\n uni.showToast({\n icon: 'none',\n title: '复制成功'\n });\n }\n });\n },\n // 获取历史消息\n getHistoryMsg: function getHistoryMsg() {\n var _this4 = this;\n return;\n if (this.ajax.flag) {\n return; //\n }\n\n var get = /*#__PURE__*/function () {\n var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {\n var data, selector;\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _this4.hideLoadTips();\n _this4.ajax.flag = false;\n _context.next = 4;\n return _this4.joinHistoryMsg();\n case 4:\n data = _context.sent;\n __f__(\"log\", '----- 模拟数据格式,供参考 -----', \" at pages/index/index.vue:169\");\n __f__(\"log\", data, \" at pages/index/index.vue:170\"); // 查看请求返回的数据结构 \n\n // 获取待滚动元素选择器,解决插入数据后,滚动条定位时使用\n selector = '';\n if (_this4.ajax.page > 1) {\n // 非第一页,则取历史消息数据的第一条信息元素\n selector = \"#msg-\".concat(_this4.talkList[0].id);\n } else {\n // 第一页,则取当前消息数据的最后一条信息元素\n selector = \"#msg-\".concat(data[data.length - 1].id);\n }\n\n // 将获取到的消息数据合并到消息数组中\n _this4.talkList = [].concat((0, _toConsumableArray2.default)(data), (0, _toConsumableArray2.default)(_this4.talkList));\n\n // 数据挂载后执行,不懂的请自行阅读 Vue.js 文档对 Vue.nextTick 函数说明。\n _this4.$nextTick(function () {\n // 设置当前滚动的位置\n _this4.setPageScrollTo(selector);\n _this4.hideLoadTips(true);\n if (data.length < _this4.ajax.rows) {\n // 当前消息数据条数小于请求要求条数时,则无更多消息,不再允许请求。\n // 可在此处编写无更多消息数据时的逻辑\n } else {\n _this4.ajax.page++;\n\n // 延迟 200ms ,以保证设置窗口滚动已完成\n setTimeout(function () {\n _this4.ajax.flag = true;\n }, 200);\n }\n });\n case 11:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return function get() {\n return _ref.apply(this, arguments);\n };\n }();\n get();\n },\n // 拼接历史记录消息\n joinHistoryMsg: function joinHistoryMsg() {\n var _this5 = this;\n var join = function join() {\n var arr = [];\n\n //通过当前页码及页数,模拟数据内容\n var startIndex = (_this5.ajax.page - 1) * _this5.ajax.rows;\n var endIndex = startIndex + _this5.ajax.rows;\n for (var i = startIndex; i < endIndex; i++) {\n arr.push({\n \"id\": i,\n // 消息的ID\n \"content\": \"\\u8FD9\\u662F\\u5386\\u53F2\\u8BB0\\u5F55\\u7684\\u7B2C\".concat(i + 1, \"\\u6761\\u6D88\\u606F\"),\n // 消息内容\n \"type\": Math.random() > 0.5 ? 1 : 0,\n // 此为消息类别,设 1 为发出去的消息,0 为收到对方的消息,\n \"pic\": \"/static/avatar.png\" // 头像\n });\n }\n\n /*\n \t颠倒数组中元素的顺序。将最新的数据排在本次接口返回数据的最后面。\n \t后端接口按 消息的时间降序查找出当前页的数据后,再将本页数据按消息时间降序排序返回。\n \t这是数据的重点,因为页面滚动条和上拉加载历史的问题。\n */\n arr.reverse();\n return arr;\n };\n\n // 此处用到 ES6 的 Promise 知识,不懂的请自行学习。\n return new Promise(function (done, fail) {\n // 无数据请求接口,由 setTimeout 模拟,正式项目替换为 ajax 即可。\n setTimeout(function () {\n var data = join();\n done(data);\n }, 1500);\n });\n },\n focus: function focus() {\n // this.$nextTick(()=>{\n // setTimeout(()=>{\n // uni.pageScrollTo({\n // scrollTop: 9999999, // 当前位置向下滚动\n // duration: 300 // 滚动过渡时间为300ms,默认值为300ms\n // });\n // }, 0)\n // })\n },\n // 设置页面滚动位置\n setPageScrollTo: function setPageScrollTo(selector) {\n var view = uni.createSelectorQuery().in(this).select(selector);\n view.boundingClientRect(function (res) {\n uni.pageScrollTo({\n scrollTop: res.top - 30,\n // -30 为多显示出大半个消息的高度,示意上面还有信息。\n duration: 0\n });\n }).exec();\n },\n // 隐藏加载提示\n hideLoadTips: function hideLoadTips(flag) {\n var _this6 = this;\n if (flag) {\n this.ajax.loadText = '消息获取成功';\n setTimeout(function () {\n _this6.ajax.loading = false;\n }, 300);\n } else {\n this.ajax.loading = true;\n this.ajax.loadText = '正在获取消息';\n }\n },\n // 关闭连接\n closeSocketTask: function closeSocketTask() {\n var _this7 = this;\n try {\n clearInterval(this.timer);\n this.talkList[this.talkList.length - 1].content = this.c_content + '';\n // console.log(this.talkList[this.talkList.length - 1].content);\n // this.c_content = '';\n // this.n_content = '';\n this.socketTask.close({\n code: 500,\n // APP端存在BUG,正常关闭的code为1000,无法正常关闭,需要将code换为其他值\n complete: function complete(res) {\n _this7.showStop = false;\n __f__(\"log\", '主动断开', res, \" at pages/index/index.vue:289\");\n _this7.wsLiveFlag = false;\n }\n });\n } catch (e) {\n //TODO handle the exception\n }\n },\n // 发送信息\n send: function send() {\n var _this8 = this;\n if (!this.content) {\n uni.showToast({\n title: '请输入有效的内容',\n icon: 'none'\n });\n return;\n }\n this.showStop = true;\n // 将当前发送信息 添加到消息列表。\n var data = {\n \"id\": new Date().getTime(),\n \"content\": this.content,\n \"type\": 1,\n \"pic\": this.avatar\n };\n __f__(\"log\", data, \" at pages/index/index.vue:314\");\n this.TEXT = this.content;\n this.talkList.push(data);\n this.talkList.push({\n \"id\": new Date().getTime(),\n \"content\": '',\n \"type\": 2,\n \"pic\": this.avatarType\n });\n this.n_content = '';\n this.c_content = '';\n this.socketing = true;\n // return ;\n this.$nextTick(function () {\n // 清空内容框中的内容\n _this8.content = '';\n // uni.pageScrollTo({\n // scrollTop: 999999, // 设置一个超大值,以保证滚动条滚动到底部\n // duration: 0\n // });\n });\n\n this.sendToSpark();\n },\n sendToSpark: function sendToSpark() {\n var _this9 = this;\n return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {\n var realThis;\n return _regenerator.default.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n // let myUrl = await this.getWebSocketUrl();\n _this9.tempRes = \"\";\n realThis = _this9;\n _this9.socketTask = uni.connectSocket({\n //url: encodeURI(encodeURI(myUrl).replace(/\\+/g, '%2B')),\n url: \"wss://chat.lihaink.cn/chat?type=\".concat(_this9.wssType, \"×tamp=\").concat(Date.now()),\n method: 'GET',\n token: '',\n success: function success(res) {\n __f__(\"log\", res, \"ws成功连接...\", \" at pages/index/index.vue:348\");\n realThis.wsLiveFlag = true;\n }\n });\n realThis.socketTask.onError(function (res) {\n __f__(\"log\", \"连接发生错误,请检查appid是否填写\", res, \" at pages/index/index.vue:353\");\n });\n realThis.socketTask.onOpen(function (res) {\n _this9.historyTextList.push({\n \"role\": \"user\",\n \"content\": _this9.TEXT\n });\n // 第一帧..........................................\n __f__(\"log\", '连接成功...', \" at pages/index/index.vue:361\");\n // let params = {\n // \"header\": {\n // \"app_id\": this.APPID,\n // \"uid\": \"aef9f963-7\"\n // },\n // \"parameter\": {\n // \"chat\": {\n // \"domain\": \"generalv2\",\n // \"temperature\": 0.5,\n // \"max_tokens\": 1024\n // }\n // },\n // \"payload\": {\n // \"message\": {\n // \"text\": this.historyTextList\n // }\n // }\n // };\n if (_this9.historyTextList.length > 9) _this9.params = JSON.parse(JSON.stringify(_this9.historyTextList.splice(-9)));else _this9.params = JSON.parse(JSON.stringify(_this9.historyTextList));\n _this9.isSurpass();\n realThis.socketTask.send({\n // 发送消息,,都用uni的官方版本\n data: JSON.stringify(_this9.params),\n success: function success() {\n __f__(\"log\", '第一帧发送成功', \" at pages/index/index.vue:387\");\n }\n });\n });\n\n // 接受到消息时\n realThis.socketTask.onMessage(function (res) {\n __f__(\"log\", '收到API返回的内容:', res.data, \" at pages/index/index.vue:394\");\n var obj = JSON.parse(res.data);\n // console.log(\"我打印的\"+obj.payload);\n if (!realThis.wsLiveFlag) return;\n var dataArray = obj.payload.choices.text;\n for (var i = 0; i < dataArray.length; i++) {\n _this9.talkList[_this9.talkList.length - 1].content += dataArray[i].content;\n _this9.n_content = _this9.talkList[_this9.talkList.length - 1].content;\n realThis.tempRes = realThis.tempRes + dataArray[i].content;\n }\n var temp = JSON.parse(res.data);\n // console.log(\"0726\",temp.header.code)\n if (temp.header.code !== 0) {\n _this9.socketing = false;\n __f__(\"log\", \"\".concat(temp.header.code, \":\").concat(temp.message), \" at pages/index/index.vue:408\");\n realThis.socketTask.close({\n success: function success(res) {\n __f__(\"log\", '关闭成功', res, \" at pages/index/index.vue:411\");\n realThis.wsLiveFlag = false;\n },\n fail: function fail(err) {\n __f__(\"log\", '关闭失败', err, \" at pages/index/index.vue:415\");\n }\n });\n }\n if (temp.header.code === 0) {\n if (res.data && temp.header.status === 2) {\n _this9.socketing = false;\n _this9.historyTextList.push({\n \"role\": \"assistant\",\n \"content\": _this9.tempRes\n });\n setTimeout(function () {\n realThis.socketTask.close({\n success: function success(res) {\n __f__(\"log\", '关闭成功', res, \" at pages/index/index.vue:429\");\n realThis.wsLiveFlag = false;\n },\n fail: function fail(err) {\n // console.log('关闭失败', err)\n }\n });\n }, 1000);\n }\n }\n });\n case 6:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }))();\n },\n // 判断文字是否超过五千字\n isSurpass: function isSurpass() {\n var sum = this.params.reduce(function (accumulator, currentValue) {\n return accumulator + currentValue.content;\n }, '');\n if (sum.length > 5000) {\n this.params.shift();\n return this.isSurpass();\n } else {\n __f__(\"log\", \"\\u672C\\u6B21\\u53D1\\u9001\".concat(sum.length, \"\\u5B57\"), \" at pages/index/index.vue:450\");\n return sum;\n }\n },\n // 鉴权\n getWebSocketUrl: function getWebSocketUrl() {\n var _this10 = this;\n return new Promise(function (resolve, reject) {\n // https://spark-api.xf-yun.com/v1.1/chat V1.5 domain general\n // https://spark-api.xf-yun.com/v2.1/chat V2.0 domain generalv2\n var url = \"wss://spark-api.xf-yun.com/v2.1/chat\";\n var host = \"spark-api.xf-yun.com\";\n var apiKeyName = \"api_key\";\n var date = new Date().toGMTString();\n var algorithm = \"hmac-sha256\";\n var headers = \"host date request-line\";\n var signatureOrigin = \"host: \".concat(host, \"\\ndate: \").concat(date, \"\\nGET /v2.1/chat HTTP/1.1\");\n var signatureSha = _cryptoJs.default.HmacSHA256(signatureOrigin, _this10.APISecret);\n var signature = _cryptoJs.default.enc.Base64.stringify(signatureSha);\n var authorizationOrigin = \"\".concat(apiKeyName, \"=\\\"\").concat(_this10.APIKey, \"\\\", algorithm=\\\"\").concat(algorithm, \"\\\", headers=\\\"\").concat(headers, \"\\\", signature=\\\"\").concat(signature, \"\\\"\");\n var authorization = base64.encode(authorizationOrigin);\n url = \"\".concat(url, \"?authorization=\").concat(authorization, \"&date=\").concat(encodeURI(date), \"&host=\").concat(host);\n\n // console.log(url)\n resolve(url);\n });\n },\n // 滚动到头部\n bindScroll: function bindScroll() {\n if (this.userId == 0) {\n this.getHistory();\n this.getproductInfo();\n this.getOrderInfo();\n this.getRefundDetail();\n this.getStoreDetail();\n } else {\n this.getMerHistory();\n }\n },\n // 当滑动页面时,收起键盘,与微信聊天效果保持一致\n touchmove: function touchmove(e) {\n uni.hideKeyboard();\n }\n }\n};\nexports.default = _default;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/lib/format-log.js */ 21)[\"default\"]))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVuaS1hcHA6Ly8vcGFnZXMvaW5kZXgvaW5kZXgudnVlIl0sIm5hbWVzIjpbImNvbXBvbmVudHMiLCJkYXRhIiwid3NzVHlwZSIsImF2YXRhclR5cGUiLCJ0YWxrTGlzdCIsImFqYXgiLCJyb3dzIiwicGFnZSIsImZsYWciLCJsb2FkaW5nIiwibG9hZFRleHQiLCJrZXlib2FyZEhlaWdodCIsInNob3dwbGMiLCJjb250ZW50IiwiY19jb250ZW50Iiwibl9jb250ZW50IiwiYXZhdGFyIiwicGFyYW1zIiwidGltZXIiLCJzb2NrZXRUYXNrIiwiVEVYVCIsImhpc3RvcnlUZXh0TGlzdCIsInRlbXBSZXMiLCJzb2NrZXRpbmciLCJzaG93U3RvcCIsInNjcm9sbFRvcCIsInNob3VsZFNjcm9sbFRvQm90dG9tIiwibW91bnRlZCIsInVuaSIsInNldFRpbWVvdXQiLCJkdXJhdGlvbiIsIm9uTG9hZCIsImJlZm9yZURlc3Ryb3kiLCJvblBhZ2VTY3JvbGwiLCJ3YXRjaCIsImNsIiwiY2xlYXJJbnRlcnZhbCIsIm1ldGhvZHMiLCJjb3B5VGV4dCIsInN1Y2Nlc3MiLCJpY29uIiwidGl0bGUiLCJnZXRIaXN0b3J5TXNnIiwic2VsZWN0b3IiLCJnZXQiLCJqb2luSGlzdG9yeU1zZyIsImFyciIsImRvbmUiLCJmb2N1cyIsInNldFBhZ2VTY3JvbGxUbyIsInZpZXciLCJoaWRlTG9hZFRpcHMiLCJjbG9zZVNvY2tldFRhc2siLCJjb2RlIiwiY29tcGxldGUiLCJzZW5kIiwic2VuZFRvU3BhcmsiLCJyZWFsVGhpcyIsInVybCIsIm1ldGhvZCIsInR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bXBvcnQgcGFyc2VyIGZyb20gJy4uLy4uL3N0YXRpYy9mYXN0LXhtbC1wYXJzZXIvc3JjL3BhcnNlcidcclxuICBpbXBvcnQgKiBhcyB1dGY4IGZyb20gXCJ1dGY4XCJcclxuICBpbXBvcnQgQmluZ01hdGggZnJvbSBcIkAvY29tcG9uZW50cy9iaW5nLW1hdGgvYmluZy1tYXRoLnZ1ZVwiXHJcbiAgZXhwb3J0IGRlZmF1bHQge1xyXG4gICAgY29tcG9uZW50czoge1xyXG4gICAgICAnYmluZy1tYXRoJzogQmluZ01hdGhcclxuICAgIH0sXHJcbiAgICBkYXRhKCkge1xyXG4gICAgICByZXR1cm4ge1xyXG4gICAgICAgIHdzc1R5cGU6ICdub25neWUnLCAvLyDnvZHnu5zov57mjqXnsbvlnotcclxuICAgICAgICBhdmF0YXJUeXBlOiBcIi9zdGF0aWMvaWNvbi9ueS5wbmdcIiwgLy8gQUnlpLTlg4/nsbvlnotcclxuICAgICAgICB0YWxrTGlzdDogW10sXHJcbiAgICAgICAgYWpheDoge1xyXG4gICAgICAgICAgcm93czogMTUsIC8v5q+P6aG15pWw6YePXHJcbiAgICAgICAgICBwYWdlOiAxLCAvL+mhteeggVxyXG4gICAgICAgICAgZmxhZzogZmFsc2UsIC8vIOivt+axguW8gOWFs1xyXG4gICAgICAgICAgbG9hZGluZzogZmFsc2UsIC8vIOWKoOi9veS4rVxyXG4gICAgICAgICAgbG9hZFRleHQ6ICfmraPlnKjojrflj5bmtojmga8nXHJcbiAgICAgICAgfSxcclxuICAgICAgICBrZXlib2FyZEhlaWdodDogMCxcclxuICAgICAgICBzaG93cGxjOiB0cnVlLFxyXG4gICAgICAgIGNvbnRlbnQ6ICcnLFxyXG4gICAgICAgIGNfY29udGVudDogJycsXHJcbiAgICAgICAgbl9jb250ZW50OiAnJyxcclxuICAgICAgICBhdmF0YXI6ICcvc3RhdGljL2F2YXRhci5wbmcnLCAvLyDnlKjmiLflpLTlg49cclxuICAgICAgICBwYXJhbX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ZCR5LiL5rua5YqoXHJcbiAgICAgICAgICAgICAgZHVyYXRpb246IDMwMCAvLyDmu5rliqjov4fmuKHml7bpl7TkuLozMDBtc++8jOm7mOiupOWAvOS4ujMwMG1zXHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgfSwgMClcclxuICAgICAgICB9KVxyXG4gICAgICB9KVxyXG4gICAgfSxcclxuICAgIG9uTG9hZCgpIHtcclxuICAgICAgbGV0IGF2YXRhciA9IHVuaS5nZXRTdG9yYWdlU3luYygnYXZhdGFyJyk7XHJcbiAgICAgIGF2YXRhciA/IHRoaXMuYXZhdGFyID0gYXZhdGFyIDogbnVsbDtcclxuICAgICAgdW5pLiRvbignTVBpbmZvJywgKGUpID0+IHtcclxuICAgICAgICB0aGlzLmF2YXRhciA9IGUuYXZhdGFyO1xyXG4gICAgICB9KVxyXG4gICAgfSxcclxuICAgIGJlZm9yZURlc3Ryb3koKSB7XHJcbiAgICAgIC8vICNpZmRlZiBBUFAtUExVU1xyXG4gICAgICB1bmkub2ZmS2V5Ym9hcmRIZWlnaHRDaGFuZ2UoKTtcclxuICAgICAgLy8gI2VuZGlmXHJcbiAgICB9LFxyXG4gICAgb25QYWdlU2Nyb2xsKGUpIHtcclxuICAgICAgaWYgKGUuc2Nyb2xsVG9wIDwgNSkge1xyXG4gICAgICAgIHRoaXMuZ2V0SGlzdG9yeU1zZygpO1xyXG4gICAgICB9XHJcbiAgICB9LFxyXG4gICAgd2F0Y2g6IHtcclxuICAgICAgbl9jb250ZW50KG4sIG8pIHtcclxuICAgICAgICAvLyB0aGlzLmNfY29udGVudCA9IG47XHJcbiAgICAgICAgaWYgKHRoaXMudGltZXIpIGNsZWFySW50ZXJ2YWwodGhpcy50aW1lcik7XHJcbiAgICAgICAgbGV0IGNsID0gdGhpcy5jX2NvbnRlbnQubGVuZ3RoO1xyXG4gICAgICAgIGxldCBuYyA9IHRoaXMubl9jb250ZW50LnNwbGl0KCcnKTtcclxuICAgICAgICB0aGlzLnRpbWVyID0gc2V0SW50ZXJ2YWwoKCkgPT4ge1xyXG4gICAgICAgICAgaWYgKGNsIDwgbmMubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgIHRoaXMuY19jb250ZW50ICs9IG5jW2NsXTtcclxuICAgICAgICAgICAgY2wrKztcclxuICAgICAgICAgICAgaWYgKGNsICUgNiA9PSAwKSB0aGlzLiRuZXh0VGljaygoKSA9PiB7XHJcbiAgICAgICAgICAgICAgdW5pLnBhZ2VTY3JvbGxUbyh7XHJcbiAgICAgICAgICAgICAgICBzY3JvbGxUb3A6IDk5OTk5OSxcclxuICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgLy8gY29uc29sZS5sb2codGhpcy5zb2NrZXRpbmc9PWZhbHNlLCBjbCA9PSBuYy5sZW5ndGgpO1xyXG4gICAgICAgICAgICBpZiAodGhpcy5zb2NrZXRpbmcgPT0gZmFsc2UpIHRoaXMuc2hvd1N0b3AgPSBmYWxzZTtcclxuICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aGlzLnRpbWVyKTtcclxuICAgICAgICAgICAgdGhpcy4kbmV4dFRpY2soKCkgPT4ge1xyXG4gICAgICAgICAgICAgIHVuaS5wYWdlU2Nyb2xsVG8oe1xyXG4gICAgICAgICAgICAgICAgc2Nyb2xsVG9wOiA5OTk5OTk5LFxyXG4gICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfSwgNjApXHJcbiAgICAgIH0sXHJcbiAgICB9LFxyXG4gICAgbWV0aG9kczoge1xyXG4gICAgICBjb3B5VGV4dChzdHIpIHtcclxuICAgICAgICB1bmkuc2V0Q2xpcGJvYXJkRGF0YSh7XHJcbiAgICAgICAgICBkYXRhOiBzdHIsXHJcbiAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgdW5pLnNob3dUb2FzdCh7XHJcbiAgICAgICAgICAgICAgaWNvbjogJ25vbmUnLFxyXG4gICAgICAgICAgICAgIHRpdGxlOiAn5aSN5Yi25oiQ5YqfJ1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgICAgfSxcclxuICAgICAgLy8g6I635Y+W5Y6G5Y+y5raI5oGvXHJcbiAgICAgIGdldEhpc3RvcnlNc2coKSB7XHJcbiAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIGlmICh0aGlzLmFqYXguZmxhZykge1xyXG4gICAgICAgICAgcmV0dXJuOyAvL1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgbGV0IGdldCA9IGFzeW5jICgpID0+IHtcclxuICAgICAgICAgIHRoaXMuaGlkZUxvYWRUaXBzKCk7XHJcbiAgICAgICAgICB0aGlzLmFqYXguZmxhZyA9IGZhbHNlO1xyXG4gICAgICAgICAgbGV0IGRhdGEgPSBhd2FpdCB0aGlzLmpvaW5IaXN0b3J5TXNnKCk7XHJcblxyXG4gICAgICAgICAgY29uc29sZS5sb2coJy0tLS0tIOaooeaLn+aVsOaNruagvOW8j++8jOS+m+WPguiAgyAtLS0tLScpO1xyXG4gICAgICAgICAgY29uc29sZS5sb2coZGF0YSk7IC8vIOafpeeci+ivt+axgui/lOWbnueahOaVsOaNrue7k+aehCBcclxuXHJcbiAgICAgICAgICAvLyDojrflj5blvoXmu5rliqjlhYPntKDpgInmi6nlmajvvIzop6PlhrPmj5LlhaXmlbDmja7lkI7vvIzmu5rliqjmnaHlrprkvY3ml7bkvb/nlKhcclxuICAgICAgICAgIGxldCBzZWxlY3RvciA9ICcnO1xyXG5cclxuICAgICAgICAgIGlmICh0aGlzLmFqYXgucGFnZSA+IDEpIHtcclxuICAgICAgICAgICAgLy8g6Z2e56ys5LiA6aG177yM5YiZ5Y+W5Y6G5Y+y5raI5oGv5pWw5o2u55qE56ys5LiA5p2h5L+h5oGv5YWD57SgXHJcbiAgICAgICAgICAgIHNlbGVjdG9yID0gYCNtc2ctJHt0aGlzLnRhbGtMaXN0WzBdLmlkfWA7XHJcbiAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAvLyDnrKzkuIDpobXvvIzliJnlj5blvZPliY3mtojmga/mlbDmja7nmoTmnIDlkI7kuIDmnaHkv6Hmga/lhYPntKBcclxuICAgICAgICAgICAgc2VsZWN0b3IgPSBgI21zZy0ke2RhdGFbZGF0YS5sZW5ndGgtMV0uaWR9YDtcclxuICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAvLyDlsIbojrflj5bliLDnmoTmtojmga/mlbDmja7lkIjlubbliLDmtojmga/mlbDnu4TkuK1cclxuICAgICAgICAgIHRoaXMudGFsa0xpc3QgPSBbLi4uZGF0YSwgLi4udGhpcy50YWxrTGlzdF07XHJcblxyXG4gICAgICAgICAgLy8g5pWw5o2u5oyC6L295ZCO5omn6KGM77yM5LiN5oeC55qE6K+36Ieq6KGM6ZiF6K+7IFZ1ZS5qcyDmlofmoaPlr7kgVnVlLm5leHRUaWNrIOWHveaVsOivtOaYjuOAglxyXG4gICAgICAgICAgdGhpcy4kbmV4dFRpY2soKCkgPT4ge1xyXG4gICAgICAgICAgICAvLyDorr7nva7lvZPliY3mu5rliqjnmoTkvY3nva5cclxuICAgICAgICAgICAgdGhpcy5zZXRQYWdlU2Nyb2xsVG8oc2VsZWN0b3IpO1xyXG5cclxuICAgICAgICAgICAgdGhpcy5oaWRlTG9hZFRpcHModHJ1ZSk7XHJcblxyXG4gICAgICAgICAgICBpZiAoZGF0YS5sZW5ndGggPCB0aGlzLmFqYXgucm93cykge1xyXG4gICAgICAgICAgICAgIC8vIOW9k+WJjea2iOaBr+aVsOaNruadoeaVsOWwj+S6juivt+axguimgeaxguadoeaVsOaXtu+8jOWImeaXoOabtOWkmua2iOaBr++8jOS4jeWGjeWFgeiuuOivt+axguOAglxyXG4gICAgICAgICAgICAgIC8vIOWPr+WcqOatpOWkhOe8luWGmeaXoOabtOWkmua2iOaBr+aVsOaNruaXtueahOmAu+i+kVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgIHRoaXMuYWpheC5wYWdlKys7XHJcblxyXG4gICAgICAgICAgICAgIC8vIOW7tui/nyAyMDBtcyDvvIzku6Xkv53or4Horr7nva7nqpflj6Pmu5rliqjlt7LlrozmiJBcclxuICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcclxuICAgICAgICAgICAgICAgIHRoaXMuYWpheC5mbGFnID0gdHJ1ZTtcclxuICAgICAgICAgICAgICB9LCAyMDApXHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICB9KVxyXG4gICAgICAgIH1cclxuICAgICAgICBnZXQoKTtcclxuICAgICAgfSxcclxuICAgICAgLy8g5ou85o6l5Y6G5Y+y6K6w5b2V5raI5oGvXHJcbiAgICAgIGpvaW5IaXN0b3J5TXNnKCkge1xyXG4gICAgICAgIGxldCBqb2luID0gKCkgPT4ge1xyXG4gICAgICAgICAgbGV0IGFyciA9IFtdO1xyXG5cclxuICAgICAgICAgIC8v6YCa6L+H5b2T5YmN6aG156CB5Y+K6aG15pWw77yM5qih5ouf5pWw5o2u5YaF5a65XHJcbiAgICAgICAgICBsZXQgc3RhcnRJbmRleCA9ICh0aGlzLmFqYXgucGFnZSAtIDEpICogdGhpcy5hamF4LnJvd3M7XHJcbiAgICAgICAgICBsZXQgZW5kSW5kZXggPSBzdGFydEluZGV4ICsgdGhpcy5hamF4LnJvd3M7XHJcbiAgICAgICAgICBmb3IgKGxldCBpID0gc3RhcnRJbmRleDsgaSA8IGVuZEluZGV4OyBpKyspIHtcclxuICAgICAgICAgICAgYXJyLnB1c2goe1xyXG4gICAgICAgICAgICAgIFwiaWRcIjogaSwgLy8g5raI5oGv55qESURcclxuICAgICAgICAgICAgICBcImNvbnRlbnRcIjogYOi/meaYr+WOhuWPsuiusOW9leeahOesrCR7aSsxfeadoea2iOaBr2AsIC8vIOa2iOaBr+WGheWuuVxyXG4gICAgICAgICAgICAgIFwidHlwZVwiOiBNYXRoLnJhbmRvbSgpID4gMC41ID8gMSA6IDAsIC8vIOatpOS4uua2iOaBr+exu+WIq++8jOiuviAxIOS4uuWPkeWHuuWOu+eahOa2iOaBr++8jDAg5Li65pS25Yiw5a+55pa555qE5raI5oGvLFxyXG4gICAgICAgICAgICAgIFwicGljXCI6IFwiL3N0YXRpYy9hdmF0YXIucG5nXCIgLy8g5aS05YOPXHJcbiAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgLypcclxuICAgICAgICAgIFx06aKg5YCS5pWw57uE5Lit5YWD57Sg55qE6aG65bqP44CC5bCG5pyA5paw55qE5pWw5o2u5o6S5Zyo5pys5qyh5o6l5Y+j6L+U5Zue5pWw5o2u55qE5pyA5ZCO6Z2i44CCXHJcbiAgICAgICAgICBcdOWQjuerr+aOpeWPo+aMiSDmtojmga/nmoTml7bpl7TpmY3luo/mn6Xmib7lh7rlvZPliY3pobXnmoTmlbDmja7lkI7vvIzlho3lsIbmnKzpobXmlbDmja7mjInmtojmga/ml7bpl7TpmY3luo/mjpLluo/ov5Tlm57jgIJcclxuICAgICAgICAgIFx06L+Z5piv5pWw5o2u55qE6YeN54K577yM5Zug5Li66aG16Z2i5rua5Yqo5p2h5ZKM5LiK5ouJ5Yqg6L295Y6G5Y+y55qE6Zeu6aKY44CCXHJcbiAgICAgICAgICAgKi9cclxuICAgICAgICAgIGFyci5yZXZlcnNlKCk7XHJcblxyXG4gICAgICAgICAgcmV0dXJuIGFycjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIOatpOWkhOeUqOWIsCBFUzYg55qEIFByb21pc2Ug55+l6K+G77yM5LiN5oeC55qE6K+36Ieq6KGM5a2m5Lmg44CCXHJcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChkb25lLCBmYWlsKSA9PiB7XHJcbiAgICAgICAgICAvLyDml6DmlbDmja7or7fmsYLmjqXlj6PvvIznlLEgc2V0VGltZW91dCDmqKHmi5/vvIzmraPlvI/pobnnm67mm7/mjaLkuLogYWpheCDljbPlj6/jgIJcclxuICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xyXG4gICAgICAgICAgICBsZXQgZGF0YSA9IGpvaW4oKTtcclxuICAgICAgICAgICAgZG9uZShkYXRhKTtcclxuICAgICAgICAgIH0sIDE1MDApO1xyXG4gICAgICAgIH0pXHJcbiAgICAgIH0sXHJcbiAgICAgIGZvY3VzKCkge1xyXG4gICAgICAgIC8vIHRoaXMuJG5leHRUaWNrKCgpPT57XHJcbiAgICAgICAgLy8gICBzZXRUaW1lb3V0KCgpPT57XHJcbiAgICAgICAgLy8gICAgIHVuaS5wYWdlU2Nyb2xsVG8oe1xyXG4gICAgICAgIC8vICAgICAgIHNjcm9sbFRvcDogOTk5OTk5OSwgLy8g5b2T5YmN5L2N572u5ZCR5LiL5rua5YqoXHJcbiAgICAgICAgLy8gICAgICAgZHVyYXRpb246IDMwMCAvLyDmu5rliqjov4fmuKHml7bpl7TkuLozMDBtc++8jOm7mOiupOWAvOS4ujMwMG1zXHJcbiAgICAgICAgLy8gICAgIH0pO1xyXG4gICAgICAgIC8vICAgfSwgMClcclxuICAgICAgICAvLyB9KVxyXG4gICAgICB9LFxyXG4gICAgICAvLyDorr7nva7pobXpnaLmu5rliqjkvY3nva5cclxuICAgICAgc2V0UGFnZVNjcm9sbFRvKHNlbGVjdG9yKSB7XHJcbiAgICAgICAgbGV0IHZpZXcgPSB1bmkuY3JlYXRlU2VsZWN0b3JRdWVyeSgpLmluKHRoaXMpLnNlbGVjdChzZWxlY3Rvcik7XHJcbiAgICAgICAgdmlldy5ib3VuZGluZ0NsaWVudFJlY3QoKHJlcykgPT4ge1xyXG4gICAgICAgICAgdW5pLnBhZ2VTY3JvbGxUbyh7XHJcbiAgICAgICAgICAgIHNjcm9sbFRvcDogcmVzLnRvcCAtIDMwLCAvLyAtMzAg5Li65aSa5pi+56S65Ye65aSn5Y2K5Liq5raI5oGv55qE6auY5bqm77yM56S65oSP5LiK6Z2i6L+Y5pyJ5L+h5oGv44CCXHJcbiAgICAgICAgICAgIGR1cmF0aW9uOiAwXHJcbiAgICAgICAgICB9KTtcclxuICAgICAgICB9KS5leGVjKCk7XHJcbiAgICAgIH0sXHJcbiAgICAgIC8vIOmakOiXj+WKoOi9veaPkOekulxyXG4gICAgICBoaWRlTG9hZFRpcHMoZmxhZykge1xyXG4gICAgICAgIGlmIChmbGFnKSB7XHJcbiAgICAgICAgICB0aGlzLmFqYXgubG9hZFRleHQgPSAn5raI5oGv6I635Y+W5oiQ5YqfJztcclxuICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xyXG4gICAgICAgICAgICB0aGlzLmFqYXgubG9hZGluZyA9IGZhbHNlO1xyXG4gICAgICAgICAgfSwgMzAwKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgdGhpcy5hamF4LmxvYWRpbmcgPSB0cnVlO1xyXG4gICAgICAgICAgdGhpcy5hamF4LmxvYWRUZXh0ID0gJ+ato+WcqOiOt+WPlua2iOaBryc7XHJcbiAgICAgICAgfVxyXG4gICAgICB9LFxyXG4gICAgICAvLyDlhbPpl63ov57mjqVcclxuICAgICAgY2xvc2VTb2NrZXRUYXNrKCkge1xyXG4gICAgICAgIHRyeSB7XHJcbiAgICAgICAgICBjbGVhckludGVydmFsKHRoaXMudGltZXIpO1xyXG4gICAgICAgICAgdGhpcy50YWxrTGlzdFt0aGlzLnRhbGtMaXN0Lmxlbmd0aCAtIDFdLmNvbnRlbnQgPSB0aGlzLmNfY29udGVudCArICcnO1xyXG4gICAgICAgICAgLy8gY29uc29sZS5sb2codGhpcy50YWxrTGlzdFt0aGlzLnRhbGtMaXN0Lmxlbmd0aCAtIDFdLmNvbnRlbnQpO1xyXG4gICAgICAgICAgLy8gdGhpcy5jX2NvbnRlbnQgPSAnJztcclxuICAgICAgICAgIC8vIHRoaXMubl9jb250ZW50ID0gJyc7XHJcbiAgICAgICAgICB0aGlzLnNvY2tldFRhc2suY2xvc2Uoe1xyXG4gICAgICAgICAgICBjb2RlOiA1MDAsIC8vIEFQUOerr+WtmOWcqEJVRyzmraPluLjlhbPpl63nmoRjb2Rl5Li6MTAwMCzml6Dms5XmraPluLjlhbPpl60s6ZyA6KaB5bCGY29kZeaNouS4uuWFtuS7luWAvFxyXG4gICAgICAgICAgICBjb21wbGV0ZTogKHJlcykgPT4ge1xyXG4gICAgICAgICAgICAgIHRoaXMuc2hvd1N0b3AgPSBmYWxzZTtcclxuICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5Li75Yqo5pat5byAJywgcmVzKTtcclxuICAgICAgICAgICAgICB0aGlzLndzTGl2ZUZsYWcgPSBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfSlcclxuICAgICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgICAvL1RPRE8gaGFuZGxlIHRoZSBleGNlcHRpb25cclxuICAgICAgICB9XHJcbiAgICAgIH0sXHJcbiAgICAgIC8vIOWPkemAgeS/oeaBr1xyXG4gICAgICBzZW5kKCkge1xyXG4gICAgICAgIGlmICghdGhpcy5jb250ZW50KSB7XHJcbiAgICAgICAgICB1bmkuc2hvd1RvYXN0KHtcclxuICAgICAgICAgICAgdGl0bGU6ICfor7fovpPlhaXmnInmlYjnmoTlhoXlrrknLFxyXG4gICAgICAgICAgICBpY29uOiAnbm9uZSdcclxuICAgICAgICAgIH0pXHJcbiAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHRoaXMuc2hvd1N0b3AgPSB0cnVlO1xyXG4gICAgICAgIC8vIOWwhuW9k+WJjeWPkemAgeS/oeaBryDmt7vliqDliLDmtojmga/liJfooajjgIJcclxuICAgICAgICBsZXQgZGF0YSA9IHtcclxuICAgICAgICAgIFwiaWRcIjogbmV3IERhdGUoKS5nZXRUaW1lKCksXHJcbiAgICAgICAgICBcImNvbnRlbnRcIjogdGhpcy5jb250ZW50LFxyXG4gICAgICAgICAgXCJ0eXBlXCI6IDEsXHJcbiAgICAgICAgICBcInBpY1wiOiB0aGlzLmF2YXRhclxyXG4gICAgICAgIH1cclxuICAgICAgICBjb25zb2xlLmxvZyhkYXRhKTtcclxuICAgICAgICB0aGlzLlRFWFQgPSB0aGlzLmNvbnRlbnQ7XHJcbiAgICAgICAgdGhpcy50YWxrTGlzdC5wdXNoKGRhdGEpO1xyXG4gICAgICAgIHRoaXMudGFsa0xpc3QucHVzaCh7XHJcbiAgICAgICAgICBcImlkXCI6IG5ldyBEYXRlKCkuZ2V0VGltZSgpLFxyXG4gICAgICAgICAgXCJjb250ZW50XCI6ICcnLFxyXG4gICAgICAgICAgXCJ0eXBlXCI6IDIsXHJcbiAgICAgICAgICBcInBpY1wiOiB0aGlzLmF2YXRhclR5cGVcclxuICAgICAgICB9KTtcclxuICAgICAgICB0aGlzLm5fY29udGVudCA9ICcnO1xyXG4gICAgICAgIHRoaXMuY19jb250ZW50ID0gJyc7XHJcbiAgICAgICAgdGhpcy5zb2NrZXRpbmcgPSB0cnVlO1xyXG4gICAgICAgIC8vIHJldHVybiA7XHJcbiAgICAgICAgdGhpcy4kbmV4dFRpY2soKCkgPT4ge1xyXG4gICAgICAgICAgLy8g5riF56m65YaF5a655qGG5Lit55qE5YaF5a65XHJcbiAgICAgICAgICB0aGlzLmNvbnRlbnQgPSAnJztcclxuICAgICAgICAgIC8vIHVuaS5wYWdlU2Nyb2xsVG8oe1xyXG4gICAgICAgICAgLy8gICBzY3JvbGxUb3A6IDk5OTk5OSwgLy8g6K6+572u5LiA5Liq6LaF5aSn5YC877yM5Lul5L+d6K+B5rua5Yqo5p2h5rua5Yqo5Yiw5bqV6YOoXHJcbiAgICAgICAgICAvLyAgIGR1cmF0aW9uOiAwXHJcbiAgICAgICAgICAvLyB9KTtcclxuICAgICAgICB9KVxyXG4gICAgICAgIHRoaXMuc2VuZFRvU3BhcmsoKTtcclxuXHJcbiAgICAgIH0sXHJcbiAgICAgIGFzeW5jIHNlbmRUb1NwYXJrKCkge1xyXG4gICAgICAgIC8vIGxldCBteVVybCA9IGF3YWl0IHRoaXMuZ2V0V2ViU29ja2V0VXJsKCk7XHJcbiAgICAgICAgdGhpcy50ZW1wUmVzID0gXCJcIjtcclxuICAgICAgICBsZXQgcmVhbFRoaXMgPSB0aGlzO1xyXG4gICAgICAgIHRoaXMuc29ja2V0VGFzayA9IHVuaS5jb25uZWN0U29ja2V0KHtcclxuICAgICAgICAgIC8vdXJsOiBlbmNvZGVVUkkoZW5jb2RlVVJJKG15VXJsKS5yZXBsYWNlKC9cXCsvZywgJyUyQicpKSxcclxuICAgICAgICAgIHVybDogYHdzczovL2NoYXQubGloYWluay5jbi9jaGF0P3R5cGU9JHt0aGlzLndzc1R5cGV9JnRpbWVzdGFtcD0ke0RhdGUubm93KCl9YCxcclxuICAgICAgICAgIG1ldGhvZDogJ0dFVCcsXHJcbiAgICAgICAgICB0b2tlbjogJycsXHJcbiAgICAgICAgICBzdWNjZXNzOiByZXMgPT4ge1xyXG4gICAgICAgICAgICBjb25zb2xlLmxvZyhyZXMsIFwid3PmiJDlip/ov57mjqUuLi5cIilcclxuICAgICAgICAgICAgcmVhbFRoaXMud3NMaXZlRmxhZyA9IHRydWU7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfSlcclxuICAgICAgICByZWFsVGhpcy5zb2NrZXRUYXNrLm9uRXJyb3IoKHJlcykgPT4ge1xyXG4gICAgICAgICAgY29uc29sZS5sb2coXCLov57mjqXlj5HnlJ/plJnor6/vvIzor7fmo4Dmn6VhcHBpZOaYr+WQpuWhq+WGmVwiLCByZXMpXHJcbiAgICAgICAgfSlcclxuICAgICAgICByZWFsVGhpcy5zb2NrZXRUYXNrLm9uT3BlbigocmVzKSA9PiB7XHJcbiAgICAgICAgICB0aGlzLmhpc3RvcnlUZXh0TGlzdC5wdXNoKHtcclxuICAgICAgICAgICAgXCJyb2xlXCI6IFwidXNlclwiLFxyXG4gICAgICAgICAgICBcImNvbnRlbnRcIjogdGhpcy5URVhUXHJcbiAgICAgICAgICB9KVxyXG4gICAgICAgICAgLy8g56ys5LiA5binLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uXHJcbiAgICAgICAgICBjb25zb2xlLmxvZygn6L+e5o6l5oiQ5YqfLi4uJylcclxuICAgICAgICAgIC8vIGxldCBwYXJhbXMgPSB7XHJcbiAgICAgICAgICAvLyAgIFwiaGVhZGVyXCI6IHtcclxuICAgICAgICAgIC8vICAgICBcImFwcF9pZFwiOiB0aGlzLkFQUElELFxyXG4gICAgICAgICAgLy8gICAgIFwidWlkXCI6IFwiYWVmOWY5NjMtN1wiXHJcbiAgICAgICAgICAvLyAgIH0sXHJcbiAgICAgICAgICAvLyAgIFwicGFyYW1ldGVyXCI6IHtcclxuICAgICAgICAgIC8vICAgICBcImNoYXRcIjoge1xyXG4gICAgICAgICAgLy8gICAgICAgXCJkb21haW5cIjogXCJnZW5lcmFsdjJcIixcclxuICAgICAgICAgIC8vICAgICAgIFwidGVtcGVyYXR1cmVcIjogMC41LFxyXG4gICAgICAgICAgLy8gICAgICAgXCJtYXhfdG9rZW5zXCI6IDEwMjRcclxuICAgICAgICAgIC8vICAgICB9XHJcbiAgICAgICAgICAvLyAgIH0sXHJcbiAgICAgICAgICAvLyAgIFwicGF5bG9hZFwiOiB7XHJcbiAgICAgICAgICAvLyAgICAgXCJtZXNzYWdlXCI6IHtcclxuICAgICAgICAgIC8vICAgICAgIFwidGV4dFwiOiB0aGlzLmhpc3RvcnlUZXh0TGlzdFxyXG4gICAgICAgICAgLy8gICAgIH1cclxuICAgICAgICAgIC8vICAgfVxyXG4gICAgICAgICAgLy8gfTtcclxuICAgICAgICAgIGlmICh0aGlzLmhpc3RvcnlUZXh0TGlzdC5sZW5ndGggPiA5KSB0aGlzLnBhcmFtcyA9IEpTT04ucGFyc2UoSlNPTi5zdHJpbmdpZnkodGhpcy5oaXN0b3J5VGV4dExpc3RcclxuICAgICAgICAgICAgLnNwbGljZSgtOSkpKTtcclxuICAgICAgICAgIGVsc2UgdGhpcy5wYXJhbXMgPSBKU09OLnBhcnNlKEpTT04uc3RyaW5naWZ5KHRoaXMuaGlzdG9yeVRleHRMaXN0KSk7XHJcbiAgICAgICAgICB0aGlzLmlzU3VycGFzcygpO1xyXG4gICAgICAgICAgcmVhbFRoaXMuc29ja2V0VGFzay5zZW5kKHsgLy8g5Y+R6YCB5raI5oGv77yM77yM6YO955SodW5p55qE5a6Y5pa554mI5pysXHJcbiAgICAgICAgICAgIGRhdGE6IEpTT04uc3RyaW5naWZ5KHRoaXMucGFyYW1zKSxcclxuICAgICAgICAgICAgc3VjY2VzcygpIHtcclxuICAgICAgICAgICAgICBjb25zb2xlLmxvZygn56ys5LiA5bin5Y+R6YCB5oiQ5YqfJyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLyDmjqXlj5fliLDmtojmga/ml7ZcclxuICAgICAgICByZWFsVGhpcy5zb2NrZXRUYXNrLm9uTWVzc2FnZSgocmVzKSA9PiB7XHJcbiAgICAgICAgICBjb25zb2xlLmxvZygn5pS25YiwQVBJ6L+U5Zue55qE5YaF5a6577yaJywgcmVzLmRhdGEpO1xyXG4gICAgICAgICAgbGV0IG9iaiA9IEpTT04ucGFyc2UocmVzLmRhdGEpXHJcbiAgICAgICAgICAvLyBjb25zb2xlLmxvZyhcIuaIkeaJk+WNsOeahFwiK29iai5wYXlsb2FkKTtcclxuICAgICAgICAgIGlmICghcmVhbFRoaXMud3NMaXZlRmxhZykgcmV0dXJuO1xyXG4gICAgICAgICAgbGV0IGRhdGFBcnJheSA9IG9iai5wYXlsb2FkLmNob2ljZXMudGV4dDtcclxuICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZGF0YUFycmF5Lmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIHRoaXMudGFsa0xpc3RbdGhpcy50YWxrTGlzdC5sZW5ndGggLSAxXS5jb250ZW50ICs9IGRhdGFBcnJheVtpXS5jb250ZW50O1xyXG4gICAgICAgICAgICB0aGlzLm5fY29udGVudCA9IHRoaXMudGFsa0xpc3RbdGhpcy50YWxrTGlzdC5sZW5ndGggLSAxXS5jb250ZW50O1xyXG4gICAgICAgICAgICByZWFsVGhpcy50ZW1wUmVzID0gcmVhbFRoaXMudGVtcFJlcyArIGRhdGFBcnJheVtpXS5jb250ZW50XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBsZXQgdGVtcCA9IEpTT04ucGFyc2UocmVzLmRhdGEpXHJcbiAgICAgICAgICAvLyBjb25zb2xlLmxvZyhcIjA3MjZcIix0ZW1wLmhlYWRlci5jb2RlKVxyXG4gICAgICAgICAgaWYgKHRlbXAuaGVhZGVyLmNvZGUgIT09IDApIHtcclxuICAgICAgICAgICAgdGhpcy5zb2NrZXRpbmcgPSBmYWxzZTtcclxuICAgICAgICAgICAgY29uc29sZS5sb2coYCR7dGVtcC5oZWFkZXIuY29kZX06JHt0ZW1wLm1lc3NhZ2V9YCk7XHJcbiAgICAgICAgICAgIHJlYWxUaGlzLnNvY2tldFRhc2suY2xvc2Uoe1xyXG4gICAgICAgICAgICAgIHN1Y2Nlc3MocmVzKSB7XHJcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5YWz6Zet5oiQ5YqfJywgcmVzKVxyXG4gICAgICAgICAgICAgICAgcmVhbFRoaXMud3NMaXZlRmxhZyA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgZmFpbChlcnIpIHtcclxuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCflhbPpl63lpLHotKUnLCBlcnIpXHJcbiAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgaWYgKHRlbXAuaGVhZGVyLmNvZGUgPT09IDApIHtcclxuICAgICAgICAgICAgaWYgKHJlcy5kYXRhICYmIHRlbXAuaGVhZGVyLnN0YXR1cyA9PT0gMikge1xyXG4gICAgICAgICAgICAgIHRoaXMuc29ja2V0aW5nID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgdGhpcy5oaXN0b3J5VGV4dExpc3QucHVzaCh7XHJcbiAgICAgICAgICAgICAgICBcInJvbGVcIjogXCJhc3Npc3RhbnRcIixcclxuICAgICAgICAgICAgICAgIFwiY29udGVudFwiOiB0aGlzLnRlbXBSZXNcclxuICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgcmVhbFRoaXMuc29ja2V0VGFzay5jbG9zZSh7XHJcbiAgICAgICAgICAgICAgICAgIHN1Y2Nlc3MocmVzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+WFs+mXreaIkOWKnycsIHJlcylcclxuICAgICAgICAgICAgICAgICAgICByZWFsVGhpcy53c0xpdmVGbGFnID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgIGZhaWwoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gY29uc29sZS5sb2coJ+WFs+mXreWksei0pScsIGVycilcclxuICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICB9LCAxMDAwKVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfSlcclxuICAgICAgfSxcclxuICAgICAgLy8g5Yik5pat5paH5a2X5piv5ZCm6LaF6L+H5LqU5Y2D5a2XXHJcbiAgICAgIGlzU3VycGFzcygpIHtcclxuICAgICAgICBsZXQgc3VtID0gdGhpcy5wYXJhbXMucmVkdWNlKChhY2N1bXVsYXRvciw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0OiAxMDBycHg7XHJcbiAgICB9XHJcblxyXG4gICAgLmNvbnRlbnQge1xyXG4gICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmO1xyXG4gICAgICBoZWlnaHQ6IDY0cnB4O1xyXG4gICAgICBwYWRkaW5nOiAwIDIwcnB4O1xyXG4gICAgICBib3JkZXItcmFkaXVzOiA2cnB4O1xyXG4gICAgICBmb250LXNpemU6IDI4cnB4O1xyXG4gICAgfVxyXG5cclxuICAgIC5zZW5kIHtcclxuICAgICAgYmFja2dyb3VuZC1jb2xvcjogIzI1NzNmYjtcclxuICAgICAgY29sb3I6ICNmZmY7XHJcbiAgICAgIGhlaWdodDogNjRycHg7XHJcbiAgICAgIG1hcmdpbi1sZWZ0OiAyMHJweDtcclxuICAgICAgYm9yZGVyLXJhZGl1czogNnJweDtcclxuICAgICAgcGFkZGluZzogMDtcclxuICAgICAgd2lkdGg6IDEyMHJweDtcclxuICAgICAgbGluZS1oZWlnaHQ6IDYycnB4O1xyXG5cclxuICAgICAgJjphY3RpdmUge1xyXG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6ICMxNTczZmI7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICB9XHJcblxyXG4gIC50YWxrLWxpc3Qge1xyXG4gICAgcGFkZGluZy1ib3R0b206IDIwcnB4O1xyXG5cclxuICAgIC8qIOa2iOaBr+mhue+8jOWfuuehgOexuyAqL1xyXG4gICAgLml0ZW0ge1xyXG4gICAgICBwYWRkaW5nOiAyMHJweCAyMHJweCAwIDIwcnB4O1xyXG4gICAgICBhbGlnbi1pdGVtczogZmxleC1zdGFydDtcclxuICAgICAgYWxpZ24tY29udGVudDogZmxleC1zdGFydDtcclxuICAgICAgY29sb3I6ICMzMzM7XHJcblxyXG4gICAgICAucGljIHtcclxuICAgICAgICB3aWR0aDogOTJycHg7XHJcbiAgICAgICAgaGVpZ2h0OiA5MnJweDtcclxuICAgICAgICBib3JkZXItcmFkaXVzOiA1MCU7XHJcbiAgICAgICAgYm9yZGVyOiAjZmZmIHNvbGlkIDFweDtcclxuICAgICAgfVxyXG5cclxuICAgICAgLmNvbnRlbnQge1xyXG4gICAgICAgIHBhZGRpbmc6IDIwcnB4O1xyXG4gICAgICAgIGJvcmRlci1yYWRpdXM6IDRweDtcclxuICAgICAgICBtYXgtd2lkdGg6IDUwMHJweDtcclxuICAgICAgICB3b3JkLWJyZWFrOiBicmVhay1hbGw7XHJcbiAgICAgICAgbGluZS1oZWlnaHQ6IDUycnB4O1xyXG4gICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcclxuICAgICAgfVxyXG5cclxuICAgICAgLyog5pS25Yiw55qE5raI5oGvICovXHJcbiAgICAgICYucHVsbCB7XHJcbiAgICAgICAgLmNvbnRlbnQge1xyXG4gICAgICAgICAgbWluLXdpZHRoOiAyMHJweDtcclxuICAgICAgICAgIG1pbi1oZWlnaHQ6IDUycnB4O1xyXG4gICAgICAgICAgbWFyZ2luLWxlZnQ6IDMycnB4O1xyXG4gICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjtcclxuXHJcbiAgICAgICAgICAmOjphZnRlciB7XHJcbiAgICAgICAgICAgIGNvbnRlbnQ6ICcnO1xyXG4gICAgICAgICAgICBkaXNwbGF5OiBibG9jaztcclxuICAgICAgICAgICAgd2lkdGg6IDA7XHJcbiAgICAgICAgICAgIGhlaWdodDogMDtcclxuICAgICAgICAgICAgYm9yZGVyLXRvcDogMTZycHggc29saWQgdHJhbnNwYXJlbnQ7XHJcbiAgICAgICAgICAgIGJvcmRlci1ib3R0b206IDE2cnB4IHNvbGlkIHRyYW5zcGFyZW50O1xyXG4gICAgICAgICAgICBib3JkZXItcmlnaHQ6IDIwcnB4IHNvbGlkICNmZmY7XHJcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcclxuICAgICAgICAgICAgdG9wOiAzMHJweDtcclxuICAgICAgICAgICAgbGVmdDogLTE4cnB4O1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG5cclxuICAgICAgLyog5Y+R5Ye655qE5raI5oGvICovXHJcbiAgICAgICYucHVzaCB7XHJcbiAgICAgICAgLyog5Li76L205Li65rC05bmz5pa55ZCR77yM6LW354K55Zyo5Y+z56uv44CC5L2/5LiN5L+u5pS5RE9N57uT5p6E77yM5Lmf6IO95pS55Y+Y5YWD57Sg5o6S5YiX6aG65bqPICovXHJcbiAgICAgICAgZmxleC1kaXJlY3Rpb246IHJvdy1yZXZlcnNlO1xyXG5cclxuICAgICAgICAuY29udGVudCB7XHJcbiAgICAgICAgICBtaW4td2lkdGg6IDIwcnB4O1xyXG4gICAgICAgICAgbWluLWhlaWdodDogNTJycHg7XHJcbiAgICAgICAgICBtYXJnaW4tcmlnaHQ6IDMycnB4O1xyXG4gICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogIzI1NzNmYjtcclxuICAgICAgICAgIGNvbG9yOiAjZmZmO1xyXG5cclxuICAgICAgICAgICY6OmFmdGVyIHtcclxuICAgICAgICAgICAgY29udGVudDogJyc7XHJcbiAgICAgICAgICAgIGRpc3BsYXk6IGJsb2NrO1xyXG4gICAgICAgICAgICB3aWR0aDogMDtcclxuICAgICAgICAgICAgaGVpZ2h0OiAwO1xyXG4gICAgICAgICAgICBib3JkZXItdG9wOiAxNnJweCBzb2xpZCB0cmFuc3BhcmVudDtcclxuICAgICAgICAgICAgYm9yZGVyLWJvdHRvbTogMTZycHggc29saWQgdHJhbnNwYXJlbnQ7XHJcbiAgICAgICAgICAgIGJvcmRlci1sZWZ0OiAyMHJweCBzb2xpZCAjMjU3M2ZiO1xyXG4gICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XHJcbiAgICAgICAgICAgIHRvcDogMzBycHg7XHJcbiAgICAgICAgICAgIHJpZ2h0OiAtMThycHg7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICAuYmluZy1tYXRoIHtcclxuICAgIG1hcmdpbjogMCAhaW1wb3J0YW50O1xyXG4gICAgcGFkZGluZzogMCAhaW1wb3J0YW50O1xyXG4gIH1cclxuXHJcbiAgLnBsYWNlaG9sZGVyIHtcclxuICAgIHdpZHRoOiAxMDB2dztcclxuICAgIGJhY2tncm91bmQtY29sb3I6ICMxNTczZmI7XHJcbiAgICAvLyBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcclxuICAgIC8vIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgwKTsgLyog5Yid5aeL5YyWIHRyYW5zZm9ybSDlsZ7mgKcgKi9cclxuICAgIC8vIHRyYW5zaXRpb246IHRyYW5zZm9ybSAwLjNzIGVhc2U7IC8qIOa3u+WKoOi/h+a4oeaViOaenCAqL1xyXG4gIH1cclxuXHJcbiAgLmRvd25zb2NrZXQge1xyXG4gICAgZGlzcGxheTogZmxleDtcclxuICAgIGp1c3RpZnktY29udGVudDogY2VudGVyO1xyXG4gICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcclxuICAgIGJhY2tncm91bmQtY29sb3I6ICMyNTczZmIgIWltcG9ydGFudDtcclxuICAgIGNvbG9yOiAjZmZmICFpbXBvcnRhbnQ7XHJcbiAgfVxyXG48L3N0eWxlPiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///32\n"); /***/ }), /* 33 */ @@ -25415,117 +25416,6 @@ eval("\n\n//parse Empty Node as self closing node\nvar _typeof = __webpack_requi /***/ }), /* 208 */ -/*!***********************************************************!*\ - !*** D:/里海数字乡村/xunfeiAi/pages/index/chat.vue?mpType=page ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _chat_vue_vue_type_template_id_4e295d7e_mpType_page__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chat.vue?vue&type=template&id=4e295d7e&mpType=page */ 209);\n/* harmony import */ var _chat_vue_vue_type_script_lang_js_mpType_page__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chat.vue?vue&type=script&lang=js&mpType=page */ 211);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _chat_vue_vue_type_script_lang_js_mpType_page__WEBPACK_IMPORTED_MODULE_1__) if([\"default\"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _chat_vue_vue_type_script_lang_js_mpType_page__WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n/* harmony import */ var _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 15);\n\nvar renderjs\n\n\n\n\n/* normalize component */\n\nvar component = Object(_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n _chat_vue_vue_type_script_lang_js_mpType_page__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n _chat_vue_vue_type_template_id_4e295d7e_mpType_page__WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n _chat_vue_vue_type_template_id_4e295d7e_mpType_page__WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n false,\n null,\n null,\n null,\n false,\n _chat_vue_vue_type_template_id_4e295d7e_mpType_page__WEBPACK_IMPORTED_MODULE_0__[\"components\"],\n renderjs\n)\n\ncomponent.options.__file = \"pages/index/chat.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);//# sourceURL=[module]\n//# sourceMappingURL=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yIGNvbXBvbmVudCA9IG5vcm1hbGl6ZXIoXG4gIHNjcmlwdCxcbiAgcmVuZGVyLFxuICBzdGF0aWNSZW5kZXJGbnMsXG4gIGZhbHNlLFxuICBudWxsLFxuICBudWxsLFxuICBudWxsLFxuICBmYWxzZSxcbiAgY29tcG9uZW50cyxcbiAgcmVuZGVyanNcbilcblxuY29tcG9uZW50Lm9wdGlvbnMuX19maWxlID0gXCJwYWdlcy9pbmRleC9jaGF0LnZ1ZVwiXG5leHBvcnQgZGVmYXVsdCBjb21wb25lbnQuZXhwb3J0cyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///208\n"); - -/***/ }), -/* 209 */ -/*!*****************************************************************************************!*\ - !*** D:/里海数字乡村/xunfeiAi/pages/index/chat.vue?vue&type=template&id=4e295d7e&mpType=page ***! - \*****************************************************************************************/ -/*! exports provided: render, staticRenderFns, recyclableRender, components */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_11_0_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_filter_modules_template_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_chat_vue_vue_type_template_id_4e295d7e_mpType_page__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--11-0!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/filter-modules-template.js!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./chat.vue?vue&type=template&id=4e295d7e&mpType=page */ 210); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_11_0_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_filter_modules_template_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_chat_vue_vue_type_template_id_4e295d7e_mpType_page__WEBPACK_IMPORTED_MODULE_0__["render"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_11_0_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_filter_modules_template_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_chat_vue_vue_type_template_id_4e295d7e_mpType_page__WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_11_0_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_filter_modules_template_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_chat_vue_vue_type_template_id_4e295d7e_mpType_page__WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_11_0_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_filter_modules_template_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_chat_vue_vue_type_template_id_4e295d7e_mpType_page__WEBPACK_IMPORTED_MODULE_0__["components"]; }); - - - -/***/ }), -/* 210 */ -/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--11-0!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/filter-modules-template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!D:/里海数字乡村/xunfeiAi/pages/index/chat.vue?vue&type=template&id=4e295d7e&mpType=page ***! - \*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/*! exports provided: render, staticRenderFns, recyclableRender, components */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; }); -var components -var render = function () { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c("view", [ - _c("input", { - directives: [ - { - name: "model", - rawName: "v-model", - value: _vm.TEXT, - expression: "TEXT", - }, - ], - attrs: { _i: 1 }, - domProps: { value: _vm._$s(1, "v-model", _vm.TEXT) }, - on: { - input: function ($event) { - if ($event.target.composing) { - return - } - _vm.TEXT = $event.target.value - }, - }, - }), - _c("button", { - attrs: { _i: 2 }, - on: { - click: function ($event) { - return _vm.sendToSpark() - }, - }, - }), - _c("text", [_vm._v(_vm._$s(3, "t0-0", _vm._s(_vm.sparkResult)))]), - ]) -} -var recyclableRender = false -var staticRenderFns = [] -render._withStripped = true - - - -/***/ }), -/* 211 */ -/*!***********************************************************************************!*\ - !*** D:/里海数字乡村/xunfeiAi/pages/index/chat.vue?vue&type=script&lang=js&mpType=page ***! - \***********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_7_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_using_components_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_chat_vue_vue_type_script_lang_js_mpType_page__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--7-1!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/using-components.js!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./chat.vue?vue&type=script&lang=js&mpType=page */ 212);\n/* harmony import */ var _HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_7_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_using_components_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_chat_vue_vue_type_script_lang_js_mpType_page__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_7_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_using_components_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_chat_vue_vue_type_script_lang_js_mpType_page__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_7_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_using_components_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_chat_vue_vue_type_script_lang_js_mpType_page__WEBPACK_IMPORTED_MODULE_0__) if([\"default\"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_7_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_using_components_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_chat_vue_vue_type_script_lang_js_mpType_page__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_7_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_using_components_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_chat_vue_vue_type_script_lang_js_mpType_page__WEBPACK_IMPORTED_MODULE_0___default.a); //# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbbnVsbF0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQTJpQixDQUFnQixxa0JBQUcsRUFBQyIsImZpbGUiOiIyMTEuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgbW9kIGZyb20gXCItIS4uLy4uLy4uLy4uL0hCdWlsZGVyWC9wbHVnaW5zL3VuaWFwcC1jbGkvbm9kZV9tb2R1bGVzL2JhYmVsLWxvYWRlci9saWIvaW5kZXguanMhLi4vLi4vLi4vLi4vSEJ1aWxkZXJYL3BsdWdpbnMvdW5pYXBwLWNsaS9ub2RlX21vZHVsZXMvQGRjbG91ZGlvL3Z1ZS1jbGktcGx1Z2luLXVuaS9wYWNrYWdlcy93ZWJwYWNrLXByZXByb2Nlc3MtbG9hZGVyL2luZGV4LmpzPz9yZWYtLTctMSEuLi8uLi8uLi8uLi9IQnVpbGRlclgvcGx1Z2lucy91bmlhcHAtY2xpL25vZGVfbW9kdWxlcy9AZGN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nMhLi9jaGF0LnZ1ZT92dWUmdHlwZT1zY3JpcHQmbGFuZz1qcyZtcFR5cGU9cGFnZVwiIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///211\n"); - -/***/ }), -/* 212 */ -/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--7-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/using-components.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!D:/里海数字乡村/xunfeiAi/pages/index/chat.vue?vue&type=script&lang=js&mpType=page ***! - \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/* WEBPACK VAR INJECTION */(function(__f__) {\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 1);\nvar _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 4);\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 33));\nvar _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 35));\nvar base64 = _interopRequireWildcard(__webpack_require__(/*! base-64 */ 36));\nvar _cryptoJs = _interopRequireDefault(__webpack_require__(/*! ../../static/crypto-js/crypto-js.js */ 40));\nvar _parser = _interopRequireDefault(__webpack_require__(/*! ../../static/fast-xml-parser/src/parser */ 198));\nvar utf8 = _interopRequireWildcard(__webpack_require__(/*! utf8 */ 207));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n // https://spark-api.xf-yun.com/v1.1/chat V1.5 domain general\n // https://spark-api.xf-yun.com/v2.1/chat V2.0 domain generalv2\n data: function data() {\n return {\n TEXT: '你好,我的名字叫大王',\n APPID: '2eda6c2e',\n // 控制台获取填写\n APISecret: 'MDEyMzE5YTc5YmQ5NjMwOTU1MWY4N2Y2',\n APIKey: '12ec1f9d113932575fc4b114a2f60ffd',\n sparkResult: '',\n historyTextList: [],\n // 历史会话信息,由于最大token12000,可以结合实际使用,进行移出\n tempRes: '' // 临时答复保存\n };\n },\n\n methods: {\n sendToSpark: function sendToSpark() {\n var _this = this;\n return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {\n var myUrl, realThis;\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return _this.getWebSocketUrl();\n case 2:\n myUrl = _context.sent;\n _this.tempRes = \"\";\n // this.sparkResult = \"\";\n realThis = _this;\n _this.socketTask = uni.connectSocket({\n //url: encodeURI(encodeURI(myUrl).replace(/\\+/g, '%2B')),\n url: myUrl,\n method: 'GET',\n success: function success(res) {\n __f__(\"log\", res, \"ws成功连接...\", myUrl, \" at pages/index/chat.vue:39\");\n realThis.wsLiveFlag = true;\n }\n });\n realThis.socketTask.onError(function (res) {\n __f__(\"log\", \"连接发生错误,请检查appid是否填写\", res, \" at pages/index/chat.vue:44\");\n });\n realThis.socketTask.onOpen(function (res) {\n _this.historyTextList.push({\n \"role\": \"user\",\n \"content\": _this.TEXT\n });\n __f__(\"info\", \"wss的onOpen成功执行...\", res, \" at pages/index/chat.vue:51\");\n // 第一帧..........................................\n __f__(\"log\", 'open成功...', \" at pages/index/chat.vue:53\");\n var params = {\n \"header\": {\n \"app_id\": _this.APPID,\n \"uid\": \"aef9f963-7\"\n },\n \"parameter\": {\n \"chat\": {\n \"domain\": \"generalv2\",\n \"temperature\": 0.5,\n \"max_tokens\": 1024\n }\n },\n \"payload\": {\n \"message\": {\n \"text\": _this.historyTextList\n }\n }\n };\n __f__(\"log\", \"请求的params:\" + JSON.stringify(params), \" at pages/index/chat.vue:72\");\n _this.sparkResult = _this.sparkResult + \"\\r\\n我:\" + _this.TEXT + \"\\r\\n\";\n _this.sparkResult = _this.sparkResult + \"大模型:\";\n __f__(\"log\", \"发送第一帧...\", params, \" at pages/index/chat.vue:75\");\n realThis.socketTask.send({\n // 发送消息,,都用uni的官方版本\n data: JSON.stringify(params),\n success: function success() {\n __f__(\"log\", '第一帧发送成功', \" at pages/index/chat.vue:79\");\n }\n });\n });\n\n // 接受到消息时\n realThis.socketTask.onMessage(function (res) {\n __f__(\"log\", '收到API返回的内容:', res.data, \" at pages/index/chat.vue:86\");\n var obj = JSON.parse(res.data);\n // console.log(\"我打印的\"+obj.payload);\n var dataArray = obj.payload.choices.text;\n for (var i = 0; i < dataArray.length; i++) {\n realThis.sparkResult = realThis.sparkResult + dataArray[i].content;\n realThis.tempRes = realThis.tempRes + dataArray[i].content;\n }\n // realThis.sparkResult =realThis.sparkResult+ \n var temp = JSON.parse(res.data);\n // console.log(\"0726\",temp.header.code)\n if (temp.header.code !== 0) {\n __f__(\"log\", \"\".concat(temp.header.code, \":\").concat(temp.message), \" at pages/index/chat.vue:98\");\n realThis.socketTask.close({\n success: function success(res) {\n __f__(\"log\", '关闭成功', res, \" at pages/index/chat.vue:101\");\n realThis.wsLiveFlag = false;\n },\n fail: function fail(err) {\n __f__(\"log\", '关闭失败', err, \" at pages/index/chat.vue:105\");\n }\n });\n }\n if (temp.header.code === 0) {\n if (res.data && temp.header.status === 2) {\n realThis.sparkResult = realThis.sparkResult + \"\\r\\n**********************************************\";\n _this.historyTextList.push({\n \"role\": \"assistant\",\n \"content\": _this.tempRes\n });\n /* let dataArray= obj.payload.choices.text;\n for(let i=0;i tag // load the styles -var content = __webpack_require__(/*! !../../HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!../../HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src??ref--6-oneOf-1-3!../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/style.js!./App.vue?vue&type=style&index=0&lang=css& */ 36); +var content = __webpack_require__(/*! !../../HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!../../HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src??ref--6-oneOf-1-3!../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/style.js!./App.vue?vue&type=style&index=0&lang=css& */ 31); if(content.__esModule) content = content.default; if(typeof content === 'string') content = [[module.i, content, '']]; if(content.locals) module.exports = content.locals; @@ -1855,7 +1687,7 @@ var update = add("547d3d93", content, false, {"sourceMap":false,"shadowMode":fal if(false) {} /***/ }), -/* 36 */ +/* 31 */ /*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!./node_modules/postcss-loader/src??ref--6-oneOf-1-3!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/style.js!D:/里海数字乡村/xunfeiAi/App.vue?vue&type=style&index=0&lang=css& ***! \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ @@ -1866,7 +1698,7 @@ if(false) {} var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/runtime/api.js */ 26); exports = ___CSS_LOADER_API_IMPORT___(false); // Module -exports.push([module.i, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/*每个页面公共css */\n", ""]); +exports.push([module.i, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/*每个页面公共css */\n", ""]); // Exports module.exports = exports; diff --git a/unpackage/dist/dev/app-plus/manifest.json b/unpackage/dist/dev/app-plus/manifest.json index 299e55a..f1684ac 100644 --- a/unpackage/dist/dev/app-plus/manifest.json +++ b/unpackage/dist/dev/app-plus/manifest.json @@ -1 +1 @@ -{"@platforms":["android","iPhone","iPad"],"id":"__UNI__9620511","name":"xunfeiAi","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"google":{"permissions":["","","","","","","","","","","","","","",""],"abiFilters":["armeabi-v7a","arm64-v8a","x86"]},"apple":{"dSYMs":false},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false},"arguments":"{\"name\":\"\",\"path\":\"\",\"query\":\"\",\"id\":0}","allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.8.12","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html"}} \ No newline at end of file +{"@platforms":["android","iPhone","iPad"],"id":"__UNI__9620511","name":"农业咨询","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"google":{"permissions":["","","","","","","","","","","","","","",""],"abiFilters":["armeabi-v7a","arm64-v8a","x86"]},"apple":{"dSYMs":false},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false},"arguments":"{\"name\":\"\",\"path\":\"\",\"query\":\"\",\"id\":0}","allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.8.12","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html"}} \ No newline at end of file diff --git a/unpackage/dist/dev/app-plus/static/avatar.png b/unpackage/dist/dev/app-plus/static/avatar.png index 4aa23de..2f531da 100644 Binary files a/unpackage/dist/dev/app-plus/static/avatar.png and b/unpackage/dist/dev/app-plus/static/avatar.png differ diff --git a/unpackage/dist/dev/app-plus/static/iat.png b/unpackage/dist/dev/app-plus/static/iat.png deleted file mode 100644 index eb114a9..0000000 Binary files a/unpackage/dist/dev/app-plus/static/iat.png and /dev/null differ diff --git a/unpackage/dist/dev/app-plus/static/iat_active.png b/unpackage/dist/dev/app-plus/static/iat_active.png deleted file mode 100644 index 7310a3a..0000000 Binary files a/unpackage/dist/dev/app-plus/static/iat_active.png and /dev/null differ diff --git a/unpackage/dist/dev/app-plus/static/ise.png b/unpackage/dist/dev/app-plus/static/ise.png deleted file mode 100644 index 1b2991a..0000000 Binary files a/unpackage/dist/dev/app-plus/static/ise.png and /dev/null differ diff --git a/unpackage/dist/dev/app-plus/static/ise_active.png b/unpackage/dist/dev/app-plus/static/ise_active.png deleted file mode 100644 index 71e7578..0000000 Binary files a/unpackage/dist/dev/app-plus/static/ise_active.png and /dev/null differ diff --git a/unpackage/dist/dev/app-plus/static/logo.png b/unpackage/dist/dev/app-plus/static/logo.png deleted file mode 100644 index b5771e2..0000000 Binary files a/unpackage/dist/dev/app-plus/static/logo.png and /dev/null differ diff --git a/unpackage/dist/dev/app-plus/static/tts.png b/unpackage/dist/dev/app-plus/static/tts.png deleted file mode 100644 index c33108b..0000000 Binary files a/unpackage/dist/dev/app-plus/static/tts.png and /dev/null differ diff --git a/unpackage/dist/dev/app-plus/static/tts_avtive.png b/unpackage/dist/dev/app-plus/static/tts_avtive.png deleted file mode 100644 index a7f8be8..0000000 Binary files a/unpackage/dist/dev/app-plus/static/tts_avtive.png and /dev/null differ