ecinc-cloud-wappaio 9.7.16 → 9.7.17

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.
@@ -51495,15 +51495,347 @@ module.exports = {
51495
51495
 
51496
51496
  /***/ }),
51497
51497
 
51498
- /***/ 99932:
51498
+ /***/ 86322:
51499
51499
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
51500
51500
 
51501
51501
  "use strict";
51502
+ // ESM COMPAT FLAG
51502
51503
  __webpack_require__.r(__webpack_exports__);
51503
- /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55373);
51504
- /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__);
51505
- /* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12215);
51506
- /* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(js_cookie__WEBPACK_IMPORTED_MODULE_0__);
51504
+
51505
+ // EXPORTS
51506
+ __webpack_require__.d(__webpack_exports__, {
51507
+ "default": function() { return /* binding */ wfengine; }
51508
+ });
51509
+
51510
+ // EXTERNAL MODULE: ./node_modules/qs/lib/index.js
51511
+ var lib = __webpack_require__(55373);
51512
+ var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
51513
+ // EXTERNAL MODULE: ./node_modules/js-cookie/src/js.cookie.js
51514
+ var js_cookie = __webpack_require__(12215);
51515
+ var js_cookie_default = /*#__PURE__*/__webpack_require__.n(js_cookie);
51516
+ // EXTERNAL MODULE: ./node_modules/spark-md5/spark-md5.js
51517
+ var spark_md5 = __webpack_require__(75735);
51518
+ var spark_md5_default = /*#__PURE__*/__webpack_require__.n(spark_md5);
51519
+ ;// CONCATENATED MODULE: ./packages/ecwflow/wfengine/chunkUpload.js
51520
+ /**
51521
+ * 分片上传核心模块
51522
+ * 封装大文件分片上传、断点续传全流程逻辑
51523
+ */
51524
+
51525
+
51526
+ // ========== 配置 ==========
51527
+ var DEFAULT_CHUNK_SIZE = 5; // 默认分片大小(MB)
51528
+ var MAX_RETRY = 3; // 单分片最大重试次数
51529
+ var RETRY_DELAYS = [1000, 2000, 4000]; // 指数退避延迟(ms)
51530
+ var STORAGE_PREFIX = 'chunk_upload_'; // localStorage key 前缀
51531
+
51532
+ /**
51533
+ * 获取分片大小(字节)
51534
+ */
51535
+ function getChunkSize() {
51536
+ return (window.chunkUploadSize || DEFAULT_CHUNK_SIZE) * 1024 * 1024;
51537
+ }
51538
+
51539
+ // ========== MD5 计算 ==========
51540
+
51541
+ /**
51542
+ * 使用 spark-md5 增量计算文件 MD5(避免大文件一次性读入内存)
51543
+ * @param {File} file 文件对象
51544
+ * @param {number} chunkSize 切片大小(字节)
51545
+ * @returns {Promise<string>} 文件 MD5 值(32位小写)
51546
+ */
51547
+ function computeFileMD5(file, chunkSize) {
51548
+ return new Promise(function (resolve, reject) {
51549
+ var blobSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;
51550
+ var chunks = Math.ceil(file.size / chunkSize);
51551
+ var currentChunk = 0;
51552
+ var spark = new (spark_md5_default()).ArrayBuffer();
51553
+ var reader = new FileReader();
51554
+ reader.onload = function (e) {
51555
+ spark.append(e.target.result);
51556
+ currentChunk++;
51557
+ if (currentChunk < chunks) {
51558
+ loadNext();
51559
+ } else {
51560
+ resolve(spark.end());
51561
+ }
51562
+ };
51563
+ reader.onerror = function () {
51564
+ reject(new Error('文件读取失败'));
51565
+ };
51566
+ function loadNext() {
51567
+ var start = currentChunk * chunkSize;
51568
+ var end = Math.min(start + chunkSize, file.size);
51569
+ var chunk = blobSlice.call(file, start, end);
51570
+ reader.readAsArrayBuffer(chunk);
51571
+ }
51572
+ loadNext();
51573
+ });
51574
+ }
51575
+
51576
+ // ========== localStorage 断点进度管理 ==========
51577
+
51578
+ /**
51579
+ * 保存上传进度
51580
+ */
51581
+ function saveUploadProgress(fileMd5, data) {
51582
+ try {
51583
+ localStorage.setItem(STORAGE_PREFIX + fileMd5, JSON.stringify(data));
51584
+ } catch (e) {
51585
+ // localStorage 满或不可用,静默忽略
51586
+ }
51587
+ }
51588
+
51589
+ /**
51590
+ * 获取上传进度
51591
+ */
51592
+ function getUploadProgress(fileMd5) {
51593
+ try {
51594
+ var raw = localStorage.getItem(STORAGE_PREFIX + fileMd5);
51595
+ return raw ? JSON.parse(raw) : null;
51596
+ } catch (e) {
51597
+ return null;
51598
+ }
51599
+ }
51600
+
51601
+ /**
51602
+ * 清除上传进度
51603
+ */
51604
+ function clearUploadProgress(fileMd5) {
51605
+ try {
51606
+ localStorage.removeItem(STORAGE_PREFIX + fileMd5);
51607
+ } catch (e) {
51608
+ // 静默忽略
51609
+ }
51610
+ }
51611
+
51612
+ // ========== 后端接口调用 ==========
51613
+
51614
+ /**
51615
+ * 检查已上传分片
51616
+ * @param {Vue} $scope Vue 实例
51617
+ * @param {string} baseUrl 基础 URL(如 workflow/wfBusiAttach)
51618
+ * @param {string} fileMd5 文件 MD5
51619
+ * @param {number} totalChunks 总分片数
51620
+ * @returns {Promise<number[]>} 已上传分片索引列表
51621
+ */
51622
+ function checkChunkStatus($scope, baseUrl, fileMd5, totalChunks) {
51623
+ var formData = new FormData();
51624
+ formData.append('fileMd5', fileMd5);
51625
+ formData.append('totalChunks', totalChunks);
51626
+ return $scope.$http({
51627
+ url: baseUrl + '/uploadChunkCheck',
51628
+ method: 'post',
51629
+ data: formData
51630
+ }).then(function (res) {
51631
+ if (res.code === 'success' && res.body) {
51632
+ return res.body.uploadedChunks || [];
51633
+ }
51634
+ return [];
51635
+ }).catch(function () {
51636
+ return [];
51637
+ });
51638
+ }
51639
+
51640
+ /**
51641
+ * 上传单个分片(含重试)
51642
+ * @param {Vue} $scope Vue 实例
51643
+ * @param {string} baseUrl 基础 URL
51644
+ * @param {File} file 完整文件对象
51645
+ * @param {number} chunkIndex 分片索引
51646
+ * @param {string} fileMd5 文件 MD5
51647
+ * @param {number} totalChunks 总分片数
51648
+ * @param {string} fileName 文件名
51649
+ * @param {number} fileSize 文件大小
51650
+ * @returns {Promise}
51651
+ */
51652
+ function uploadSingleChunk($scope, baseUrl, file, chunkIndex, fileMd5, totalChunks, fileName, fileSize) {
51653
+ var chunkSize = getChunkSize();
51654
+ var start = chunkIndex * chunkSize;
51655
+ var end = Math.min(start + chunkSize, file.size);
51656
+ var chunk = file.slice(start, end);
51657
+ var formData = new FormData();
51658
+ formData.append('chunkFile', chunk, 'chunk_' + chunkIndex);
51659
+ formData.append('fileMd5', fileMd5);
51660
+ formData.append('chunkIndex', chunkIndex);
51661
+ formData.append('totalChunks', totalChunks);
51662
+ formData.append('fileName', fileName);
51663
+ formData.append('fileSize', fileSize);
51664
+ return doUploadWithRetry($scope, baseUrl + '/uploadChunk', formData, 0, chunkIndex);
51665
+ }
51666
+
51667
+ /**
51668
+ * 带重试的上传请求
51669
+ */
51670
+ function doUploadWithRetry($scope, url, formData, retryCount, chunkIdx) {
51671
+ return $scope.$http({
51672
+ url: url,
51673
+ method: 'post',
51674
+ data: formData
51675
+ }).then(function (res) {
51676
+ if (res.code !== 'success') {
51677
+ console.error('[chunkUpload] chunk_' + chunkIdx + ' failed:', res.message);
51678
+ throw new Error(res.message || 'chunk upload failed');
51679
+ }
51680
+ console.log('[chunkUpload] chunk_' + chunkIdx + ' success');
51681
+ return res;
51682
+ }).catch(function (err) {
51683
+ if (retryCount < MAX_RETRY) {
51684
+ console.warn('[chunkUpload] chunk_' + chunkIdx + ' retry ' + (retryCount + 1) + ':', err.message || err);
51685
+ var delay = RETRY_DELAYS[retryCount] || RETRY_DELAYS[RETRY_DELAYS.length - 1];
51686
+ return new Promise(function (resolve) {
51687
+ setTimeout(resolve, delay);
51688
+ }).then(function () {
51689
+ return doUploadWithRetry($scope, url, formData, retryCount + 1, chunkIdx);
51690
+ });
51691
+ }
51692
+ throw err;
51693
+ });
51694
+ }
51695
+
51696
+ /**
51697
+ * 合并分片
51698
+ * @param {Vue} $scope Vue 实例
51699
+ * @param {string} baseUrl 基础 URL
51700
+ * @param {string} fileMd5 文件 MD5
51701
+ * @param {string} fileName 文件名
51702
+ * @param {number} fileSize 文件大小
51703
+ * @param {number} totalChunks 总分片数
51704
+ * @param {Object} reqData 业务参数(module, busiDataId 等)
51705
+ * @returns {Promise}
51706
+ */
51707
+ function mergeChunks($scope, baseUrl, fileMd5, fileName, fileSize, totalChunks, reqData) {
51708
+ var formData = new FormData();
51709
+ formData.append('fileMd5', fileMd5);
51710
+ formData.append('fileName', fileName);
51711
+ formData.append('fileSize', fileSize);
51712
+ formData.append('totalChunks', totalChunks);
51713
+ if (reqData) {
51714
+ for (var key in reqData) {
51715
+ if (reqData.hasOwnProperty(key) && reqData[key] !== undefined && reqData[key] !== null) {
51716
+ formData.append(key, reqData[key]);
51717
+ }
51718
+ }
51719
+ }
51720
+ return $scope.$http({
51721
+ url: baseUrl + '/uploadChunkMerge',
51722
+ method: 'post',
51723
+ data: formData
51724
+ });
51725
+ }
51726
+
51727
+ // ========== 主编排函数 ==========
51728
+
51729
+ /**
51730
+ * 分片上传主流程
51731
+ * @param {Vue} $scope Vue 实例
51732
+ * @param {string} uploadUrl 上传 URL(如 workflow/wfBusiAttach/upload)
51733
+ * @param {File} file 文件对象
51734
+ * @param {Object} reqData 业务参数
51735
+ * @param {Object} config 配置(含 onUploadProgress 回调)
51736
+ * @returns {Promise} 合并后的响应,与原 upload 接口返回格式一致
51737
+ */
51738
+ function chunkedUpload($scope, uploadUrl, file, reqData, config) {
51739
+ var chunkSize = getChunkSize();
51740
+ var totalChunks = Math.ceil(file.size / chunkSize);
51741
+ var fileName = file.name || 'unknown';
51742
+ var fileSize = file.size;
51743
+
51744
+ // 从 uploadUrl 中提取 baseUrl(去掉末尾的 /upload)
51745
+ var baseUrl = uploadUrl.replace(/\/upload\/?$/, '');
51746
+ var onProgress = config && config.onUploadProgress || null;
51747
+ return new Promise(function (resolve, reject) {
51748
+ // Step 1: 计算文件 MD5
51749
+ computeFileMD5(file, chunkSize).then(function (fileMd5) {
51750
+ // Step 2: 检查断点续传进度
51751
+ var savedProgress = getUploadProgress(fileMd5);
51752
+ var uploadedBytes = savedProgress ? savedProgress.uploadedBytes || 0 : 0;
51753
+ return checkChunkStatus($scope, baseUrl, fileMd5, totalChunks).then(function (uploadedChunks) {
51754
+ // Step 3: 逐片上传未完成的分片
51755
+ var completedChunks = uploadedChunks.length;
51756
+ var uploadedBytesFromServer = 0;
51757
+ for (var i = 0; i < uploadedChunks.length; i++) {
51758
+ var idx = uploadedChunks[i];
51759
+ var cStart = idx * chunkSize;
51760
+ var cEnd = Math.min(cStart + chunkSize, fileSize);
51761
+ uploadedBytesFromServer += cEnd - cStart;
51762
+ }
51763
+ uploadedBytes = uploadedBytesFromServer;
51764
+
51765
+ // 模拟初始进度回调
51766
+ if (onProgress) {
51767
+ onProgress({
51768
+ loaded: uploadedBytes,
51769
+ total: fileSize
51770
+ });
51771
+ }
51772
+ return uploadChunksSequentially($scope, baseUrl, file, fileMd5, totalChunks, uploadedChunks, fileName, fileSize, chunkSize, function (chunkBytes) {
51773
+ completedChunks++;
51774
+ uploadedBytes += chunkBytes;
51775
+ if (onProgress) {
51776
+ onProgress({
51777
+ loaded: uploadedBytes,
51778
+ total: fileSize
51779
+ });
51780
+ }
51781
+ // 保存进度到 localStorage
51782
+ saveUploadProgress(fileMd5, {
51783
+ completedChunks: completedChunks,
51784
+ uploadedBytes: uploadedBytes,
51785
+ totalChunks: totalChunks,
51786
+ fileName: fileName,
51787
+ fileSize: fileSize,
51788
+ timestamp: Date.now()
51789
+ });
51790
+ }).then(function () {
51791
+ // Step 4: 合并分片
51792
+ return mergeChunks($scope, baseUrl, fileMd5, fileName, fileSize, totalChunks, reqData);
51793
+ }).then(function (mergeResult) {
51794
+ // Step 5: 合并成功,清除进度记录
51795
+ clearUploadProgress(fileMd5);
51796
+ resolve(mergeResult);
51797
+ });
51798
+ });
51799
+ }).catch(function (err) {
51800
+ reject(err);
51801
+ });
51802
+ });
51803
+ }
51804
+
51805
+ /**
51806
+ * 逐片串行上传
51807
+ * 使用 Array.reduce 链式调用,reduce 回调参数 cIdx 天然为每次迭代创建独立闭包,
51808
+ * 避免 for + var 共享变量导致所有分片使用同一个 chunkIndex 的问题。
51809
+ */
51810
+ function uploadChunksSequentially($scope, baseUrl, file, fileMd5, totalChunks, uploadedChunks, fileName, fileSize, chunkSize, onChunkDone) {
51811
+ var uploadedSet = {};
51812
+ for (var i = 0; i < uploadedChunks.length; i++) {
51813
+ uploadedSet[uploadedChunks[i]] = true;
51814
+ }
51815
+
51816
+ // 构建待上传分片索引数组
51817
+ var chunkIndices = [];
51818
+ for (var chunkIndex = 0; chunkIndex < totalChunks; chunkIndex++) {
51819
+ if (!uploadedSet[chunkIndex]) {
51820
+ chunkIndices.push(chunkIndex);
51821
+ }
51822
+ }
51823
+
51824
+ // reduce 的 cIdx 参数每次迭代都是独立的值,无闭包共享问题
51825
+ return chunkIndices.reduce(function (chain, cIdx) {
51826
+ return chain.then(function () {
51827
+ return uploadSingleChunk($scope, baseUrl, file, cIdx, fileMd5, totalChunks, fileName, fileSize).then(function () {
51828
+ var cStart = cIdx * chunkSize;
51829
+ var cEnd = Math.min(cStart + chunkSize, fileSize);
51830
+ var cBytes = cEnd - cStart;
51831
+ if (onChunkDone) {
51832
+ onChunkDone(cBytes);
51833
+ }
51834
+ });
51835
+ });
51836
+ }, Promise.resolve());
51837
+ }
51838
+ ;// CONCATENATED MODULE: ./packages/ecwflow/wfengine/index.js
51507
51839
  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); }
51508
51840
  function 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; }
51509
51841
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -51518,6 +51850,7 @@ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(
51518
51850
  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; }
51519
51851
 
51520
51852
 
51853
+
51521
51854
  var install = function install(Vue) {
51522
51855
  var WfEngine = new Vue({
51523
51856
  methods: {
@@ -51735,7 +52068,7 @@ var install = function install(Vue) {
51735
52068
  }
51736
52069
  }
51737
52070
  if ($scope.wfJsonData && $scope.wfJsonData.routes) {
51738
- var rindex = js_cookie__WEBPACK_IMPORTED_MODULE_0___default().get('route-index-' + $scope.wfInstance.id);
52071
+ var rindex = js_cookie_default().get('route-index-' + $scope.wfInstance.id);
51739
52072
  if (rindex !== undefined && rindex !== null) {
51740
52073
  rindex = parseInt(rindex);
51741
52074
  if ($scope.wfJsonData.routes.length > rindex) $scope.submitHandle.route.index = rindex;
@@ -52183,7 +52516,7 @@ var install = function install(Vue) {
52183
52516
  $scope.$http({
52184
52517
  method: 'POST',
52185
52518
  contentType: 'application/x-www-form-urlencoded',
52186
- data: qs__WEBPACK_IMPORTED_MODULE_1___default().stringify(saveData),
52519
+ data: lib_default().stringify(saveData),
52187
52520
  params: params,
52188
52521
  url: wfEngineUrl
52189
52522
  }).then(function (res) {
@@ -52229,7 +52562,7 @@ var install = function install(Vue) {
52229
52562
  });
52230
52563
  }
52231
52564
  if ($scope.wfJsonData && $scope.wfJsonData.routes) {
52232
- var rindex = js_cookie__WEBPACK_IMPORTED_MODULE_0___default().get('route-index-' + $scope.wfInstance.id);
52565
+ var rindex = js_cookie_default().get('route-index-' + $scope.wfInstance.id);
52233
52566
  if (rindex !== undefined && rindex !== null) {
52234
52567
  rindex = parseInt(rindex);
52235
52568
  if ($scope.wfJsonData.routes.length > rindex) $scope.submitHandle.route.index = rindex;
@@ -52304,7 +52637,7 @@ var install = function install(Vue) {
52304
52637
  }
52305
52638
  var submitHandle = JSON.parse(JSON.stringify($scope.submitHandle));
52306
52639
  if (submitType.indexOf('Save') !== -1) {
52307
- js_cookie__WEBPACK_IMPORTED_MODULE_0___default().set('route-index-' + $scope.wfInstance.id, submitHandle.route.index);
52640
+ js_cookie_default().set('route-index-' + $scope.wfInstance.id, submitHandle.route.index);
52308
52641
  var route = $scope.wfJsonData == null || $scope.wfJsonData.routes == null || $scope.wfJsonData.routes.length === 0 ? {
52309
52642
  taskNodes: []
52310
52643
  } : $scope.wfJsonData.routes[submitHandle.route.index];
@@ -52315,14 +52648,14 @@ var install = function install(Vue) {
52315
52648
  if (nextUsers !== '') nextUsers += ';';
52316
52649
  nextUsers += user.id;
52317
52650
  });
52318
- js_cookie__WEBPACK_IMPORTED_MODULE_0___default().set('route-wfuser-' + $scope.curTN.tnID + '-' + wfNode.id, nextUsers);
52651
+ js_cookie_default().set('route-wfuser-' + $scope.curTN.tnID + '-' + wfNode.id, nextUsers);
52319
52652
  }
52320
52653
  });
52321
52654
  delete submitHandle.submitRoute;
52322
52655
  delete submitHandle.nextTNProp;
52323
52656
  delete submitHandle.nextTNUser;
52324
52657
  } else {
52325
- js_cookie__WEBPACK_IMPORTED_MODULE_0___default().set('route-index-' + $scope.wfInstance.id, '', {
52658
+ js_cookie_default().set('route-index-' + $scope.wfInstance.id, '', {
52326
52659
  expires: 0
52327
52660
  });
52328
52661
  var selRoute = $scope.wfJsonData == null || $scope.wfJsonData.routes == null || $scope.wfJsonData.routes.length === 0 ? {
@@ -52365,7 +52698,7 @@ var install = function install(Vue) {
52365
52698
  delete wfNode.users;
52366
52699
  submitHandle.nextTNProp.push(wfNode);
52367
52700
  submitHandle.nextTNUser.push(nextUsers);
52368
- js_cookie__WEBPACK_IMPORTED_MODULE_0___default().set('route-wfuser-' + $scope.curTN.tnID + '-' + wfNode.id, '', {
52701
+ js_cookie_default().set('route-wfuser-' + $scope.curTN.tnID + '-' + wfNode.id, '', {
52369
52702
  expires: 0
52370
52703
  });
52371
52704
  }
@@ -52398,7 +52731,7 @@ var install = function install(Vue) {
52398
52731
  headers: {
52399
52732
  'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
52400
52733
  },
52401
- data: qs__WEBPACK_IMPORTED_MODULE_1___default().stringify(saveData),
52734
+ data: lib_default().stringify(saveData),
52402
52735
  url: (params.wfEngineUrl || $scope.wfEngineUrl || 'workflow/wfInstance') + '/saveWfInstance'
52403
52736
  }).then(function (res) {
52404
52737
  if (res.code === 'success') {
@@ -52671,7 +53004,7 @@ var install = function install(Vue) {
52671
53004
  _this4.$http({
52672
53005
  method: 'POST',
52673
53006
  contentType: 'application/x-www-form-urlencoded',
52674
- data: qs__WEBPACK_IMPORTED_MODULE_1___default().stringify(saveData),
53007
+ data: lib_default().stringify(saveData),
52675
53008
  params: $scope.$vnode.context.wfParams,
52676
53009
  url: 'workflow/wfInstance/getUdmNodeUsers'
52677
53010
  }).then(function (res) {
@@ -52721,7 +53054,7 @@ var install = function install(Vue) {
52721
53054
  headers: {
52722
53055
  'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
52723
53056
  },
52724
- data: qs__WEBPACK_IMPORTED_MODULE_1___default().stringify({
53057
+ data: lib_default().stringify({
52725
53058
  wfInstance: JSON.stringify($scope.wfInstance),
52726
53059
  nextTNUsers: JSON.stringify(nextTNUsers)
52727
53060
  }),
@@ -52879,6 +53212,11 @@ var install = function install(Vue) {
52879
53212
  }
52880
53213
  },
52881
53214
  upload: function upload($scope, uploadUrl, file, params, config) {
53215
+ // 分片上传分流判断:chunkFileSizeThreshold > 0 且文件大小超过阈值
53216
+ var chunkThreshold = window.chunkFileSizeThreshold;
53217
+ if (chunkThreshold > 0 && file && file.size > chunkThreshold * 1024 * 1024) {
53218
+ return chunkedUpload($scope, uploadUrl, file, params, config);
53219
+ }
52882
53220
  var formData = new FormData();
52883
53221
  if (params != null) {
52884
53222
  for (var key in params) {
@@ -52977,7 +53315,7 @@ var install = function install(Vue) {
52977
53315
  });
52978
53316
  Vue.prototype.$wfEngine = WfEngine;
52979
53317
  };
52980
- /* harmony default export */ __webpack_exports__["default"] = (install);
53318
+ /* harmony default export */ var wfengine = (install);
52981
53319
 
52982
53320
  /***/ }),
52983
53321
 
@@ -239448,6 +239786,750 @@ Sortable.mount(Remove, Revert);
239448
239786
 
239449
239787
 
239450
239788
 
239789
+ /***/ }),
239790
+
239791
+ /***/ 75735:
239792
+ /***/ (function(module) {
239793
+
239794
+ (function (factory) {
239795
+ if (true) {
239796
+ // Node/CommonJS
239797
+ module.exports = factory();
239798
+ } else { var glob; }
239799
+ }(function (undefined) {
239800
+
239801
+ 'use strict';
239802
+
239803
+ /*
239804
+ * Fastest md5 implementation around (JKM md5).
239805
+ * Credits: Joseph Myers
239806
+ *
239807
+ * @see http://www.myersdaily.org/joseph/javascript/md5-text.html
239808
+ * @see http://jsperf.com/md5-shootout/7
239809
+ */
239810
+
239811
+ /* this function is much faster,
239812
+ so if possible we use it. Some IEs
239813
+ are the only ones I know of that
239814
+ need the idiotic second function,
239815
+ generated by an if clause. */
239816
+ var add32 = function (a, b) {
239817
+ return (a + b) & 0xFFFFFFFF;
239818
+ },
239819
+ hex_chr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
239820
+
239821
+
239822
+ function cmn(q, a, b, x, s, t) {
239823
+ a = add32(add32(a, q), add32(x, t));
239824
+ return add32((a << s) | (a >>> (32 - s)), b);
239825
+ }
239826
+
239827
+ function md5cycle(x, k) {
239828
+ var a = x[0],
239829
+ b = x[1],
239830
+ c = x[2],
239831
+ d = x[3];
239832
+
239833
+ a += (b & c | ~b & d) + k[0] - 680876936 | 0;
239834
+ a = (a << 7 | a >>> 25) + b | 0;
239835
+ d += (a & b | ~a & c) + k[1] - 389564586 | 0;
239836
+ d = (d << 12 | d >>> 20) + a | 0;
239837
+ c += (d & a | ~d & b) + k[2] + 606105819 | 0;
239838
+ c = (c << 17 | c >>> 15) + d | 0;
239839
+ b += (c & d | ~c & a) + k[3] - 1044525330 | 0;
239840
+ b = (b << 22 | b >>> 10) + c | 0;
239841
+ a += (b & c | ~b & d) + k[4] - 176418897 | 0;
239842
+ a = (a << 7 | a >>> 25) + b | 0;
239843
+ d += (a & b | ~a & c) + k[5] + 1200080426 | 0;
239844
+ d = (d << 12 | d >>> 20) + a | 0;
239845
+ c += (d & a | ~d & b) + k[6] - 1473231341 | 0;
239846
+ c = (c << 17 | c >>> 15) + d | 0;
239847
+ b += (c & d | ~c & a) + k[7] - 45705983 | 0;
239848
+ b = (b << 22 | b >>> 10) + c | 0;
239849
+ a += (b & c | ~b & d) + k[8] + 1770035416 | 0;
239850
+ a = (a << 7 | a >>> 25) + b | 0;
239851
+ d += (a & b | ~a & c) + k[9] - 1958414417 | 0;
239852
+ d = (d << 12 | d >>> 20) + a | 0;
239853
+ c += (d & a | ~d & b) + k[10] - 42063 | 0;
239854
+ c = (c << 17 | c >>> 15) + d | 0;
239855
+ b += (c & d | ~c & a) + k[11] - 1990404162 | 0;
239856
+ b = (b << 22 | b >>> 10) + c | 0;
239857
+ a += (b & c | ~b & d) + k[12] + 1804603682 | 0;
239858
+ a = (a << 7 | a >>> 25) + b | 0;
239859
+ d += (a & b | ~a & c) + k[13] - 40341101 | 0;
239860
+ d = (d << 12 | d >>> 20) + a | 0;
239861
+ c += (d & a | ~d & b) + k[14] - 1502002290 | 0;
239862
+ c = (c << 17 | c >>> 15) + d | 0;
239863
+ b += (c & d | ~c & a) + k[15] + 1236535329 | 0;
239864
+ b = (b << 22 | b >>> 10) + c | 0;
239865
+
239866
+ a += (b & d | c & ~d) + k[1] - 165796510 | 0;
239867
+ a = (a << 5 | a >>> 27) + b | 0;
239868
+ d += (a & c | b & ~c) + k[6] - 1069501632 | 0;
239869
+ d = (d << 9 | d >>> 23) + a | 0;
239870
+ c += (d & b | a & ~b) + k[11] + 643717713 | 0;
239871
+ c = (c << 14 | c >>> 18) + d | 0;
239872
+ b += (c & a | d & ~a) + k[0] - 373897302 | 0;
239873
+ b = (b << 20 | b >>> 12) + c | 0;
239874
+ a += (b & d | c & ~d) + k[5] - 701558691 | 0;
239875
+ a = (a << 5 | a >>> 27) + b | 0;
239876
+ d += (a & c | b & ~c) + k[10] + 38016083 | 0;
239877
+ d = (d << 9 | d >>> 23) + a | 0;
239878
+ c += (d & b | a & ~b) + k[15] - 660478335 | 0;
239879
+ c = (c << 14 | c >>> 18) + d | 0;
239880
+ b += (c & a | d & ~a) + k[4] - 405537848 | 0;
239881
+ b = (b << 20 | b >>> 12) + c | 0;
239882
+ a += (b & d | c & ~d) + k[9] + 568446438 | 0;
239883
+ a = (a << 5 | a >>> 27) + b | 0;
239884
+ d += (a & c | b & ~c) + k[14] - 1019803690 | 0;
239885
+ d = (d << 9 | d >>> 23) + a | 0;
239886
+ c += (d & b | a & ~b) + k[3] - 187363961 | 0;
239887
+ c = (c << 14 | c >>> 18) + d | 0;
239888
+ b += (c & a | d & ~a) + k[8] + 1163531501 | 0;
239889
+ b = (b << 20 | b >>> 12) + c | 0;
239890
+ a += (b & d | c & ~d) + k[13] - 1444681467 | 0;
239891
+ a = (a << 5 | a >>> 27) + b | 0;
239892
+ d += (a & c | b & ~c) + k[2] - 51403784 | 0;
239893
+ d = (d << 9 | d >>> 23) + a | 0;
239894
+ c += (d & b | a & ~b) + k[7] + 1735328473 | 0;
239895
+ c = (c << 14 | c >>> 18) + d | 0;
239896
+ b += (c & a | d & ~a) + k[12] - 1926607734 | 0;
239897
+ b = (b << 20 | b >>> 12) + c | 0;
239898
+
239899
+ a += (b ^ c ^ d) + k[5] - 378558 | 0;
239900
+ a = (a << 4 | a >>> 28) + b | 0;
239901
+ d += (a ^ b ^ c) + k[8] - 2022574463 | 0;
239902
+ d = (d << 11 | d >>> 21) + a | 0;
239903
+ c += (d ^ a ^ b) + k[11] + 1839030562 | 0;
239904
+ c = (c << 16 | c >>> 16) + d | 0;
239905
+ b += (c ^ d ^ a) + k[14] - 35309556 | 0;
239906
+ b = (b << 23 | b >>> 9) + c | 0;
239907
+ a += (b ^ c ^ d) + k[1] - 1530992060 | 0;
239908
+ a = (a << 4 | a >>> 28) + b | 0;
239909
+ d += (a ^ b ^ c) + k[4] + 1272893353 | 0;
239910
+ d = (d << 11 | d >>> 21) + a | 0;
239911
+ c += (d ^ a ^ b) + k[7] - 155497632 | 0;
239912
+ c = (c << 16 | c >>> 16) + d | 0;
239913
+ b += (c ^ d ^ a) + k[10] - 1094730640 | 0;
239914
+ b = (b << 23 | b >>> 9) + c | 0;
239915
+ a += (b ^ c ^ d) + k[13] + 681279174 | 0;
239916
+ a = (a << 4 | a >>> 28) + b | 0;
239917
+ d += (a ^ b ^ c) + k[0] - 358537222 | 0;
239918
+ d = (d << 11 | d >>> 21) + a | 0;
239919
+ c += (d ^ a ^ b) + k[3] - 722521979 | 0;
239920
+ c = (c << 16 | c >>> 16) + d | 0;
239921
+ b += (c ^ d ^ a) + k[6] + 76029189 | 0;
239922
+ b = (b << 23 | b >>> 9) + c | 0;
239923
+ a += (b ^ c ^ d) + k[9] - 640364487 | 0;
239924
+ a = (a << 4 | a >>> 28) + b | 0;
239925
+ d += (a ^ b ^ c) + k[12] - 421815835 | 0;
239926
+ d = (d << 11 | d >>> 21) + a | 0;
239927
+ c += (d ^ a ^ b) + k[15] + 530742520 | 0;
239928
+ c = (c << 16 | c >>> 16) + d | 0;
239929
+ b += (c ^ d ^ a) + k[2] - 995338651 | 0;
239930
+ b = (b << 23 | b >>> 9) + c | 0;
239931
+
239932
+ a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;
239933
+ a = (a << 6 | a >>> 26) + b | 0;
239934
+ d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;
239935
+ d = (d << 10 | d >>> 22) + a | 0;
239936
+ c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;
239937
+ c = (c << 15 | c >>> 17) + d | 0;
239938
+ b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;
239939
+ b = (b << 21 |b >>> 11) + c | 0;
239940
+ a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;
239941
+ a = (a << 6 | a >>> 26) + b | 0;
239942
+ d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;
239943
+ d = (d << 10 | d >>> 22) + a | 0;
239944
+ c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;
239945
+ c = (c << 15 | c >>> 17) + d | 0;
239946
+ b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;
239947
+ b = (b << 21 |b >>> 11) + c | 0;
239948
+ a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;
239949
+ a = (a << 6 | a >>> 26) + b | 0;
239950
+ d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;
239951
+ d = (d << 10 | d >>> 22) + a | 0;
239952
+ c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;
239953
+ c = (c << 15 | c >>> 17) + d | 0;
239954
+ b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;
239955
+ b = (b << 21 |b >>> 11) + c | 0;
239956
+ a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;
239957
+ a = (a << 6 | a >>> 26) + b | 0;
239958
+ d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;
239959
+ d = (d << 10 | d >>> 22) + a | 0;
239960
+ c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;
239961
+ c = (c << 15 | c >>> 17) + d | 0;
239962
+ b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;
239963
+ b = (b << 21 | b >>> 11) + c | 0;
239964
+
239965
+ x[0] = a + x[0] | 0;
239966
+ x[1] = b + x[1] | 0;
239967
+ x[2] = c + x[2] | 0;
239968
+ x[3] = d + x[3] | 0;
239969
+ }
239970
+
239971
+ function md5blk(s) {
239972
+ var md5blks = [],
239973
+ i; /* Andy King said do it this way. */
239974
+
239975
+ for (i = 0; i < 64; i += 4) {
239976
+ md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);
239977
+ }
239978
+ return md5blks;
239979
+ }
239980
+
239981
+ function md5blk_array(a) {
239982
+ var md5blks = [],
239983
+ i; /* Andy King said do it this way. */
239984
+
239985
+ for (i = 0; i < 64; i += 4) {
239986
+ md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);
239987
+ }
239988
+ return md5blks;
239989
+ }
239990
+
239991
+ function md51(s) {
239992
+ var n = s.length,
239993
+ state = [1732584193, -271733879, -1732584194, 271733878],
239994
+ i,
239995
+ length,
239996
+ tail,
239997
+ tmp,
239998
+ lo,
239999
+ hi;
240000
+
240001
+ for (i = 64; i <= n; i += 64) {
240002
+ md5cycle(state, md5blk(s.substring(i - 64, i)));
240003
+ }
240004
+ s = s.substring(i - 64);
240005
+ length = s.length;
240006
+ tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
240007
+ for (i = 0; i < length; i += 1) {
240008
+ tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3);
240009
+ }
240010
+ tail[i >> 2] |= 0x80 << ((i % 4) << 3);
240011
+ if (i > 55) {
240012
+ md5cycle(state, tail);
240013
+ for (i = 0; i < 16; i += 1) {
240014
+ tail[i] = 0;
240015
+ }
240016
+ }
240017
+
240018
+ // Beware that the final length might not fit in 32 bits so we take care of that
240019
+ tmp = n * 8;
240020
+ tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
240021
+ lo = parseInt(tmp[2], 16);
240022
+ hi = parseInt(tmp[1], 16) || 0;
240023
+
240024
+ tail[14] = lo;
240025
+ tail[15] = hi;
240026
+
240027
+ md5cycle(state, tail);
240028
+ return state;
240029
+ }
240030
+
240031
+ function md51_array(a) {
240032
+ var n = a.length,
240033
+ state = [1732584193, -271733879, -1732584194, 271733878],
240034
+ i,
240035
+ length,
240036
+ tail,
240037
+ tmp,
240038
+ lo,
240039
+ hi;
240040
+
240041
+ for (i = 64; i <= n; i += 64) {
240042
+ md5cycle(state, md5blk_array(a.subarray(i - 64, i)));
240043
+ }
240044
+
240045
+ // Not sure if it is a bug, however IE10 will always produce a sub array of length 1
240046
+ // containing the last element of the parent array if the sub array specified starts
240047
+ // beyond the length of the parent array - weird.
240048
+ // https://connect.microsoft.com/IE/feedback/details/771452/typed-array-subarray-issue
240049
+ a = (i - 64) < n ? a.subarray(i - 64) : new Uint8Array(0);
240050
+
240051
+ length = a.length;
240052
+ tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
240053
+ for (i = 0; i < length; i += 1) {
240054
+ tail[i >> 2] |= a[i] << ((i % 4) << 3);
240055
+ }
240056
+
240057
+ tail[i >> 2] |= 0x80 << ((i % 4) << 3);
240058
+ if (i > 55) {
240059
+ md5cycle(state, tail);
240060
+ for (i = 0; i < 16; i += 1) {
240061
+ tail[i] = 0;
240062
+ }
240063
+ }
240064
+
240065
+ // Beware that the final length might not fit in 32 bits so we take care of that
240066
+ tmp = n * 8;
240067
+ tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
240068
+ lo = parseInt(tmp[2], 16);
240069
+ hi = parseInt(tmp[1], 16) || 0;
240070
+
240071
+ tail[14] = lo;
240072
+ tail[15] = hi;
240073
+
240074
+ md5cycle(state, tail);
240075
+
240076
+ return state;
240077
+ }
240078
+
240079
+ function rhex(n) {
240080
+ var s = '',
240081
+ j;
240082
+ for (j = 0; j < 4; j += 1) {
240083
+ s += hex_chr[(n >> (j * 8 + 4)) & 0x0F] + hex_chr[(n >> (j * 8)) & 0x0F];
240084
+ }
240085
+ return s;
240086
+ }
240087
+
240088
+ function hex(x) {
240089
+ var i;
240090
+ for (i = 0; i < x.length; i += 1) {
240091
+ x[i] = rhex(x[i]);
240092
+ }
240093
+ return x.join('');
240094
+ }
240095
+
240096
+ // In some cases the fast add32 function cannot be used..
240097
+ if (hex(md51('hello')) !== '5d41402abc4b2a76b9719d911017c592') {
240098
+ add32 = function (x, y) {
240099
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF),
240100
+ msw = (x >> 16) + (y >> 16) + (lsw >> 16);
240101
+ return (msw << 16) | (lsw & 0xFFFF);
240102
+ };
240103
+ }
240104
+
240105
+ // ---------------------------------------------------
240106
+
240107
+ /**
240108
+ * ArrayBuffer slice polyfill.
240109
+ *
240110
+ * @see https://github.com/ttaubert/node-arraybuffer-slice
240111
+ */
240112
+
240113
+ if (typeof ArrayBuffer !== 'undefined' && !ArrayBuffer.prototype.slice) {
240114
+ (function () {
240115
+ function clamp(val, length) {
240116
+ val = (val | 0) || 0;
240117
+
240118
+ if (val < 0) {
240119
+ return Math.max(val + length, 0);
240120
+ }
240121
+
240122
+ return Math.min(val, length);
240123
+ }
240124
+
240125
+ ArrayBuffer.prototype.slice = function (from, to) {
240126
+ var length = this.byteLength,
240127
+ begin = clamp(from, length),
240128
+ end = length,
240129
+ num,
240130
+ target,
240131
+ targetArray,
240132
+ sourceArray;
240133
+
240134
+ if (to !== undefined) {
240135
+ end = clamp(to, length);
240136
+ }
240137
+
240138
+ if (begin > end) {
240139
+ return new ArrayBuffer(0);
240140
+ }
240141
+
240142
+ num = end - begin;
240143
+ target = new ArrayBuffer(num);
240144
+ targetArray = new Uint8Array(target);
240145
+
240146
+ sourceArray = new Uint8Array(this, begin, num);
240147
+ targetArray.set(sourceArray);
240148
+
240149
+ return target;
240150
+ };
240151
+ })();
240152
+ }
240153
+
240154
+ // ---------------------------------------------------
240155
+
240156
+ /**
240157
+ * Helpers.
240158
+ */
240159
+
240160
+ function toUtf8(str) {
240161
+ if (/[\u0080-\uFFFF]/.test(str)) {
240162
+ str = unescape(encodeURIComponent(str));
240163
+ }
240164
+
240165
+ return str;
240166
+ }
240167
+
240168
+ function utf8Str2ArrayBuffer(str, returnUInt8Array) {
240169
+ var length = str.length,
240170
+ buff = new ArrayBuffer(length),
240171
+ arr = new Uint8Array(buff),
240172
+ i;
240173
+
240174
+ for (i = 0; i < length; i += 1) {
240175
+ arr[i] = str.charCodeAt(i);
240176
+ }
240177
+
240178
+ return returnUInt8Array ? arr : buff;
240179
+ }
240180
+
240181
+ function arrayBuffer2Utf8Str(buff) {
240182
+ return String.fromCharCode.apply(null, new Uint8Array(buff));
240183
+ }
240184
+
240185
+ function concatenateArrayBuffers(first, second, returnUInt8Array) {
240186
+ var result = new Uint8Array(first.byteLength + second.byteLength);
240187
+
240188
+ result.set(new Uint8Array(first));
240189
+ result.set(new Uint8Array(second), first.byteLength);
240190
+
240191
+ return returnUInt8Array ? result : result.buffer;
240192
+ }
240193
+
240194
+ function hexToBinaryString(hex) {
240195
+ var bytes = [],
240196
+ length = hex.length,
240197
+ x;
240198
+
240199
+ for (x = 0; x < length - 1; x += 2) {
240200
+ bytes.push(parseInt(hex.substr(x, 2), 16));
240201
+ }
240202
+
240203
+ return String.fromCharCode.apply(String, bytes);
240204
+ }
240205
+
240206
+ // ---------------------------------------------------
240207
+
240208
+ /**
240209
+ * SparkMD5 OOP implementation.
240210
+ *
240211
+ * Use this class to perform an incremental md5, otherwise use the
240212
+ * static methods instead.
240213
+ */
240214
+
240215
+ function SparkMD5() {
240216
+ // call reset to init the instance
240217
+ this.reset();
240218
+ }
240219
+
240220
+ /**
240221
+ * Appends a string.
240222
+ * A conversion will be applied if an utf8 string is detected.
240223
+ *
240224
+ * @param {String} str The string to be appended
240225
+ *
240226
+ * @return {SparkMD5} The instance itself
240227
+ */
240228
+ SparkMD5.prototype.append = function (str) {
240229
+ // Converts the string to utf8 bytes if necessary
240230
+ // Then append as binary
240231
+ this.appendBinary(toUtf8(str));
240232
+
240233
+ return this;
240234
+ };
240235
+
240236
+ /**
240237
+ * Appends a binary string.
240238
+ *
240239
+ * @param {String} contents The binary string to be appended
240240
+ *
240241
+ * @return {SparkMD5} The instance itself
240242
+ */
240243
+ SparkMD5.prototype.appendBinary = function (contents) {
240244
+ this._buff += contents;
240245
+ this._length += contents.length;
240246
+
240247
+ var length = this._buff.length,
240248
+ i;
240249
+
240250
+ for (i = 64; i <= length; i += 64) {
240251
+ md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));
240252
+ }
240253
+
240254
+ this._buff = this._buff.substring(i - 64);
240255
+
240256
+ return this;
240257
+ };
240258
+
240259
+ /**
240260
+ * Finishes the incremental computation, reseting the internal state and
240261
+ * returning the result.
240262
+ *
240263
+ * @param {Boolean} raw True to get the raw string, false to get the hex string
240264
+ *
240265
+ * @return {String} The result
240266
+ */
240267
+ SparkMD5.prototype.end = function (raw) {
240268
+ var buff = this._buff,
240269
+ length = buff.length,
240270
+ i,
240271
+ tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
240272
+ ret;
240273
+
240274
+ for (i = 0; i < length; i += 1) {
240275
+ tail[i >> 2] |= buff.charCodeAt(i) << ((i % 4) << 3);
240276
+ }
240277
+
240278
+ this._finish(tail, length);
240279
+ ret = hex(this._hash);
240280
+
240281
+ if (raw) {
240282
+ ret = hexToBinaryString(ret);
240283
+ }
240284
+
240285
+ this.reset();
240286
+
240287
+ return ret;
240288
+ };
240289
+
240290
+ /**
240291
+ * Resets the internal state of the computation.
240292
+ *
240293
+ * @return {SparkMD5} The instance itself
240294
+ */
240295
+ SparkMD5.prototype.reset = function () {
240296
+ this._buff = '';
240297
+ this._length = 0;
240298
+ this._hash = [1732584193, -271733879, -1732584194, 271733878];
240299
+
240300
+ return this;
240301
+ };
240302
+
240303
+ /**
240304
+ * Gets the internal state of the computation.
240305
+ *
240306
+ * @return {Object} The state
240307
+ */
240308
+ SparkMD5.prototype.getState = function () {
240309
+ return {
240310
+ buff: this._buff,
240311
+ length: this._length,
240312
+ hash: this._hash.slice()
240313
+ };
240314
+ };
240315
+
240316
+ /**
240317
+ * Gets the internal state of the computation.
240318
+ *
240319
+ * @param {Object} state The state
240320
+ *
240321
+ * @return {SparkMD5} The instance itself
240322
+ */
240323
+ SparkMD5.prototype.setState = function (state) {
240324
+ this._buff = state.buff;
240325
+ this._length = state.length;
240326
+ this._hash = state.hash;
240327
+
240328
+ return this;
240329
+ };
240330
+
240331
+ /**
240332
+ * Releases memory used by the incremental buffer and other additional
240333
+ * resources. If you plan to use the instance again, use reset instead.
240334
+ */
240335
+ SparkMD5.prototype.destroy = function () {
240336
+ delete this._hash;
240337
+ delete this._buff;
240338
+ delete this._length;
240339
+ };
240340
+
240341
+ /**
240342
+ * Finish the final calculation based on the tail.
240343
+ *
240344
+ * @param {Array} tail The tail (will be modified)
240345
+ * @param {Number} length The length of the remaining buffer
240346
+ */
240347
+ SparkMD5.prototype._finish = function (tail, length) {
240348
+ var i = length,
240349
+ tmp,
240350
+ lo,
240351
+ hi;
240352
+
240353
+ tail[i >> 2] |= 0x80 << ((i % 4) << 3);
240354
+ if (i > 55) {
240355
+ md5cycle(this._hash, tail);
240356
+ for (i = 0; i < 16; i += 1) {
240357
+ tail[i] = 0;
240358
+ }
240359
+ }
240360
+
240361
+ // Do the final computation based on the tail and length
240362
+ // Beware that the final length may not fit in 32 bits so we take care of that
240363
+ tmp = this._length * 8;
240364
+ tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
240365
+ lo = parseInt(tmp[2], 16);
240366
+ hi = parseInt(tmp[1], 16) || 0;
240367
+
240368
+ tail[14] = lo;
240369
+ tail[15] = hi;
240370
+ md5cycle(this._hash, tail);
240371
+ };
240372
+
240373
+ /**
240374
+ * Performs the md5 hash on a string.
240375
+ * A conversion will be applied if utf8 string is detected.
240376
+ *
240377
+ * @param {String} str The string
240378
+ * @param {Boolean} [raw] True to get the raw string, false to get the hex string
240379
+ *
240380
+ * @return {String} The result
240381
+ */
240382
+ SparkMD5.hash = function (str, raw) {
240383
+ // Converts the string to utf8 bytes if necessary
240384
+ // Then compute it using the binary function
240385
+ return SparkMD5.hashBinary(toUtf8(str), raw);
240386
+ };
240387
+
240388
+ /**
240389
+ * Performs the md5 hash on a binary string.
240390
+ *
240391
+ * @param {String} content The binary string
240392
+ * @param {Boolean} [raw] True to get the raw string, false to get the hex string
240393
+ *
240394
+ * @return {String} The result
240395
+ */
240396
+ SparkMD5.hashBinary = function (content, raw) {
240397
+ var hash = md51(content),
240398
+ ret = hex(hash);
240399
+
240400
+ return raw ? hexToBinaryString(ret) : ret;
240401
+ };
240402
+
240403
+ // ---------------------------------------------------
240404
+
240405
+ /**
240406
+ * SparkMD5 OOP implementation for array buffers.
240407
+ *
240408
+ * Use this class to perform an incremental md5 ONLY for array buffers.
240409
+ */
240410
+ SparkMD5.ArrayBuffer = function () {
240411
+ // call reset to init the instance
240412
+ this.reset();
240413
+ };
240414
+
240415
+ /**
240416
+ * Appends an array buffer.
240417
+ *
240418
+ * @param {ArrayBuffer} arr The array to be appended
240419
+ *
240420
+ * @return {SparkMD5.ArrayBuffer} The instance itself
240421
+ */
240422
+ SparkMD5.ArrayBuffer.prototype.append = function (arr) {
240423
+ var buff = concatenateArrayBuffers(this._buff.buffer, arr, true),
240424
+ length = buff.length,
240425
+ i;
240426
+
240427
+ this._length += arr.byteLength;
240428
+
240429
+ for (i = 64; i <= length; i += 64) {
240430
+ md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));
240431
+ }
240432
+
240433
+ this._buff = (i - 64) < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);
240434
+
240435
+ return this;
240436
+ };
240437
+
240438
+ /**
240439
+ * Finishes the incremental computation, reseting the internal state and
240440
+ * returning the result.
240441
+ *
240442
+ * @param {Boolean} raw True to get the raw string, false to get the hex string
240443
+ *
240444
+ * @return {String} The result
240445
+ */
240446
+ SparkMD5.ArrayBuffer.prototype.end = function (raw) {
240447
+ var buff = this._buff,
240448
+ length = buff.length,
240449
+ tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
240450
+ i,
240451
+ ret;
240452
+
240453
+ for (i = 0; i < length; i += 1) {
240454
+ tail[i >> 2] |= buff[i] << ((i % 4) << 3);
240455
+ }
240456
+
240457
+ this._finish(tail, length);
240458
+ ret = hex(this._hash);
240459
+
240460
+ if (raw) {
240461
+ ret = hexToBinaryString(ret);
240462
+ }
240463
+
240464
+ this.reset();
240465
+
240466
+ return ret;
240467
+ };
240468
+
240469
+ /**
240470
+ * Resets the internal state of the computation.
240471
+ *
240472
+ * @return {SparkMD5.ArrayBuffer} The instance itself
240473
+ */
240474
+ SparkMD5.ArrayBuffer.prototype.reset = function () {
240475
+ this._buff = new Uint8Array(0);
240476
+ this._length = 0;
240477
+ this._hash = [1732584193, -271733879, -1732584194, 271733878];
240478
+
240479
+ return this;
240480
+ };
240481
+
240482
+ /**
240483
+ * Gets the internal state of the computation.
240484
+ *
240485
+ * @return {Object} The state
240486
+ */
240487
+ SparkMD5.ArrayBuffer.prototype.getState = function () {
240488
+ var state = SparkMD5.prototype.getState.call(this);
240489
+
240490
+ // Convert buffer to a string
240491
+ state.buff = arrayBuffer2Utf8Str(state.buff);
240492
+
240493
+ return state;
240494
+ };
240495
+
240496
+ /**
240497
+ * Gets the internal state of the computation.
240498
+ *
240499
+ * @param {Object} state The state
240500
+ *
240501
+ * @return {SparkMD5.ArrayBuffer} The instance itself
240502
+ */
240503
+ SparkMD5.ArrayBuffer.prototype.setState = function (state) {
240504
+ // Convert string to buffer
240505
+ state.buff = utf8Str2ArrayBuffer(state.buff, true);
240506
+
240507
+ return SparkMD5.prototype.setState.call(this, state);
240508
+ };
240509
+
240510
+ SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;
240511
+
240512
+ SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;
240513
+
240514
+ /**
240515
+ * Performs the md5 hash on an array buffer.
240516
+ *
240517
+ * @param {ArrayBuffer} arr The array buffer
240518
+ * @param {Boolean} [raw] True to get the raw string, false to get the hex one
240519
+ *
240520
+ * @return {String} The result
240521
+ */
240522
+ SparkMD5.ArrayBuffer.hash = function (arr, raw) {
240523
+ var hash = md51_array(new Uint8Array(arr)),
240524
+ ret = hex(hash);
240525
+
240526
+ return raw ? hexToBinaryString(ret) : ret;
240527
+ };
240528
+
240529
+ return SparkMD5;
240530
+ }));
240531
+
240532
+
239451
240533
  /***/ }),
239452
240534
 
239453
240535
  /***/ 88310:
@@ -286702,7 +287784,7 @@ var wappaio_install = function install(Vue) {
286702
287784
  });
286703
287785
 
286704
287786
  // 3. 异步加载工作流引擎插件(独立 chunk)
286705
- Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 99932)).then(function (m) {
287787
+ Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 86322)).then(function (m) {
286706
287788
  Vue.use(m.default || m);
286707
287789
  });
286708
287790
  };
@@ -286740,7 +287822,7 @@ var webSocket = websocket/* default */.A;
286740
287822
 
286741
287823
  // ---------- 工作流相关 ----------
286742
287824
  var WfengineModule = function WfengineModule() {
286743
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 99932));
287825
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 86322));
286744
287826
  };
286745
287827
  var WflowformModule = function WflowformModule() {
286746
287828
  return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013));