ecinc-cloud-moahygl 9.5.236 → 9.5.237

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1170,6 +1170,378 @@ module.exports = {
1170
1170
  }
1171
1171
  };
1172
1172
 
1173
+ /***/ }),
1174
+
1175
+ /***/ 7462:
1176
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1177
+
1178
+ "use strict";
1179
+ // ESM COMPAT FLAG
1180
+ __webpack_require__.r(__webpack_exports__);
1181
+
1182
+ // EXPORTS
1183
+ __webpack_require__.d(__webpack_exports__, {
1184
+ DrawBoard: function() { return /* binding */ DrawBoard; }
1185
+ });
1186
+
1187
+ ;// CONCATENATED MODULE: ./packages/ecmoa/hygl/src/ipad/drawboard/tools/pen.js
1188
+ var Pen = {};
1189
+ Pen.canvas = null;
1190
+ Pen.context = null;
1191
+
1192
+ // Variable
1193
+ Pen._config = {
1194
+ color: '#000000',
1195
+ weight: 1
1196
+ };
1197
+ Pen.points = []; // 线条描点存储
1198
+ Pen.startPoint = null; // 线条绘制起点
1199
+
1200
+ /**
1201
+ * @param {Object} config 画笔配置
1202
+ */
1203
+ Pen.constructor = function (target, config) {
1204
+ Pen.canvas = target;
1205
+ Pen.context = target.getContext('2d');
1206
+ if (config) {
1207
+ Pen._config = Object.assign(Pen._config, config);
1208
+ }
1209
+ Pen.setListener(target);
1210
+ Pen.setPenConfig(Pen._config);
1211
+ };
1212
+
1213
+ // methods
1214
+ Pen.setPenConfig = function (_config) {
1215
+ var context = Pen.context;
1216
+ context.lineJoin = 'round';
1217
+ context.lineCap = 'round';
1218
+ };
1219
+ Pen.setListener = function (target) {
1220
+ target.addEventListener('mousedown', Pen.startDrawing, false);
1221
+ target.addEventListener('mouseup', Pen.stopDrawing, false);
1222
+ target.addEventListener('touchstart', Pen.startDrawing, false);
1223
+ target.addEventListener('touchend', Pen.stopDrawing, false);
1224
+ };
1225
+ Pen.removeListener = function (target) {
1226
+ target.removeEventListener('mousedown', Pen.startDrawing, false);
1227
+ target.removeEventListener('mouseup', Pen.stopDrawing, false);
1228
+ target.removeEventListener('touchstart', Pen.startDrawing, false);
1229
+ target.removeEventListener('touchend', Pen.stopDrawing, false);
1230
+ };
1231
+ // 绘制二次贝塞尔曲线
1232
+ Pen.drawLine = function (beginPoint, controlPoint, endPoint) {
1233
+ var context = Pen.context;
1234
+ context.beginPath();
1235
+ context.moveTo(beginPoint.x, beginPoint.y);
1236
+ context.quadraticCurveTo(controlPoint.x, controlPoint.y, endPoint.x, endPoint.y);
1237
+ context.stroke();
1238
+ context.closePath();
1239
+ };
1240
+ // 开始绘制
1241
+ Pen.startDrawing = function (evt) {
1242
+ var canvas = Pen.canvas,
1243
+ _config = Pen._config,
1244
+ context = Pen.context;
1245
+ var _Pen$getPoint = Pen.getPoint(evt),
1246
+ x = _Pen$getPoint.x,
1247
+ y = _Pen$getPoint.y;
1248
+ context.strokeStyle = _config.color;
1249
+ context.lineWidth = _config.weight;
1250
+ Pen.startPoint = {
1251
+ x: x,
1252
+ y: y
1253
+ };
1254
+ Pen.points.push(Pen.startPoint);
1255
+ canvas.addEventListener('mousemove', Pen.onDrawing, false);
1256
+ canvas.addEventListener('touchmove', Pen.onDrawing, false);
1257
+ };
1258
+ // 拖动鼠标绘制
1259
+ Pen.onDrawing = function (evt) {
1260
+ evt.preventDefault();
1261
+ var points = Pen.points;
1262
+ var _Pen$getPoint2 = Pen.getPoint(evt),
1263
+ x = _Pen$getPoint2.x,
1264
+ y = _Pen$getPoint2.y;
1265
+ points.push({
1266
+ x: x,
1267
+ y: y
1268
+ });
1269
+ if (points.length > 3) {
1270
+ var lastTwoPoints = points.slice(-2);
1271
+ var controlPoint = lastTwoPoints[0]; // 控制点
1272
+ var endPoint = {
1273
+ x: (lastTwoPoints[0].x + lastTwoPoints[1].x) / 2,
1274
+ y: (lastTwoPoints[0].y + lastTwoPoints[1].y) / 2
1275
+ };
1276
+ Pen.drawLine(Pen.startPoint, controlPoint, endPoint);
1277
+ Pen.startPoint = endPoint;
1278
+ }
1279
+ };
1280
+ // 绘制结束
1281
+ Pen.stopDrawing = function (evt) {
1282
+ var canvas = Pen.canvas,
1283
+ points = Pen.points,
1284
+ startPoint = Pen.startPoint;
1285
+ canvas.removeEventListener('mousemove', Pen.onDrawing);
1286
+ canvas.removeEventListener('touchmove', Pen.onDrawing);
1287
+ var _Pen$getPoint3 = Pen.getPoint(evt),
1288
+ x = _Pen$getPoint3.x,
1289
+ y = _Pen$getPoint3.y;
1290
+ points.push({
1291
+ x: x,
1292
+ y: y
1293
+ });
1294
+ if (points.length > 3) {
1295
+ var lastTwoPoints = points.slice(-2);
1296
+ var controlPoint = lastTwoPoints[0];
1297
+ var endPoint = lastTwoPoints[1];
1298
+ Pen.drawLine(startPoint, controlPoint, endPoint);
1299
+ }
1300
+ Pen.runningHistory && Pen.runningHistory.add({
1301
+ type: 'pen',
1302
+ points: points,
1303
+ config: Pen._config
1304
+ });
1305
+ Pen.startPoint = null;
1306
+ Pen.points = [];
1307
+ };
1308
+ // 获取当前坐标
1309
+ Pen.getPoint = function (evt) {
1310
+ var x = null;
1311
+ var y = null;
1312
+ if (evt.touches && evt.touches[0]) {
1313
+ var canvasOffset = Pen.canvas.getBoundingClientRect();
1314
+ var touch = evt.touches[0];
1315
+ var computedX = touch.pageX - canvasOffset.x;
1316
+ var computedY = touch.pageY - canvasOffset.y;
1317
+ var scale = Pen.canvas.height / Pen.canvas.clientHeight;
1318
+ x = computedX * scale;
1319
+ y = computedY * scale;
1320
+ } else {
1321
+ x = evt.offsetX;
1322
+ y = evt.offsetY;
1323
+ }
1324
+ return {
1325
+ x: x,
1326
+ y: y
1327
+ };
1328
+ };
1329
+
1330
+ ;// CONCATENATED MODULE: ./packages/ecmoa/hygl/src/ipad/drawboard/utils/history.js
1331
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
1332
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1333
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
1334
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
1335
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
1336
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1337
+ var History = {};
1338
+ History.cacheStack = [];
1339
+ History.step = null;
1340
+ History.constructor = function (cache) {
1341
+ if (!cache) return;
1342
+ History.cacheStack = _toConsumableArray(cache.cacheStack);
1343
+ History.step = cache.step;
1344
+ };
1345
+ History.add = function (drawData) {
1346
+ if (drawData.type && drawData.points instanceof Array) {
1347
+ History.cacheStack.push(drawData);
1348
+ History.step++;
1349
+ }
1350
+ };
1351
+
1352
+ ;// CONCATENATED MODULE: ./packages/ecmoa/hygl/src/ipad/drawboard/index.js
1353
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
1354
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
1355
+ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
1356
+ function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
1357
+
1358
+
1359
+ var DrawBoard = {};
1360
+
1361
+ // 画布
1362
+ DrawBoard.canvas = null;
1363
+ DrawBoard.context = null;
1364
+
1365
+ // canvas configs
1366
+ DrawBoard._MODE = null; // 当前绘图模式
1367
+ DrawBoard._TOOL = null; // 当前绘图工具实例对象
1368
+ DrawBoard._config = {
1369
+ // 基础配置
1370
+ width: 0,
1371
+ height: 0
1372
+ };
1373
+
1374
+ // cache
1375
+ DrawBoard.runningHistory = null;
1376
+
1377
+ /**
1378
+ * @param {Element} canvasElement 画布元素
1379
+ */
1380
+ DrawBoard.constructor = function (canvasElement) {
1381
+ DrawBoard.canvas = canvasElement;
1382
+ DrawBoard.context = canvasElement.getContext('2d');
1383
+ DrawBoard._config = Object.assign(DrawBoard._config, {
1384
+ width: canvasElement.width,
1385
+ height: canvasElement.height
1386
+ });
1387
+ };
1388
+ DrawBoard.install = function () {
1389
+ var canvas = DrawBoard.canvas;
1390
+ var canvasHistory = canvas.CACHE_STACK ? canvas.CACHE_STACK : null;
1391
+ DrawBoard.runningHistory = new History(canvasHistory);
1392
+ return DrawBoard;
1393
+ };
1394
+ DrawBoard.uninstall = function () {
1395
+ DrawBoard.canvas.CACHE_STACK = DrawBoard.runningHistory;
1396
+ DrawBoard.removeEvents();
1397
+ };
1398
+
1399
+ // canvas methods
1400
+ // 清除canvas内容
1401
+ DrawBoard.clear = function () {
1402
+ var _DrawBoard$_config = DrawBoard._config,
1403
+ width = _DrawBoard$_config.width,
1404
+ height = _DrawBoard$_config.height;
1405
+ DrawBoard.context.clearRect(0, 0, width, height);
1406
+ };
1407
+ // 清除事件监听
1408
+ DrawBoard.removeEvents = function () {
1409
+ var _TOOL = DrawBoard._TOOL,
1410
+ canvas = DrawBoard.canvas;
1411
+ _TOOL.removeListener(canvas);
1412
+ };
1413
+ DrawBoard.setColor = function (color) {
1414
+ DrawBoard._TOOL._config.color = color;
1415
+ };
1416
+ DrawBoard.setWeight = function (weight) {
1417
+ DrawBoard._TOOL._config.weight = weight;
1418
+ };
1419
+ // 工具使用
1420
+ DrawBoard.use = function (tool, config) {
1421
+ var canvas = DrawBoard.canvas;
1422
+ switch (tool) {
1423
+ case 'pen':
1424
+ DrawBoard._TOOL && DrawBoard._TOOL.removeListener(canvas);
1425
+ DrawBoard._MODE = tool;
1426
+ DrawBoard._TOOL = new Pen(canvas, config || null);
1427
+ console.log('DrawBoard._TOOL => ', DrawBoard._TOOL);
1428
+ DrawBoard._TOOL.runningHistory = DrawBoard.runningHistory;
1429
+ break;
1430
+ default:
1431
+ break;
1432
+ }
1433
+ };
1434
+
1435
+ /**
1436
+ * @description: 以每一次绘画为单位,通过存储的定位points,取最小xy作为绘画起点,最大xy作为宽高,同时留出10像素的间隔
1437
+ * @param {Array} points 定位数据
1438
+ * @return {Object} x、y、width、height
1439
+ */
1440
+ DrawBoard.getImageInfo = function (points) {
1441
+ var minX = null;
1442
+ var minY = null;
1443
+ var maxX = null;
1444
+ var maxY = null;
1445
+ points.forEach(function (item, index) {
1446
+ var x = item.x,
1447
+ y = item.y;
1448
+ if (index === 0) {
1449
+ minX = maxX = x;
1450
+ minY = maxY = y;
1451
+ return;
1452
+ }
1453
+ minX = x < minX ? x : minX;
1454
+ maxX = x > maxX ? x : maxX;
1455
+ minY = y < minY ? y : minY;
1456
+ maxY = y > maxY ? y : maxY;
1457
+ });
1458
+ return {
1459
+ x: minX - 5,
1460
+ y: minY - 5,
1461
+ width: maxX - minX + 10,
1462
+ height: maxY - minY + 10
1463
+ };
1464
+ };
1465
+
1466
+ /**
1467
+ * @description: 获取每一个step的图像
1468
+ * @param {String} type 输出类型 blob/base64
1469
+ * @param {String} quality 输出质量 0 ~ 1 (仅blob)
1470
+ * @return {Array} 带有图像的数组
1471
+ */
1472
+ DrawBoard.getEachImage = function () {
1473
+ var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'blob';
1474
+ var quality = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '1.0';
1475
+ var results = [];
1476
+ DrawBoard.runningHistory.cacheStack.forEach( /*#__PURE__*/function () {
1477
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cache) {
1478
+ var imageInfo, imageData;
1479
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1480
+ while (1) switch (_context.prev = _context.next) {
1481
+ case 0:
1482
+ imageInfo = DrawBoard.getImageInfo(cache.points);
1483
+ _context.next = 3;
1484
+ return DrawBoard.getImageFromCanvas(imageInfo, type, quality);
1485
+ case 3:
1486
+ imageData = _context.sent;
1487
+ results.push(imageData);
1488
+ case 5:
1489
+ case "end":
1490
+ return _context.stop();
1491
+ }
1492
+ }, _callee);
1493
+ }));
1494
+ return function (_x) {
1495
+ return _ref.apply(this, arguments);
1496
+ };
1497
+ }());
1498
+ return results;
1499
+ };
1500
+ /**
1501
+ * @description: 获取每一个step的图像信息
1502
+ * @return {Array} 图像信息的数组
1503
+ */
1504
+ DrawBoard.getEachImageInfo = function () {
1505
+ var results = [];
1506
+ DrawBoard.runningHistory.cacheStack.forEach(function (cache) {
1507
+ var imageInfo = DrawBoard.getImageInfo(cache.points);
1508
+ results.push(imageInfo);
1509
+ });
1510
+ return results;
1511
+ };
1512
+
1513
+ /**
1514
+ * @description: 从主画布剪切导出图片
1515
+ * @param {Object} imageInfo 图片定位以及各类对象数据
1516
+ * @param {String} type 输出类型 blob/base64
1517
+ * @param {String} quality 输出质量 0 ~ 1
1518
+ * @return {*}
1519
+ */
1520
+ DrawBoard.getImageFromCanvas = function (imageInfo, type, quality) {
1521
+ var x = imageInfo.x,
1522
+ y = imageInfo.y,
1523
+ width = imageInfo.width,
1524
+ height = imageInfo.height;
1525
+ var Temp = document.createElement('canvas');
1526
+ Temp.height = height;
1527
+ Temp.width = width;
1528
+ Temp.setAttribute('style', "height:".concat(height, "px;width:").concat(width, "px;"));
1529
+ var TempContent = Temp.getContext('2d');
1530
+ TempContent.drawImage(DrawBoard.canvas, x, y, width, height, 0, 0, width, height);
1531
+ return new Promise(function (resolve) {
1532
+ if (type === 'blob') {
1533
+ Temp.toBlob(function (blob) {
1534
+ resolve(blob);
1535
+ }, quality);
1536
+ }
1537
+ if (type === 'base64') {
1538
+ var result = Temp.toDataURL('image/png');
1539
+ resolve(result);
1540
+ }
1541
+ });
1542
+ };
1543
+
1544
+
1173
1545
  /***/ }),
1174
1546
 
1175
1547
  /***/ 5824:
@@ -1518,7 +1890,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".contain-box[data-v-8b74d980]{width:50
1518
1890
 
1519
1891
  /***/ }),
1520
1892
 
1521
- /***/ 4519:
1893
+ /***/ 3932:
1522
1894
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1523
1895
 
1524
1896
  "use strict";
@@ -1532,7 +1904,7 @@ __webpack_require__.r(__webpack_exports__);
1532
1904
 
1533
1905
  var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
1534
1906
  // Module
1535
- ___CSS_LOADER_EXPORT___.push([module.id, ".lyy-collapse[data-v-518c81ba] .van-collapse-item .van-cell{padding:15px 16px 16px}[data-v-518c81ba] .van-collapse-item__content{padding:0 16px}a[data-v-518c81ba]{color:#333}.sidebarBox[data-v-518c81ba]{position:fixed;left:0;top:0;width:5.5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-top:80px;padding-top:30px;height:calc(100vh - 100px);border-right:1px solid #e0e0e0}.contain[data-v-518c81ba]{height:100vh;width:100%}.content[data-v-518c81ba]{width:calc(100% - 5.5rem);height:calc(100% - 80px);padding-left:5.5rem;background:#f9f9f9}.side-item[data-v-518c81ba]{height:6.25rem;width:100%;color:#333;font-size:calc(16px + var(--fontSizeSetup))}.side-item .item-box[data-v-518c81ba]{margin-top:1rem;text-align:center}.side-item .item-box .box-img[data-v-518c81ba]{width:2rem;height:2rem;margin:0 auto}.side-item .item-box .box-img img[data-v-518c81ba]{width:100%;height:100%}.header-box[data-v-518c81ba]{display:-webkit-box;display:-ms-flexbox;display:flex;background:#53a8ff;text-align:center;position:relative;font-size:calc(18px + var(--fontSizeSetup));height:80px;line-height:90px}.title[data-v-518c81ba]{display:inline-block;color:#fff;font-weight:700;overflow:hidden;-webkit-box-flex:1;-ms-flex:1;flex:1;white-space:nowrap;text-overflow:ellipsis}.active[data-v-518c81ba]{color:#53a8ff;background:rgba(83,168,255,.1)}.back[data-v-518c81ba]{position:absolute;left:1rem;line-height:90px}[data-v-518c81ba] .van-popup--left{left:inherit!important;top:80px;-webkit-transform:none;transform:none}.paper-box[data-v-518c81ba]{margin:.63rem;border:1px solid #ebedf0;border-radius:4px}.ziliao-title[data-v-518c81ba]{font-size:calc(16px + var(--fontSizeSetup));font-weight:600;color:#333}.ziliao-img[data-v-518c81ba]{width:1.5rem;height:1.5rem;margin-right:.5rem}.ziliao-content[data-v-518c81ba]{padding:1.25rem 0 1.25rem 2.7rem;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative}.ziliao-content[data-v-518c81ba]:after{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;content:\" \";pointer-events:none;right:0;bottom:0;left:1.5rem;border-bottom:1px solid #e0e0e0;-webkit-transform:scaleY(.5);transform:scaleY(.5);display:block}.ziliao-content .ziliao-content-img[data-v-518c81ba]{width:1.82rem;height:2.25rem}.ziliao-content .ziliao-content-img img[data-v-518c81ba]{width:100%;height:100%}.ziliao-content .title-ziliao[data-v-518c81ba]{font-size:calc(14px + var(--fontSizeSetup));font-weight:400;color:#333}.ziliao-content .ziliao-content-title[data-v-518c81ba]{-webkit-box-flex:1;-ms-flex:1;flex:1;margin-left:1rem}.nbcontent .ziliao-content[data-v-518c81ba]:last-child:after{border-bottom:none}.yiti-box[data-v-518c81ba]{background:#fff;margin:.63rem;border:1px solid #ebedf0;border-radius:4px}.yiti-box .ziliao-title[data-v-518c81ba]{font-size:calc(16px + var(--fontSizeSetup));font-weight:600;color:#333}.yiti-box .ziliao-img[data-v-518c81ba]{width:1.5rem;height:1.5rem;margin-right:.5rem}.yiti-box .yiti-title[data-v-518c81ba]{font-size:calc(16px + var(--fontSizeSetup));font-weight:600;color:#333;padding:15px 16px 16px}.yiti-box .yiti-orderNo[data-v-518c81ba]{color:#ec8423;width:1.5rem;height:1.5rem;text-align:center;margin-right:.8rem;border:2px solid #ec8423;border-radius:50%}.flex-box[data-v-518c81ba]{display:-webkit-box;display:-ms-flexbox;display:flex}.between-box[data-v-518c81ba]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.Marg15[data-v-518c81ba]{margin-right:1.5rem}.MarL15[data-v-518c81ba]{margin-left:1.25rem}.btn[data-v-518c81ba]{width:5.63rem}.saveBtn[data-v-518c81ba]{width:calc(100% - 40px);margin-bottom:20px;padding:10px 0;color:#fff;background:#53a8ff;text-align:center;margin-left:20px}.input-box[data-v-518c81ba]{height:200px;width:100%}[data-v-518c81ba] .van-field__body,[data-v-518c81ba] .van-field__control{height:100%}.header-dialog[data-v-518c81ba]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 20px;height:54px;background:#f3f4f4;font-size:18px;border-radius:4px 4px 0 0}.containmeet[data-v-518c81ba]{height:100%}#bodyfilebox[data-v-518c81ba]{height:100%;border:1px solid #ebeef5}#bodyfilebox .edit-button[data-v-518c81ba]{position:fixed;bottom:50px;right:30px;border:1px solid #494949;color:#fff;background:#494949;height:40px;width:40px;text-align:center;line-height:40px;border-radius:50%;font-size:23px;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 3px 8px rgba(0,0,0,.24);box-shadow:0 3px 8px rgba(0,0,0,.24)}#bodyfilebox .color-group[data-v-518c81ba]{bottom:110px;padding:6px}#bodyfilebox .color-group[data-v-518c81ba],#bodyfilebox .line-group[data-v-518c81ba]{position:fixed;display:-webkit-box;display:-ms-flexbox;display:flex;right:80px;background:#fff;border-radius:5px;-webkit-box-shadow:0 3px 8px rgba(0,0,0,.24);box-shadow:0 3px 8px rgba(0,0,0,.24)}#bodyfilebox .line-group[data-v-518c81ba]{bottom:170px;padding:6px 18px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:29px;width:130px}#bodyfilebox .color-group-item[data-v-518c81ba]{display:block;height:30px;width:30px;border-radius:50%;background:#000;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #494949;margin:0 5px}#bodyfilebox .color-button[data-v-518c81ba],#bodyfilebox .line-button-outside[data-v-518c81ba]{background:#fff;padding:5px;border:none}#bodyfilebox .line-button-outside[data-v-518c81ba]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}#bodyfilebox .color-view[data-v-518c81ba]{width:100%;height:100%;border-radius:50%}#bodyfilebox .line-view[data-v-518c81ba]{width:80%;background:#000;height:1px;border-radius:2px}#bodyfilebox .line-button[data-v-518c81ba]{width:22px;color:#fff;font-size:10px;line-height:18px;text-align:center;background-color:#1989fa;border-radius:100px}#bodyfilebox .success[data-v-518c81ba]{background:#07c160;border:1px solid #07c160}[data-v-518c81ba] #viewerContainer{top:0!important}[data-v-518c81ba] .toolbar{position:fixed!important;bottom:0!important}.headerMessageName[data-v-518c81ba]{text-align:left;padding-left:50px}.keywordDialog[data-v-518c81ba]{top:60%}.van-cell__title[data-v-518c81ba]{width:calc(100% - 32px)}.cell-flex-title[data-v-518c81ba]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.cell-flex-label .cell-flex-item[data-v-518c81ba],.cell-flex-title[data-v-518c81ba],.cell-flex-title .cell-flex-item[data-v-518c81ba]{display:-webkit-box;display:-ms-flexbox;display:flex}.text-overflow[data-v-518c81ba]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-v-518c81ba] .van-dialog__content{height:90%;overflow-y:auto}[data-v-518c81ba] .van-dialog__header{padding-top:16px!important;padding-bottom:9px!important;margin-bottom:1px!important;border-bottom:1px solid #999!important}.recordMask[data-v-518c81ba]{position:fixed;min-height:560px;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.5);z-index:3000}.recordDiv[data-v-518c81ba]{width:600px;height:500px;background:#fff;border-radius:4px;top:54%;left:50%;position:absolute;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.footer[data-v-518c81ba]{width:100%;height:64px;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;padding:0 20px;-webkit-box-sizing:border-box;box-sizing:border-box;border-top:1px solid #dee2e6}.btn[data-v-518c81ba],.footer[data-v-518c81ba]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.btn[data-v-518c81ba]{width:85px;height:35px;border-radius:3px;font-size:14px;padding:0 12px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.cbtn[data-v-518c81ba]{background:#fff;color:#333}.cbtn[data-v-518c81ba],.qbtn[data-v-518c81ba]{border:1px solid #ebeef5}.qbtn[data-v-518c81ba]{background:#53a8ff;color:#fff}.btn[data-v-518c81ba] .van-button__content{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.btn[data-v-518c81ba] .van-button__content .van-button__icon{font-size:10px}.cell-flex-box[data-v-518c81ba]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.cell-flex-box .delete-button[data-v-518c81ba]{color:#53a8ff;position:absolute;right:0}.cell-flex-box .add-button[data-v-518c81ba]{color:#53a8ff;font-size:14px;text-align:center;line-height:50px}.cell-flex-item[data-v-518c81ba]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-wrap:nowrap;text-overflow:ellipsis;margin-right:45px}.cell-flex-box .cell-flex-item[data-v-518c81ba]:nth-child(2){text-align:right}.no-more[data-v-518c81ba]{color:#969799;font-size:14px;line-height:50px;text-align:center}", ""]);
1907
+ ___CSS_LOADER_EXPORT___.push([module.id, ".lyy-collapse[data-v-2d6ff378] .van-collapse-item .van-cell{padding:15px 16px 16px}[data-v-2d6ff378] .van-collapse-item__content{padding:0 16px}a[data-v-2d6ff378]{color:#333}.sidebarBox[data-v-2d6ff378]{position:fixed;left:0;top:0;width:5.5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-top:80px;padding-top:30px;height:calc(100vh - 100px);border-right:1px solid #e0e0e0}.contain[data-v-2d6ff378]{height:100vh;width:100%}.content[data-v-2d6ff378]{width:calc(100% - 5.5rem);height:calc(100% - 80px);padding-left:5.5rem;background:#f9f9f9}.side-item[data-v-2d6ff378]{height:6.25rem;width:100%;color:#333;font-size:calc(16px + var(--fontSizeSetup))}.side-item .item-box[data-v-2d6ff378]{margin-top:1rem;text-align:center}.side-item .item-box .box-img[data-v-2d6ff378]{width:2rem;height:2rem;margin:0 auto}.side-item .item-box .box-img img[data-v-2d6ff378]{width:100%;height:100%}.header-box[data-v-2d6ff378]{display:-webkit-box;display:-ms-flexbox;display:flex;background:#53a8ff;text-align:center;position:relative;font-size:calc(18px + var(--fontSizeSetup));height:80px;line-height:90px}.title[data-v-2d6ff378]{display:inline-block;color:#fff;font-weight:700;overflow:hidden;-webkit-box-flex:1;-ms-flex:1;flex:1;white-space:nowrap;text-overflow:ellipsis}.active[data-v-2d6ff378]{color:#53a8ff;background:rgba(83,168,255,.1)}.back[data-v-2d6ff378]{position:absolute;left:1rem;line-height:90px}[data-v-2d6ff378] .van-popup--left{left:inherit!important;top:80px;-webkit-transform:none;transform:none}.paper-box[data-v-2d6ff378]{margin:.63rem;border:1px solid #ebedf0;border-radius:4px}.ziliao-title[data-v-2d6ff378]{font-size:calc(16px + var(--fontSizeSetup));font-weight:600;color:#333}.ziliao-img[data-v-2d6ff378]{width:1.5rem;height:1.5rem;margin-right:.5rem}.ziliao-content[data-v-2d6ff378]{padding:1.25rem 0 1.25rem 2.7rem;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative}.ziliao-content[data-v-2d6ff378]:after{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;content:\" \";pointer-events:none;right:0;bottom:0;left:1.5rem;border-bottom:1px solid #e0e0e0;-webkit-transform:scaleY(.5);transform:scaleY(.5);display:block}.ziliao-content .ziliao-content-img[data-v-2d6ff378]{width:1.82rem;height:2.25rem}.ziliao-content .ziliao-content-img img[data-v-2d6ff378]{width:100%;height:100%}.ziliao-content .title-ziliao[data-v-2d6ff378]{font-size:calc(14px + var(--fontSizeSetup));font-weight:400;color:#333}.ziliao-content .ziliao-content-title[data-v-2d6ff378]{-webkit-box-flex:1;-ms-flex:1;flex:1;margin-left:1rem}.nbcontent .ziliao-content[data-v-2d6ff378]:last-child:after{border-bottom:none}.yiti-box[data-v-2d6ff378]{background:#fff;margin:.63rem;border:1px solid #ebedf0;border-radius:4px}.yiti-box .ziliao-title[data-v-2d6ff378]{font-size:calc(16px + var(--fontSizeSetup));font-weight:600;color:#333}.yiti-box .ziliao-img[data-v-2d6ff378]{width:1.5rem;height:1.5rem;margin-right:.5rem}.yiti-box .yiti-title[data-v-2d6ff378]{font-size:calc(16px + var(--fontSizeSetup));font-weight:600;color:#333;padding:15px 16px 16px}.yiti-box .yiti-orderNo[data-v-2d6ff378]{color:#ec8423;width:1.5rem;height:1.5rem;text-align:center;margin-right:.8rem;border:2px solid #ec8423;border-radius:50%}.flex-box[data-v-2d6ff378]{display:-webkit-box;display:-ms-flexbox;display:flex}.between-box[data-v-2d6ff378]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.Marg15[data-v-2d6ff378]{margin-right:1.5rem}.MarL15[data-v-2d6ff378]{margin-left:1.25rem}.btn[data-v-2d6ff378]{width:5.63rem}.saveBtn[data-v-2d6ff378]{width:calc(100% - 40px);margin-bottom:20px;padding:10px 0;color:#fff;background:#53a8ff;text-align:center;margin-left:20px}.input-box[data-v-2d6ff378]{height:200px;width:100%}[data-v-2d6ff378] .van-field__body,[data-v-2d6ff378] .van-field__control{height:100%}.header-dialog[data-v-2d6ff378]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 20px;height:54px;background:#f3f4f4;font-size:18px;border-radius:4px 4px 0 0}.containmeet[data-v-2d6ff378]{height:100%}#bodyfilebox[data-v-2d6ff378]{height:100%;border:1px solid #ebeef5}#bodyfilebox .edit-button[data-v-2d6ff378]{position:fixed;bottom:50px;right:30px;border:1px solid #494949;color:#fff;background:#494949;height:40px;width:40px;text-align:center;line-height:40px;border-radius:50%;font-size:23px;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 3px 8px rgba(0,0,0,.24);box-shadow:0 3px 8px rgba(0,0,0,.24)}#bodyfilebox .color-group[data-v-2d6ff378]{bottom:110px;padding:6px}#bodyfilebox .color-group[data-v-2d6ff378],#bodyfilebox .line-group[data-v-2d6ff378]{position:fixed;display:-webkit-box;display:-ms-flexbox;display:flex;right:80px;background:#fff;border-radius:5px;-webkit-box-shadow:0 3px 8px rgba(0,0,0,.24);box-shadow:0 3px 8px rgba(0,0,0,.24)}#bodyfilebox .line-group[data-v-2d6ff378]{bottom:170px;padding:6px 18px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:29px;width:130px}#bodyfilebox .color-group-item[data-v-2d6ff378]{display:block;height:30px;width:30px;border-radius:50%;background:#000;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #494949;margin:0 5px}#bodyfilebox .color-button[data-v-2d6ff378],#bodyfilebox .line-button-outside[data-v-2d6ff378]{background:#fff;padding:5px;border:none}#bodyfilebox .line-button-outside[data-v-2d6ff378]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}#bodyfilebox .color-view[data-v-2d6ff378]{width:100%;height:100%;border-radius:50%}#bodyfilebox .line-view[data-v-2d6ff378]{width:80%;background:#000;height:1px;border-radius:2px}#bodyfilebox .line-button[data-v-2d6ff378]{width:22px;color:#fff;font-size:10px;line-height:18px;text-align:center;background-color:#1989fa;border-radius:100px}#bodyfilebox .success[data-v-2d6ff378]{background:#07c160;border:1px solid #07c160}[data-v-2d6ff378] #viewerContainer{top:0!important}[data-v-2d6ff378] .toolbar{position:fixed!important;bottom:0!important}.headerMessageName[data-v-2d6ff378]{text-align:left;padding-left:50px}.keywordDialog[data-v-2d6ff378]{top:60%}.van-cell__title[data-v-2d6ff378]{width:calc(100% - 32px)}.cell-flex-title[data-v-2d6ff378]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.cell-flex-label .cell-flex-item[data-v-2d6ff378],.cell-flex-title[data-v-2d6ff378],.cell-flex-title .cell-flex-item[data-v-2d6ff378]{display:-webkit-box;display:-ms-flexbox;display:flex}.text-overflow[data-v-2d6ff378]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-v-2d6ff378] .van-dialog__content{height:90%;overflow-y:auto}[data-v-2d6ff378] .van-dialog__header{padding-top:16px!important;padding-bottom:9px!important;margin-bottom:1px!important;border-bottom:1px solid #999!important}.recordMask[data-v-2d6ff378]{position:fixed;min-height:560px;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.5);z-index:3000}.recordDiv[data-v-2d6ff378]{width:600px;height:500px;background:#fff;border-radius:4px;top:54%;left:50%;position:absolute;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.footer[data-v-2d6ff378]{width:100%;height:64px;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;padding:0 20px;-webkit-box-sizing:border-box;box-sizing:border-box;border-top:1px solid #dee2e6}.btn[data-v-2d6ff378],.footer[data-v-2d6ff378]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.btn[data-v-2d6ff378]{width:85px;height:35px;border-radius:3px;font-size:14px;padding:0 12px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.cbtn[data-v-2d6ff378]{background:#fff;color:#333}.cbtn[data-v-2d6ff378],.qbtn[data-v-2d6ff378]{border:1px solid #ebeef5}.qbtn[data-v-2d6ff378]{background:#53a8ff;color:#fff}.btn[data-v-2d6ff378] .van-button__content{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.btn[data-v-2d6ff378] .van-button__content .van-button__icon{font-size:10px}.cell-flex-box[data-v-2d6ff378]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.cell-flex-box .delete-button[data-v-2d6ff378]{color:#53a8ff;position:absolute;right:0}.cell-flex-box .add-button[data-v-2d6ff378]{color:#53a8ff;font-size:14px;text-align:center;line-height:50px}.cell-flex-item[data-v-2d6ff378]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-wrap:nowrap;text-overflow:ellipsis;margin-right:45px}.cell-flex-box .cell-flex-item[data-v-2d6ff378]:nth-child(2){text-align:right}.no-more[data-v-2d6ff378]{color:#969799;font-size:14px;line-height:50px;text-align:center}", ""]);
1536
1908
  // Exports
1537
1909
  /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
1538
1910
 
@@ -34951,19 +35323,19 @@ var update = add("63eb1800", content, true, {"sourceMap":false,"shadowMode":fals
34951
35323
 
34952
35324
  /***/ }),
34953
35325
 
34954
- /***/ 257:
35326
+ /***/ 5118:
34955
35327
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
34956
35328
 
34957
35329
  // style-loader: Adds some css to the DOM by adding a <style> tag
34958
35330
 
34959
35331
  // load the styles
34960
- var content = __webpack_require__(4519);
35332
+ var content = __webpack_require__(3932);
34961
35333
  if(content.__esModule) content = content.default;
34962
35334
  if(typeof content === 'string') content = [[module.id, content, '']];
34963
35335
  if(content.locals) module.exports = content.locals;
34964
35336
  // add the styles to the DOM
34965
35337
  var add = (__webpack_require__(9548)/* ["default"] */ .A)
34966
- var update = add("2dc987af", content, true, {"sourceMap":false,"shadowMode":false});
35338
+ var update = add("1bc28580", content, true, {"sourceMap":false,"shadowMode":false});
34967
35339
 
34968
35340
  /***/ }),
34969
35341
 
@@ -39760,8 +40132,8 @@ var version = '3.6.5';
39760
40132
 
39761
40133
 
39762
40134
 
39763
- ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/hygl/src/ipad/view/FileView.vue?vue&type=template&id=518c81ba&scoped=true
39764
- var FileViewvue_type_template_id_518c81ba_scoped_true_render = function render() {
40135
+ ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/hygl/src/ipad/view/FileView.vue?vue&type=template&id=2d6ff378&scoped=true
40136
+ var FileViewvue_type_template_id_2d6ff378_scoped_true_render = function render() {
39765
40137
  var _vm = this,
39766
40138
  _c = _vm._self._c;
39767
40139
  return _c('div', [_c('div', {
@@ -40459,7 +40831,7 @@ var FileViewvue_type_template_id_518c81ba_scoped_true_render = function render()
40459
40831
  ref: "ServeDialog"
40460
40832
  })], 1)])]);
40461
40833
  };
40462
- var FileViewvue_type_template_id_518c81ba_scoped_true_staticRenderFns = [function () {
40834
+ var FileViewvue_type_template_id_2d6ff378_scoped_true_staticRenderFns = [function () {
40463
40835
  var _vm = this,
40464
40836
  _c = _vm._self._c;
40465
40837
  return _c('div', {
@@ -40518,7 +40890,7 @@ var FileViewvue_type_template_id_518c81ba_scoped_true_staticRenderFns = [functio
40518
40890
  })]);
40519
40891
  }];
40520
40892
 
40521
- ;// CONCATENATED MODULE: ./packages/ecmoa/hygl/src/ipad/view/FileView.vue?vue&type=template&id=518c81ba&scoped=true
40893
+ ;// CONCATENATED MODULE: ./packages/ecmoa/hygl/src/ipad/view/FileView.vue?vue&type=template&id=2d6ff378&scoped=true
40522
40894
 
40523
40895
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
40524
40896
  function _extends() {
@@ -43891,374 +44263,17 @@ var component = normalizeComponent(
43891
44263
  )
43892
44264
 
43893
44265
  /* harmony default export */ var CallServeDialog = (component.exports);
43894
- ;// CONCATENATED MODULE: ./packages/ecmoa/hygl/src/ipad/drawboard/tools/pen.js
43895
- var Pen = {};
43896
- Pen.canvas = null;
43897
- Pen.context = null;
43898
-
43899
- // Variable
43900
- Pen._config = {
43901
- color: '#000000',
43902
- weight: 1
43903
- };
43904
- Pen.points = []; // 线条描点存储
43905
- Pen.startPoint = null; // 线条绘制起点
43906
-
43907
- /**
43908
- * @param {Object} config 画笔配置
43909
- */
43910
- Pen.constructor = function (target, config) {
43911
- Pen.canvas = target;
43912
- Pen.context = target.getContext('2d');
43913
- if (config) {
43914
- Pen._config = Object.assign(Pen._config, config);
43915
- }
43916
- Pen.setListener(target);
43917
- Pen.setPenConfig(Pen._config);
43918
- };
43919
-
43920
- // methods
43921
- Pen.setPenConfig = function (_config) {
43922
- var context = Pen.context;
43923
- context.lineJoin = 'round';
43924
- context.lineCap = 'round';
43925
- };
43926
- Pen.setListener = function (target) {
43927
- target.addEventListener('mousedown', Pen.startDrawing, false);
43928
- target.addEventListener('mouseup', Pen.stopDrawing, false);
43929
- target.addEventListener('touchstart', Pen.startDrawing, false);
43930
- target.addEventListener('touchend', Pen.stopDrawing, false);
43931
- };
43932
- Pen.removeListener = function (target) {
43933
- target.removeEventListener('mousedown', Pen.startDrawing, false);
43934
- target.removeEventListener('mouseup', Pen.stopDrawing, false);
43935
- target.removeEventListener('touchstart', Pen.startDrawing, false);
43936
- target.removeEventListener('touchend', Pen.stopDrawing, false);
43937
- };
43938
- // 绘制二次贝塞尔曲线
43939
- Pen.drawLine = function (beginPoint, controlPoint, endPoint) {
43940
- var context = Pen.context;
43941
- context.beginPath();
43942
- context.moveTo(beginPoint.x, beginPoint.y);
43943
- context.quadraticCurveTo(controlPoint.x, controlPoint.y, endPoint.x, endPoint.y);
43944
- context.stroke();
43945
- context.closePath();
43946
- };
43947
- // 开始绘制
43948
- Pen.startDrawing = function (evt) {
43949
- var canvas = Pen.canvas,
43950
- _config = Pen._config,
43951
- context = Pen.context;
43952
- var _Pen$getPoint = Pen.getPoint(evt),
43953
- x = _Pen$getPoint.x,
43954
- y = _Pen$getPoint.y;
43955
- context.strokeStyle = _config.color;
43956
- context.lineWidth = _config.weight;
43957
- Pen.startPoint = {
43958
- x: x,
43959
- y: y
43960
- };
43961
- Pen.points.push(Pen.startPoint);
43962
- canvas.addEventListener('mousemove', Pen.onDrawing, false);
43963
- canvas.addEventListener('touchmove', Pen.onDrawing, false);
43964
- };
43965
- // 拖动鼠标绘制
43966
- Pen.onDrawing = function (evt) {
43967
- evt.preventDefault();
43968
- var points = Pen.points;
43969
- var _Pen$getPoint2 = Pen.getPoint(evt),
43970
- x = _Pen$getPoint2.x,
43971
- y = _Pen$getPoint2.y;
43972
- points.push({
43973
- x: x,
43974
- y: y
43975
- });
43976
- if (points.length > 3) {
43977
- var lastTwoPoints = points.slice(-2);
43978
- var controlPoint = lastTwoPoints[0]; // 控制点
43979
- var endPoint = {
43980
- x: (lastTwoPoints[0].x + lastTwoPoints[1].x) / 2,
43981
- y: (lastTwoPoints[0].y + lastTwoPoints[1].y) / 2
43982
- };
43983
- Pen.drawLine(Pen.startPoint, controlPoint, endPoint);
43984
- Pen.startPoint = endPoint;
43985
- }
43986
- };
43987
- // 绘制结束
43988
- Pen.stopDrawing = function (evt) {
43989
- var canvas = Pen.canvas,
43990
- points = Pen.points,
43991
- startPoint = Pen.startPoint;
43992
- canvas.removeEventListener('mousemove', Pen.onDrawing);
43993
- canvas.removeEventListener('touchmove', Pen.onDrawing);
43994
- var _Pen$getPoint3 = Pen.getPoint(evt),
43995
- x = _Pen$getPoint3.x,
43996
- y = _Pen$getPoint3.y;
43997
- points.push({
43998
- x: x,
43999
- y: y
44000
- });
44001
- if (points.length > 3) {
44002
- var lastTwoPoints = points.slice(-2);
44003
- var controlPoint = lastTwoPoints[0];
44004
- var endPoint = lastTwoPoints[1];
44005
- Pen.drawLine(startPoint, controlPoint, endPoint);
44006
- }
44007
- Pen.runningHistory && Pen.runningHistory.add({
44008
- type: 'pen',
44009
- points: points,
44010
- config: Pen._config
44011
- });
44012
- Pen.startPoint = null;
44013
- Pen.points = [];
44014
- };
44015
- // 获取当前坐标
44016
- Pen.getPoint = function (evt) {
44017
- var x = null;
44018
- var y = null;
44019
- if (evt.touches && evt.touches[0]) {
44020
- var canvasOffset = Pen.canvas.getBoundingClientRect();
44021
- var touch = evt.touches[0];
44022
- var computedX = touch.pageX - canvasOffset.x;
44023
- var computedY = touch.pageY - canvasOffset.y;
44024
- var scale = Pen.canvas.height / Pen.canvas.clientHeight;
44025
- x = computedX * scale;
44026
- y = computedY * scale;
44027
- } else {
44028
- x = evt.offsetX;
44029
- y = evt.offsetY;
44030
- }
44031
- return {
44032
- x: x,
44033
- y: y
44034
- };
44035
- };
44036
-
44037
- ;// CONCATENATED MODULE: ./packages/ecmoa/hygl/src/ipad/drawboard/utils/history.js
44266
+ ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/hygl/src/ipad/view/FileView.vue?vue&type=script&lang=js
44267
+ function FileViewvue_type_script_lang_js_typeof(o) { "@babel/helpers - typeof"; return FileViewvue_type_script_lang_js_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, FileViewvue_type_script_lang_js_typeof(o); }
44268
+ function FileViewvue_type_script_lang_js_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ FileViewvue_type_script_lang_js_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == FileViewvue_type_script_lang_js_typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(FileViewvue_type_script_lang_js_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
44269
+ function FileViewvue_type_script_lang_js_asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
44270
+ function FileViewvue_type_script_lang_js_asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { FileViewvue_type_script_lang_js_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { FileViewvue_type_script_lang_js_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
44038
44271
  function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
44039
44272
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
44040
44273
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
44041
44274
  function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
44042
44275
  function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
44043
44276
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
44044
- var history_History = {};
44045
- history_History.cacheStack = [];
44046
- history_History.step = null;
44047
- history_History.constructor = function (cache) {
44048
- if (!cache) return;
44049
- history_History.cacheStack = _toConsumableArray(cache.cacheStack);
44050
- history_History.step = cache.step;
44051
- };
44052
- history_History.add = function (drawData) {
44053
- if (drawData.type && drawData.points instanceof Array) {
44054
- history_History.cacheStack.push(drawData);
44055
- history_History.step++;
44056
- }
44057
- };
44058
-
44059
- ;// CONCATENATED MODULE: ./packages/ecmoa/hygl/src/ipad/drawboard/index.js
44060
- function drawboard_typeof(o) { "@babel/helpers - typeof"; return drawboard_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, drawboard_typeof(o); }
44061
- function drawboard_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ drawboard_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == drawboard_typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(drawboard_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
44062
- function drawboard_asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
44063
- function drawboard_asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { drawboard_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { drawboard_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
44064
-
44065
-
44066
- var DrawBoard = {};
44067
-
44068
- // 画布
44069
- DrawBoard.canvas = null;
44070
- DrawBoard.context = null;
44071
-
44072
- // canvas configs
44073
- DrawBoard._MODE = null; // 当前绘图模式
44074
- DrawBoard._TOOL = null; // 当前绘图工具实例对象
44075
- DrawBoard._config = {
44076
- // 基础配置
44077
- width: 0,
44078
- height: 0
44079
- };
44080
-
44081
- // cache
44082
- DrawBoard.runningHistory = null;
44083
-
44084
- /**
44085
- * @param {Element} canvasElement 画布元素
44086
- */
44087
- DrawBoard.constructor = function (canvasElement) {
44088
- DrawBoard.canvas = canvasElement;
44089
- DrawBoard.context = canvasElement.getContext('2d');
44090
- DrawBoard._config = Object.assign(DrawBoard._config, {
44091
- width: canvasElement.width,
44092
- height: canvasElement.height
44093
- });
44094
- };
44095
- DrawBoard.install = function () {
44096
- var canvas = DrawBoard.canvas;
44097
- var canvasHistory = canvas.CACHE_STACK ? canvas.CACHE_STACK : null;
44098
- DrawBoard.runningHistory = new history_History(canvasHistory);
44099
- return DrawBoard;
44100
- };
44101
- DrawBoard.uninstall = function () {
44102
- DrawBoard.canvas.CACHE_STACK = DrawBoard.runningHistory;
44103
- DrawBoard.removeEvents();
44104
- };
44105
-
44106
- // canvas methods
44107
- // 清除canvas内容
44108
- DrawBoard.clear = function () {
44109
- var _DrawBoard$_config = DrawBoard._config,
44110
- width = _DrawBoard$_config.width,
44111
- height = _DrawBoard$_config.height;
44112
- DrawBoard.context.clearRect(0, 0, width, height);
44113
- };
44114
- // 清除事件监听
44115
- DrawBoard.removeEvents = function () {
44116
- var _TOOL = DrawBoard._TOOL,
44117
- canvas = DrawBoard.canvas;
44118
- _TOOL.removeListener(canvas);
44119
- };
44120
- DrawBoard.setColor = function (color) {
44121
- DrawBoard._TOOL._config.color = color;
44122
- };
44123
- DrawBoard.setWeight = function (weight) {
44124
- DrawBoard._TOOL._config.weight = weight;
44125
- };
44126
- // 工具使用
44127
- DrawBoard.use = function (tool, config) {
44128
- var canvas = DrawBoard.canvas;
44129
- switch (tool) {
44130
- case 'pen':
44131
- DrawBoard._TOOL && DrawBoard._TOOL.removeListener(canvas);
44132
- DrawBoard._MODE = tool;
44133
- DrawBoard._TOOL = new Pen(canvas, config || null);
44134
- console.log('DrawBoard._TOOL => ', DrawBoard._TOOL);
44135
- DrawBoard._TOOL.runningHistory = DrawBoard.runningHistory;
44136
- break;
44137
- default:
44138
- break;
44139
- }
44140
- };
44141
-
44142
- /**
44143
- * @description: 以每一次绘画为单位,通过存储的定位points,取最小xy作为绘画起点,最大xy作为宽高,同时留出10像素的间隔
44144
- * @param {Array} points 定位数据
44145
- * @return {Object} x、y、width、height
44146
- */
44147
- DrawBoard.getImageInfo = function (points) {
44148
- var minX = null;
44149
- var minY = null;
44150
- var maxX = null;
44151
- var maxY = null;
44152
- points.forEach(function (item, index) {
44153
- var x = item.x,
44154
- y = item.y;
44155
- if (index === 0) {
44156
- minX = maxX = x;
44157
- minY = maxY = y;
44158
- return;
44159
- }
44160
- minX = x < minX ? x : minX;
44161
- maxX = x > maxX ? x : maxX;
44162
- minY = y < minY ? y : minY;
44163
- maxY = y > maxY ? y : maxY;
44164
- });
44165
- return {
44166
- x: minX - 5,
44167
- y: minY - 5,
44168
- width: maxX - minX + 10,
44169
- height: maxY - minY + 10
44170
- };
44171
- };
44172
-
44173
- /**
44174
- * @description: 获取每一个step的图像
44175
- * @param {String} type 输出类型 blob/base64
44176
- * @param {String} quality 输出质量 0 ~ 1 (仅blob)
44177
- * @return {Array} 带有图像的数组
44178
- */
44179
- DrawBoard.getEachImage = function () {
44180
- var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'blob';
44181
- var quality = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '1.0';
44182
- var results = [];
44183
- DrawBoard.runningHistory.cacheStack.forEach( /*#__PURE__*/function () {
44184
- var _ref = drawboard_asyncToGenerator( /*#__PURE__*/drawboard_regeneratorRuntime().mark(function _callee(cache) {
44185
- var imageInfo, imageData;
44186
- return drawboard_regeneratorRuntime().wrap(function _callee$(_context) {
44187
- while (1) switch (_context.prev = _context.next) {
44188
- case 0:
44189
- imageInfo = DrawBoard.getImageInfo(cache.points);
44190
- _context.next = 3;
44191
- return DrawBoard.getImageFromCanvas(imageInfo, type, quality);
44192
- case 3:
44193
- imageData = _context.sent;
44194
- results.push(imageData);
44195
- case 5:
44196
- case "end":
44197
- return _context.stop();
44198
- }
44199
- }, _callee);
44200
- }));
44201
- return function (_x) {
44202
- return _ref.apply(this, arguments);
44203
- };
44204
- }());
44205
- return results;
44206
- };
44207
- /**
44208
- * @description: 获取每一个step的图像信息
44209
- * @return {Array} 图像信息的数组
44210
- */
44211
- DrawBoard.getEachImageInfo = function () {
44212
- var results = [];
44213
- DrawBoard.runningHistory.cacheStack.forEach(function (cache) {
44214
- var imageInfo = DrawBoard.getImageInfo(cache.points);
44215
- results.push(imageInfo);
44216
- });
44217
- return results;
44218
- };
44219
-
44220
- /**
44221
- * @description: 从主画布剪切导出图片
44222
- * @param {Object} imageInfo 图片定位以及各类对象数据
44223
- * @param {String} type 输出类型 blob/base64
44224
- * @param {String} quality 输出质量 0 ~ 1
44225
- * @return {*}
44226
- */
44227
- DrawBoard.getImageFromCanvas = function (imageInfo, type, quality) {
44228
- var x = imageInfo.x,
44229
- y = imageInfo.y,
44230
- width = imageInfo.width,
44231
- height = imageInfo.height;
44232
- var Temp = document.createElement('canvas');
44233
- Temp.height = height;
44234
- Temp.width = width;
44235
- Temp.setAttribute('style', "height:".concat(height, "px;width:").concat(width, "px;"));
44236
- var TempContent = Temp.getContext('2d');
44237
- TempContent.drawImage(DrawBoard.canvas, x, y, width, height, 0, 0, width, height);
44238
- return new Promise(function (resolve) {
44239
- if (type === 'blob') {
44240
- Temp.toBlob(function (blob) {
44241
- resolve(blob);
44242
- }, quality);
44243
- }
44244
- if (type === 'base64') {
44245
- var result = Temp.toDataURL('image/png');
44246
- resolve(result);
44247
- }
44248
- });
44249
- };
44250
-
44251
- ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/hygl/src/ipad/view/FileView.vue?vue&type=script&lang=js
44252
- function FileViewvue_type_script_lang_js_typeof(o) { "@babel/helpers - typeof"; return FileViewvue_type_script_lang_js_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, FileViewvue_type_script_lang_js_typeof(o); }
44253
- function FileViewvue_type_script_lang_js_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ FileViewvue_type_script_lang_js_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == FileViewvue_type_script_lang_js_typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(FileViewvue_type_script_lang_js_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
44254
- function FileViewvue_type_script_lang_js_asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
44255
- function FileViewvue_type_script_lang_js_asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { FileViewvue_type_script_lang_js_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { FileViewvue_type_script_lang_js_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
44256
- function FileViewvue_type_script_lang_js_toConsumableArray(r) { return FileViewvue_type_script_lang_js_arrayWithoutHoles(r) || FileViewvue_type_script_lang_js_iterableToArray(r) || FileViewvue_type_script_lang_js_unsupportedIterableToArray(r) || FileViewvue_type_script_lang_js_nonIterableSpread(); }
44257
- function FileViewvue_type_script_lang_js_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
44258
- function FileViewvue_type_script_lang_js_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return FileViewvue_type_script_lang_js_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? FileViewvue_type_script_lang_js_arrayLikeToArray(r, a) : void 0; } }
44259
- function FileViewvue_type_script_lang_js_iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
44260
- function FileViewvue_type_script_lang_js_arrayWithoutHoles(r) { if (Array.isArray(r)) return FileViewvue_type_script_lang_js_arrayLikeToArray(r); }
44261
- function FileViewvue_type_script_lang_js_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
44262
44277
  function FileViewvue_type_script_lang_js_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
44263
44278
  function FileViewvue_type_script_lang_js_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? FileViewvue_type_script_lang_js_ownKeys(Object(t), !0).forEach(function (r) { FileViewvue_type_script_lang_js_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : FileViewvue_type_script_lang_js_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
44264
44279
  function FileViewvue_type_script_lang_js_defineProperty(e, r, t) { return (r = FileViewvue_type_script_lang_js_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -44270,7 +44285,7 @@ function FileViewvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != Fil
44270
44285
  external_commonjs_vue_commonjs2_vue_root_Vue_default().use(toast);
44271
44286
  external_commonjs_vue_commonjs2_vue_root_Vue_default().use(VueRouter$1);
44272
44287
 
44273
-
44288
+ var DrawBoard = __webpack_require__(7462);
44274
44289
 
44275
44290
  var moment = __webpack_require__(5093);
44276
44291
  /* harmony default export */ var FileViewvue_type_script_lang_js = ({
@@ -44563,7 +44578,7 @@ var moment = __webpack_require__(5093);
44563
44578
  getCanvas: function getCanvas() {
44564
44579
  var iframeEl = document.querySelector('#pdfHtml'); // iframe页面
44565
44580
  var page = iframeEl.contentDocument.querySelector('.pageNumber').value; //
44566
- var pageEls = FileViewvue_type_script_lang_js_toConsumableArray(iframeEl.contentDocument.querySelector('.pdfViewer').children);
44581
+ var pageEls = _toConsumableArray(iframeEl.contentDocument.querySelector('.pdfViewer').children);
44567
44582
  var currentPage = pageEls.find(function (el) {
44568
44583
  return el.attributes['data-page-number'].value == page;
44569
44584
  });
@@ -44976,9 +44991,9 @@ var moment = __webpack_require__(5093);
44976
44991
  });
44977
44992
  ;// CONCATENATED MODULE: ./packages/ecmoa/hygl/src/ipad/view/FileView.vue?vue&type=script&lang=js
44978
44993
  /* harmony default export */ var view_FileViewvue_type_script_lang_js = (FileViewvue_type_script_lang_js);
44979
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/hygl/src/ipad/view/FileView.vue?vue&type=style&index=0&id=518c81ba&prod&scoped=true&lang=scss
44980
- var FileViewvue_type_style_index_0_id_518c81ba_prod_scoped_true_lang_scss = __webpack_require__(257);
44981
- ;// CONCATENATED MODULE: ./packages/ecmoa/hygl/src/ipad/view/FileView.vue?vue&type=style&index=0&id=518c81ba&prod&scoped=true&lang=scss
44994
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/hygl/src/ipad/view/FileView.vue?vue&type=style&index=0&id=2d6ff378&prod&scoped=true&lang=scss
44995
+ var FileViewvue_type_style_index_0_id_2d6ff378_prod_scoped_true_lang_scss = __webpack_require__(5118);
44996
+ ;// CONCATENATED MODULE: ./packages/ecmoa/hygl/src/ipad/view/FileView.vue?vue&type=style&index=0&id=2d6ff378&prod&scoped=true&lang=scss
44982
44997
 
44983
44998
  ;// CONCATENATED MODULE: ./packages/ecmoa/hygl/src/ipad/view/FileView.vue
44984
44999
 
@@ -44991,11 +45006,11 @@ var FileViewvue_type_style_index_0_id_518c81ba_prod_scoped_true_lang_scss = __we
44991
45006
 
44992
45007
  var FileView_component = normalizeComponent(
44993
45008
  view_FileViewvue_type_script_lang_js,
44994
- FileViewvue_type_template_id_518c81ba_scoped_true_render,
44995
- FileViewvue_type_template_id_518c81ba_scoped_true_staticRenderFns,
45009
+ FileViewvue_type_template_id_2d6ff378_scoped_true_render,
45010
+ FileViewvue_type_template_id_2d6ff378_scoped_true_staticRenderFns,
44996
45011
  false,
44997
45012
  null,
44998
- "518c81ba",
45013
+ "2d6ff378",
44999
45014
  null
45000
45015
 
45001
45016
  )