UNPKG

@xysfe/actui

Version:

A fantastic mobile ui lib implement by Vue

1 lines 32.3 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@xysfe/actui/es/assets/utils/helpers.js"),require("@xysfe/actui/es/assets/utils/post.js"),require("@xysfe/actui/es/assets/utils/assign.js")):"function"==typeof define&&define.amd?define(["@xysfe/actui/es/assets/utils/helpers.js","@xysfe/actui/es/assets/utils/post.js","@xysfe/actui/es/assets/utils/assign.js"],e):"object"==typeof exports?exports.FileUpload=e(require("@xysfe/actui/es/assets/utils/helpers.js"),require("@xysfe/actui/es/assets/utils/post.js"),require("@xysfe/actui/es/assets/utils/assign.js")):t.FileUpload=e(t["@xysfe/actui/es/assets/utils/helpers.js"],t["@xysfe/actui/es/assets/utils/post.js"],t["@xysfe/actui/es/assets/utils/assign.js"])}("undefined"!=typeof self?self:this,function(t,e,r){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="../es",e(e.s=1665)}({0:function(t,e){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},1:function(t,e,r){var n=r(31)("wks"),o=r(24),i=r(0).Symbol,a="function"==typeof i;(t.exports=function(t){return n[t]||(n[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=n},10:function(t,e,r){var n=r(4),o=r(41),i=r(38),a=Object.defineProperty;e.f=r(3)?Object.defineProperty:function(t,e,r){if(n(t),e=i(e,!0),n(r),o)try{return a(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},100:function(t,e,r){"use strict";var n=r(9),o=r(2),i=r(0),a=r(64),u=r(67);n(n.P+n.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),r="function"==typeof t;return this.then(r?function(r){return u(e,t()).then(function(){return r})}:t,r?function(r){return u(e,t()).then(function(){throw r})}:t)}})},101:function(t,e,r){"use strict";var n=r(9),o=r(44),i=r(66);n(n.S,"Promise",{try:function(t){var e=o.f(this),r=i(t);return(r.e?e.reject:e.resolve)(r.v),e.promise}})},106:function(t,r){t.exports=e},11:function(t,e){t.exports={}},111:function(t,e,r){t.exports={default:r(117),__esModule:!0}},117:function(t,e,r){var n=r(2),o=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},12:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},13:function(t,e,r){var n=r(34),o=r(15);t.exports=function(t){return n(o(t))}},14:function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},15:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},16:function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},1665:function(t,e,r){"use strict";function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.type=p?2:t.type,Object(l.a)(t).then(function(e){return 0===e.length?void(t.complete&&"function"==typeof t.complete&&t.complete(e)):(t.beforeUpload&&"function"==typeof t.beforeUpload&&t.beforeUpload(e),c.a.all(e.map(function(e){return a(t,e)})).then(function(e){var r=[];return e.map(function(t){t.data.url&&r.push(t.data)}),t.complete&&"function"==typeof t.complete&&t.complete(r),r}))})}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(l.a)(t)}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.appId,r=void 0===e?"":e,n=t.sourceType,o=void 0===n?["album","camera"]:n,i=t.url,a=void 0===i?"":i,u=t.ext,p=void 0===u?{}:u,d=t.beforeUpload,v=t.complete;return Object(l.a)({appId:r,sourceType:o,count:1}).then(function(t){return new c.a(function(e,r){if(d&&"function"==typeof d){var n=d(t);if(n&&Object(s.isPromise)(n))return n.then(function(t){return e(t)}).catch(function(t){return r(t)})}e(t)}).then(function(t){return 0===t.length?c.a.resolve({ret:999998,errmsg:"用户取消"}):Object(f.b)({appId:r,url:a,ext:p},t[0]).then(function(t){return v&&"function"==typeof v&&v(t),t})}).catch(function(t){return c.a.resolve({ret:10001,errmsg:t.message})})})}function a(t,e){return Object(f.a)(t,e).then(function(e){return 29999===Number(e.ret)&&(p=!0),t.uploaded&&"function"==typeof t.uploaded&&t.uploaded(e),e})}Object.defineProperty(e,"__esModule",{value:!0});var u=r(71),c=r.n(u),s=r(39),f=(r.n(s),r(944)),l=r(1666),p=!1;e.default={upload:n,choose:o,ocr:i,uploadFile:f.a}},1666:function(t,e,r){"use strict";function n(t){return t=j()({},_,t),k&&(t.type=k),b.ua.isWx&&!1!==t.isLimitSourceType&&(t.sourceType=["album","camera"]),t.appId||(t.type=2),h(t)?i(t):o(t)}function o(t){return s(t)}function i(t){if(b.ua.isWx&&!A){var e=b.ua.isIOS&&(window.__wxjs_is_wkwebview||L),r=!b.ua.isIOS&&t.enableHighQuality&&"function"==typeof window.wx.getLocalImgData;return e||r?a(t):1!==Number(t.type)||M?s(t):u(t)}return E||z?c(t):s(t)}function a(t){return new x.a(function(e,r){window.wx.chooseImage({count:t.count,sizeType:["compressed"],sourceType:t.sourceType,isSaveToAlbum:t.isSaveToAlbum,success:function(n){var o=n.localIds.length,i=0,a=[];for(var u in n.localIds)!function(u){var c=n.localIds[u];window.wx.getLocalImgData({localId:c,success:function(r){var n=r.localData;n&&0!==n.indexOf("data:image")&&(n="data:image/jpeg;base64,"+n,n=n.replace(/\r|\n/g,""));var s=function(t){i++,a[u]={localId:c,base64:t},i===o&&(e(a.filter(function(t){return!!t})),a=null)};b.ua.isIOS?s(n):d(t,{},n).then(s).catch(function(t){console.log("图片压缩失败,使用原图:",t),s(n)})},fail:function(e){i++,Object(O.a)(e,t).catch(r),Object(O.b)("wxUploadImage[getLocalImgData] error "+g()(e))}})}(u)},fail:function(e){Object(O.a)(e,t).catch(r),Object(O.b)("wxChooseImage[chooseImage] error "+g()(e))}})})}function u(t){return new x.a(function(e,r){window.wx.chooseImage({count:t.count,sizeType:["compressed"],sourceType:t.sourceType,isSaveToAlbum:t.isSaveToAlbum,success:function(n){function o(n){var a=n.length-1,u=n.pop();if(!u)return void e(i);window.wx.uploadImage({localId:u,isShowProgressTips:P?1:0,success:function(t){i[a]={localId:u,serverId:t.serverId},o(n)},fail:function(e){Object(O.a)(e,t).catch(r),Object(O.b)("wxUploadImage[uploadImage] error "+g()(e)),o(n)}})}var i=[];b.ua.isAndroid?setTimeout(o(n.localIds),100):o(n.localIds)},fail:function(e){e.errMsg&&/permission\sdenied/.test(e.errMsg)&&/micromessenger\/7\.0\.14/i.test(navigator.userAgent)&&(k=2),Object(O.a)(e,t).catch(r),Object(O.b)("wxChooseImage[chooseImage] error "+g()(e))}})})}function c(t){return console.log("preview场景:",t.sourceType),new x.a(function(e,r){window.Crossapi&&window.Crossapi("/image/preview",{count:t.count,maxWidth:t.maxWidth,maxHeight:t.maxHeight,maxSize:t.maxSize,sourceType:t.sourceType},function(t){if(0!==t.code)return Object(O.b)("appChooseImage[/image/preview] error code:"+t.code+" errmsg:"+t.msg),r({ret:t.code,errmsg:t.msg});Object(b.isArray)(t.data)||(t.data=[t.data]),t.data=t.data.map(function(t){return{base64:t}}),e(t.data||[])})})}function s(t){!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new x.a(function(e,r){var n=document.body.getAttribute(S),o=void 0;if(n){o=f(document.getElementById(n),t,e)}else n=Object(b.randomString)(24),o=document.createElement("input"),o.id=n,o.type="file",o.style.display="none",h(t)?!b.ua.isIOS&&b.ua.isWx||o.setAttribute("accept","image/*"):(b.ua.isAndroid&&!b.ua.isWx&&o.setAttribute("accept",t.accept),b.ua.isHarmonyOS&&!b.ua.isWx&&o.setAttribute("accept",t.accept)),!o.getAttribute("accept")&&t.accept&&o.setAttribute("accept",t.accept),t.count>1&&(b.ua.isAndroid&&b.ua.isWx||o.setAttribute("multiple","multiple")),t.sourceType&&1===t.sourceType.length&&"camera"===t.sourceType[0]&&o.setAttribute("capture","camera"),o.addEventListener("change",function(){l.call(this,t,e)},!1),document.body.appendChild(o),document.body.setAttribute(S,n);o.click()})}function f(t,e,r){var n=Object(b.randomString)(24),o=document.createElement("input");return o.id=n,o.type="file",o.style.display="none",h(e)?!b.ua.isIOS&&b.ua.isWx||o.setAttribute("accept","image/*"):(b.ua.isAndroid&&!b.ua.isWx&&o.setAttribute("accept",e.accept),b.ua.isHarmonyOS&&!b.ua.isWx&&o.setAttribute("accept",e.accept)),!o.getAttribute("accept")&&e.accept&&o.setAttribute("accept",e.accept),e.count>1&&(b.ua.isAndroid&&b.ua.isWx||o.setAttribute("multiple","multiple")),e.sourceType&&1===e.sourceType.length&&"camera"===e.sourceType[0]&&o.setAttribute("capture","camera"),o.addEventListener("change",function(){l.call(this,e,r)},!1),t&&t.parentNode?(t.removeEventListener("change",function(){l.call(this,e,r)}),t.parentNode.replaceChild(o,t)):document.body.appendChild(o),document.body.setAttribute(S,n),o}function l(t,e){var r=Array.prototype.slice.call(this.files);if(!r||0===r.length)return e([]);x.a.all(r.map(function(e){return p(t,e)})).then(e).catch(function(t){})}function p(t,e){return new x.a(function(r,n){var o=new FileReader;h(t)||/^image\//.test(e.type)?(o.onload=function(n){if(/^data:.+;base64,(.+)$/.test(n.target.result))return void r({name:e.name,type:t.fileType||e.type,base64:n.target.result,size:e.size});d(t,e,n.target.result).then(function(n){r({name:e.name,type:t.fileType||e.type,base64:n,size:e.size})}).catch(function(){})},o.readAsDataURL(e)):r({name:e.name,type:t.fileType||e.type,file:e})})}function d(t,e,r){return new x.a(function(n,o){var i=new Image;i.onload=function(){n(v(t,i,t.fileType||e.type)),i=null},i.onabort=i.onerror=o,i.src=r})}function v(t,e,r){var n,o=document.createElement("canvas"),i=o.getContext("2d"),a=e.width,u=e.height,c=a/u,s=void 0,f=void 0;return c>=1&&a>t.maxWidth?(n=t.maxWidth/a,f=u*n,o.width=t.maxWidth,o.height=f,i.drawImage(e,0,0,t.maxWidth,f)):c<1&&u>t.maxHeight?(n=t.maxHeight/u,s=a*n,o.width=s,o.height=t.maxHeight,i.drawImage(e,0,0,s,t.maxHeight)):(o.width=a,o.height=u,i.drawImage(e,0,0,a,u)),o.toDataURL(r||"image/jpeg",t.compressSize||.6)}function h(t){return!t.accept||/^image\//.test(t.accept)}e.a=n;var m=r(111),g=r.n(m),y=r(71),x=r.n(y),b=r(39),w=(r.n(b),r(264)),j=r.n(w),O=r(873),_={maxWidth:1440,maxHeight:1440,maxSize:250,type:1,count:9,sourceType:["album","camera"],accept:"",appId:"",isSaveToAlbum:1},S="actui-upload-file-id",I=navigator.userAgent.match(/wxwork\/[^\s]*/i),T=navigator.userAgent.match(/(mucxiaoyusan|muckacabao)\/[^\s]*/i),A=b.ua.isWx&&/(windowswechat|macwechat)/i.test(navigator.userAgent),P=b.ua.isAndroid&&/MicroMessenger\/8\.0\.7/i.test(navigator.userAgent),M=b.ua.isWxWork,L=M&&I&&Object(O.c)("2.4.6",I[0].split("/")[1])>-1,E=b.ua.isXysApp&&T&&Object(O.c)("1.5.0",T[0].split("/")[1])>-1&&(!b.ua.isAndroid||0!==Object(O.c)("3.8.0",T[0].split("/")[1])),z=b.ua.isKcbApp&&T&&Object(O.c)("1.1.0",T[0].split("/")[1])>-1,k=0},17:function(t,e,r){var n=r(19);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}},18:function(t,e){t.exports=!0},19:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},2:function(t,e){var r=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=r)},20:function(t,e,r){var n=r(31)("keys"),o=r(24);t.exports=function(t){return n[t]||(n[t]=o(t))}},22:function(t,e,r){var n=r(6),o=r(0).document,i=n(o)&&n(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},23:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},24:function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+n).toString(36))}},264:function(t,e){t.exports=r},27:function(t,e,r){var n=r(10).f,o=r(8),i=r(1)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},28:function(t,e,r){var n=r(42),o=r(32);t.exports=Object.keys||function(t){return n(t,o)}},3:function(t,e,r){t.exports=!r(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},31:function(t,e,r){var n=r(2),o=r(0),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:n.version,mode:r(18)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},32:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},33:function(t,e,r){var n=r(15);t.exports=function(t){return Object(n(t))}},34:function(t,e,r){var n=r(14);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},35:function(t,e,r){var n=r(16),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},36:function(t,e,r){"use strict";var n=r(18),o=r(9),i=r(54),a=r(5),u=r(11),c=r(60),s=r(27),f=r(62),l=r(1)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,r,v,h,m,g){c(r,e,v);var y,x,b,w=function(t){if(!p&&t in S)return S[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},j=e+" Iterator",O="values"==h,_=!1,S=t.prototype,I=S[l]||S["@@iterator"]||h&&S[h],T=I||w(h),A=h?O?w("entries"):T:void 0,P="Array"==e?S.entries||I:I;if(P&&(b=f(P.call(new t)))!==Object.prototype&&b.next&&(s(b,j,!0),n||"function"==typeof b[l]||a(b,l,d)),O&&I&&"values"!==I.name&&(_=!0,T=function(){return I.call(this)}),n&&!g||!p&&!_&&S[l]||a(S,l,T),u[e]=T,u[j]=d,h)if(y={values:O?T:w("values"),keys:m?T:w("keys"),entries:A},g)for(x in y)x in S||i(S,x,y[x]);else o(o.P+o.F*(p||_),e,y);return y}},38:function(t,e,r){var n=r(6);t.exports=function(t,e){if(!n(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!n(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},39:function(e,r){e.exports=t},4:function(t,e,r){var n=r(6);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},41:function(t,e,r){t.exports=!r(3)&&!r(12)(function(){return 7!=Object.defineProperty(r(22)("div"),"a",{get:function(){return 7}}).a})},42:function(t,e,r){var n=r(8),o=r(13),i=r(46)(!1),a=r(20)("IE_PROTO");t.exports=function(t,e){var r,u=o(t),c=0,s=[];for(r in u)r!=a&&n(u,r)&&s.push(r);for(;e.length>c;)n(u,r=e[c++])&&(~i(s,r)||s.push(r));return s}},43:function(t,e,r){var n=r(0).document;t.exports=n&&n.documentElement},44:function(t,e,r){"use strict";function n(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n}),this.resolve=o(e),this.reject=o(r)}var o=r(19);t.exports.f=function(t){return new n(t)}},45:function(t,e,r){var n=r(14),o=r(1)("toStringTag"),i="Arguments"==n(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,r,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=a(e=Object(t),o))?r:i?n(e):"Object"==(u=n(e))&&"function"==typeof e.callee?"Arguments":u}},46:function(t,e,r){var n=r(13),o=r(35),i=r(47);t.exports=function(t){return function(e,r,a){var u,c=n(e),s=o(c.length),f=i(a,s);if(t&&r!=r){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===r)return t||f||0;return!t&&-1}}},47:function(t,e,r){var n=r(16),o=Math.max,i=Math.min;t.exports=function(t,e){return t=n(t),t<0?o(t+e,0):i(t,e)}},48:function(t,e,r){"use strict";var n=r(59)(!0);r(36)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=n(e,r),this._i+=t.length,{value:t,done:!1})})},5:function(t,e,r){var n=r(10),o=r(23);t.exports=r(3)?function(t,e,r){return n.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},50:function(t,e,r){r(68);for(var n=r(0),o=r(5),i=r(11),a=r(1)("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<u.length;c++){var s=u[c],f=n[s],l=f&&f.prototype;l&&!l[a]&&o(l,a,s),i[s]=i.Array}},51:function(t,e){e.f={}.propertyIsEnumerable},52:function(t,e,r){var n=r(4),o=r(61),i=r(32),a=r(20)("IE_PROTO"),u=function(){},c=function(){var t,e=r(22)("iframe"),n=i.length;for(e.style.display="none",r(43).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;n--;)delete c.prototype[i[n]];return c()};t.exports=Object.create||function(t,e){var r;return null!==t?(u.prototype=n(t),r=new u,u.prototype=null,r[a]=t):r=c(),void 0===e?r:o(r,e)}},54:function(t,e,r){t.exports=r(5)},56:function(t,e,r){var n=r(45),o=r(1)("iterator"),i=r(11);t.exports=r(2).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[n(t)]}},57:function(t,e){e.f=Object.getOwnPropertySymbols},59:function(t,e,r){var n=r(16),o=r(15);t.exports=function(t){return function(e,r){var i,a,u=String(o(e)),c=n(r),s=u.length;return c<0||c>=s?t?"":void 0:(i=u.charCodeAt(c),i<55296||i>56319||c+1===s||(a=u.charCodeAt(c+1))<56320||a>57343?t?u.charAt(c):i:t?u.slice(c,c+2):a-56320+(i-55296<<10)+65536)}}},6:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},60:function(t,e,r){"use strict";var n=r(52),o=r(23),i=r(27),a={};r(5)(a,r(1)("iterator"),function(){return this}),t.exports=function(t,e,r){t.prototype=n(a,{next:o(1,r)}),i(t,e+" Iterator")}},61:function(t,e,r){var n=r(10),o=r(4),i=r(28);t.exports=r(3)?Object.defineProperties:function(t,e){o(t);for(var r,a=i(e),u=a.length,c=0;u>c;)n.f(t,r=a[c++],e[r]);return t}},62:function(t,e,r){var n=r(8),o=r(33),i=r(20)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),n(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},63:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},64:function(t,e,r){var n=r(4),o=r(19),i=r(1)("species");t.exports=function(t,e){var r,a=n(t).constructor;return void 0===a||void 0==(r=n(a)[i])?e:o(r)}},65:function(t,e,r){var n,o,i,a=r(17),u=r(97),c=r(43),s=r(22),f=r(0),l=f.process,p=f.setImmediate,d=f.clearImmediate,v=f.MessageChannel,h=f.Dispatch,m=0,g={},y=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},x=function(t){y.call(t.data)};p&&d||(p=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return g[++m]=function(){u("function"==typeof t?t:Function(t),e)},n(m),m},d=function(t){delete g[t]},"process"==r(14)(l)?n=function(t){l.nextTick(a(y,t,1))}:h&&h.now?n=function(t){h.now(a(y,t,1))}:v?(o=new v,i=o.port2,o.port1.onmessage=x,n=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(n=function(t){f.postMessage(t+"","*")},f.addEventListener("message",x,!1)):n="onreadystatechange"in s("script")?function(t){c.appendChild(s("script")).onreadystatechange=function(){c.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),t.exports={set:p,clear:d}},66:function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},67:function(t,e,r){var n=r(4),o=r(6),i=r(44);t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t);return(0,r.resolve)(e),r.promise}},68:function(t,e,r){"use strict";var n=r(69),o=r(63),i=r(11),a=r(13);t.exports=r(36)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,o(1)):"keys"==e?o(0,r):"values"==e?o(0,t[r]):o(0,[r,t[r]])},"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},69:function(t,e){t.exports=function(){}},70:function(t,e,r){t.exports={default:r(79),__esModule:!0}},71:function(t,e,r){t.exports={default:r(95),__esModule:!0}},73:function(t,e){},79:function(t,e,r){r(80),t.exports=r(2).Object.assign},8:function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},80:function(t,e,r){var n=r(9);n(n.S+n.F,"Object",{assign:r(81)})},81:function(t,e,r){"use strict";var n=r(3),o=r(28),i=r(57),a=r(51),u=r(33),c=r(34),s=Object.assign;t.exports=!s||r(12)(function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!=s({},t)[r]||Object.keys(s({},e)).join("")!=n})?function(t,e){for(var r=u(t),s=arguments.length,f=1,l=i.f,p=a.f;s>f;)for(var d,v=c(arguments[f++]),h=l?o(v).concat(l(v)):o(v),m=h.length,g=0;m>g;)d=h[g++],n&&!p.call(v,d)||(r[d]=v[d]);return r}:s},82:function(t,e,r){var n=r(17),o=r(83),i=r(84),a=r(4),u=r(35),c=r(56),s={},f={},e=t.exports=function(t,e,r,l,p){var d,v,h,m,g=p?function(){return t}:c(t),y=n(r,l,e?2:1),x=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(i(g)){for(d=u(t.length);d>x;x++)if((m=e?y(a(v=t[x])[0],v[1]):y(t[x]))===s||m===f)return m}else for(h=g.call(t);!(v=h.next()).done;)if((m=o(h,y,v.value,e))===s||m===f)return m};e.BREAK=s,e.RETURN=f},83:function(t,e,r){var n=r(4);t.exports=function(t,e,r,o){try{return o?e(n(r)[0],r[1]):e(r)}catch(e){var i=t.return;throw void 0!==i&&n(i.call(t)),e}}},84:function(t,e,r){var n=r(11),o=r(1)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||i[o]===t)}},85:function(t,e){t.exports=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t}},86:function(t,e,r){var n=r(5);t.exports=function(t,e,r){for(var o in e)r&&t[o]?t[o]=e[o]:n(t,o,e[o]);return t}},87:function(t,e,r){var n=r(1)("iterator"),o=!1;try{var i=[7][n]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i=[7],a=i[n]();a.next=function(){return{done:r=!0}},i[n]=function(){return a},t(i)}catch(t){}return r}},873:function(t,e,r){"use strict";function n(t){t="FileUpload前端错误[xxid:"+(a("xxid")||a("cps_xxid"))+"]:"+t;l()("/muc/util/reportErr",{errMsg:t}).catch(function(t){})}function o(t,e){var r=t&&t.errMsg,n=!1;if(r&&s.ua.isWx){var o="";if(/permission\sdenied/.test(r)){var i=e.sourceType;i.indexOf("album")>-1?o="请在设置-应用-微信-权限中开启存储权限":i.indexOf("camera")>-1&&(o="请在设置-应用-微信-权限中开启相机权限")}else/offline\sverifying/.test(r)&&(o="微信接口注册失败,请刷新页面重试",n=!0);return c.a.reject({ret:999999,errmsg:o,isWxInterfaceFail:n})}return c.a.resolve()}function i(t,e){if(t=t||"0.0.0",e=e||"0.0.0",t===e)return 0;for(var r=t.split("."),n=e.split("."),o=Math.max(r.length,n.length),i=0;i<o;i++){var a=~~n[i],u=~~r[i];if(a<u)return-1;if(a>u)return 1}return-1}function a(t){var e=new RegExp("(?:^|;+|\\s+)"+t+"=([^;]*)"),r=document.cookie.match(e);return r?r[1]:""}e.b=n,e.a=o,e.c=i;var u=r(71),c=r.n(u),s=r(39),f=(r.n(s),r(106)),l=r.n(f)},9:function(t,e,r){var n=r(0),o=r(2),i=r(17),a=r(5),u=r(8),c=function(t,e,r){var s,f,l,p=t&c.F,d=t&c.G,v=t&c.S,h=t&c.P,m=t&c.B,g=t&c.W,y=d?o:o[e]||(o[e]={}),x=y.prototype,b=d?n:v?n[e]:(n[e]||{}).prototype;d&&(r=e);for(s in r)(f=!p&&b&&void 0!==b[s])&&u(y,s)||(l=f?b[s]:r[s],y[s]=d&&"function"!=typeof b[s]?r[s]:m&&f?i(l,n):g&&b[s]==l?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):h&&"function"==typeof l?i(Function.call,l):l,h&&((y.virtual||(y.virtual={}))[s]=l,t&c.R&&x&&!x[s]&&a(x,s,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},91:function(t,e,r){"use strict";var n=r(0),o=r(2),i=r(10),a=r(3),u=r(1)("species");t.exports=function(t){var e="function"==typeof o[t]?o[t]:n[t];a&&e&&!e[u]&&i.f(e,u,{configurable:!0,get:function(){return this}})}},92:function(t,e,r){"use strict";e.__esModule=!0;var n=r(70),o=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=o.default||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}},944:function(t,e,r){"use strict";function n(t,e){return t=y()({},O,t),i(t,e)}function o(t,e){var r=t.appId,n=t.url,o=t.ext,i=void 0===o?{}:o;return n?w()(n,v()({rawData:e.base64,serverid:e.serverId,appid:r},i)).then(function(t){var r=t.data,n=void 0===r?{}:r;return n.data=p()({},n.data,{dataBase:e.base64,localId:e.localId}),n},function(t){return m.a.resolve({ret:999999,errmsg:Object(j.getErrmsg)(t)})}):m.a.resolve({ret:999999,errmsg:"uploadOcr url is required"})}function i(t,e){return e.base64?a(t,e):e.localId?u(t,e.localId,e.serverId):e.file?c(t,e.file):void 0}function a(t,e){var r=e.base64,n=e.size,o=e.name,i=void 0===o?"":o,a=t.maxSize&&1024*t.maxSize*1024||null;if(a&&n&&n>a)return m.a.resolve({ret:10001,errmsg:"上传的文件大小不能超过"+(t.maxSize||"20")+"MB",data:{}});var u="/platform/file/uploadPicture";t.extParam=t.extParam||{};var c=v()({},t.extParam,{imgdata:r,bizid:t.bizId,name:i});return t.requrestUrl&&(u=t.requrestUrl),w()(u,c,6e5).then(function(t){var e=t.data,n=void 0===e?{}:e,o={ret:n.ret,errmsg:n.errmsg,data:{base64:r,response:n.data}};return Object(j.isObject)(n.data)&&n.data.url&&(o.data.url=n.data.url,o.data.origUrl=n.data.url.replace(/\?.*$/,"")),0===n.ret&&Object(j.isString)(n.data)&&(o.data.url=n.data,o.data.origUrl=n.data.replace(/\?.*$/,"")),o},function(t){return Object(x.b)("uploadBase64 error "+f()(t)),m.a.resolve({ret:999999,errmsg:Object(j.getErrmsg)(t),data:{base64:r}})})}function u(t,e,r){var n="/platform/file/uploadWxPicture";t.extParam=t.extParam||{};var o=v()({},t.extParam,{serverid:r,bizid:t.bizId,appid:t.appId});return t.requrestUrl&&(n=t.requrestUrl),w()(n,o,6e5).then(function(t){var n=t.data,o=void 0===n?{}:n,i={ret:o.ret,errmsg:o.errmsg,data:{localId:e,serverId:r,response:o.data}};return Object(j.isObject)(o.data)&&o.data.url&&(i.data.url=o.data.url,i.data.origUrl=o.data.url.replace(/\?.*$/,"")),0===o.ret&&Object(j.isString)(o.data)&&(i.data.url=o.data,i.data.origUrl=o.data.replace(/\?.*$/,"")),i},function(t){return Object(x.b)("uploadLocalId error "+f()(t)),m.a.resolve({ret:999999,errmsg:Object(j.getErrmsg)(t),data:{localId:e,serverId:r}})})}function c(t,e){var r=t.maxSize&&1024*t.maxSize*1024||_;if(e.size&&e.size>r)return m.a.resolve({ret:10001,errmsg:"上传的文件大小不能超过"+(t.maxSize||"20")+"MB",data:{}});var n="/platform/file/uploadFile";t.url&&(n=t.url);var o=new window.FormData;o.append("file",e),o.append("bizid",t.bizId);var i=t.requestParams;if(Object(j.isObject)(i))for(var a in i)o.append(a,i[a]);return Object(b.upload)(n,o,6e5).then(function(t){var r=t.data,n=void 0===r?{}:r,o={ret:n.ret,errmsg:n.errmsg,data:{name:e.name,type:e.type,size:e.size}};return 0===n.ret&&(n.data.file_url&&(n.data.url=n.data.file_url),o.data.name=n.data.name,o.data.url=n.data.url,o.data.origUrl=n.data.url.replace(/\?.*$/,""),o.data._rawData=n.data),o},function(t){return Object(x.b)("uploadOtherFile error "+f()(t)),m.a.resolve({ret:999999,errmsg:Object(j.getErrmsg)(t),data:{}})})}e.a=n,e.b=o;var s=r(111),f=r.n(s),l=r(70),p=r.n(l),d=r(92),v=r.n(d),h=r(71),m=r.n(h),g=r(264),y=r.n(g),x=r(873),b=r(106),w=r.n(b),j=r(39),O=(r.n(j),{appId:"",bizId:""}),_=20971520},95:function(t,e,r){r(73),r(48),r(50),r(96),r(100),r(101),t.exports=r(2).Promise},96:function(t,e,r){"use strict";var n,o,i,a,u=r(18),c=r(0),s=r(17),f=r(45),l=r(9),p=r(6),d=r(19),v=r(85),h=r(82),m=r(64),g=r(65).set,y=r(98)(),x=r(44),b=r(66),w=r(99),j=r(67),O=c.TypeError,_=c.process,S=_&&_.versions,I=S&&S.v8||"",T=c.Promise,A="process"==f(_),P=function(){},M=o=x.f,L=!!function(){try{var t=T.resolve(1),e=(t.constructor={})[r(1)("species")]=function(t){t(P,P)};return(A||"function"==typeof PromiseRejectionEvent)&&t.then(P)instanceof e&&0!==I.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),E=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},z=function(t,e){if(!t._n){t._n=!0;var r=t._c;y(function(){for(var n=t._v,o=1==t._s,i=0;r.length>i;)!function(e){var r,i,a,u=o?e.ok:e.fail,c=e.resolve,s=e.reject,f=e.domain;try{u?(o||(2==t._h&&C(t),t._h=1),!0===u?r=n:(f&&f.enter(),r=u(n),f&&(f.exit(),a=!0)),r===e.promise?s(O("Promise-chain cycle")):(i=E(r))?i.call(r,c,s):c(r)):s(n)}catch(t){f&&!a&&f.exit(),s(t)}}(r[i++]);t._c=[],t._n=!1,e&&!t._h&&k(t)})}},k=function(t){g.call(c,function(){var e,r,n,o=t._v,i=W(t);if(i&&(e=b(function(){A?_.emit("unhandledRejection",o,t):(r=c.onunhandledrejection)?r({promise:t,reason:o}):(n=c.console)&&n.error&&n.error("Unhandled promise rejection",o)}),t._h=A||W(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},W=function(t){return 1!==t._h&&0===(t._a||t._c).length},C=function(t){g.call(c,function(){var e;A?_.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},F=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),z(e,!0))},U=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw O("Promise can't be resolved itself");(e=E(t))?y(function(){var n={_w:r,_d:!1};try{e.call(t,s(U,n,1),s(F,n,1))}catch(t){F.call(n,t)}}):(r._v=t,r._s=1,z(r,!1))}catch(t){F.call({_w:r,_d:!1},t)}}};L||(T=function(t){v(this,T,"Promise","_h"),d(t),n.call(this);try{t(s(U,this,1),s(F,this,1))}catch(t){F.call(this,t)}},n=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},n.prototype=r(86)(T.prototype,{then:function(t,e){var r=M(m(this,T));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=A?_.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&z(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new n;this.promise=t,this.resolve=s(U,t,1),this.reject=s(F,t,1)},x.f=M=function(t){return t===T||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!L,{Promise:T}),r(27)(T,"Promise"),r(91)("Promise"),a=r(2).Promise,l(l.S+l.F*!L,"Promise",{reject:function(t){var e=M(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(u||!L),"Promise",{resolve:function(t){return j(u&&this===a?T:this,t)}}),l(l.S+l.F*!(L&&r(87)(function(t){T.all(t).catch(P)})),"Promise",{all:function(t){var e=this,r=M(e),n=r.resolve,o=r.reject,i=b(function(){var r=[],i=0,a=1;h(t,!1,function(t){var u=i++,c=!1;r.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,r[u]=t,--a||n(r))},o)}),--a||n(r)});return i.e&&o(i.v),r.promise},race:function(t){var e=this,r=M(e),n=r.reject,o=b(function(){h(t,!1,function(t){e.resolve(t).then(r.resolve,n)})});return o.e&&n(o.v),r.promise}})},97:function(t,e){t.exports=function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}return t.apply(r,e)}},98:function(t,e,r){var n=r(0),o=r(65).set,i=n.MutationObserver||n.WebKitMutationObserver,a=n.process,u=n.Promise,c="process"==r(14)(a);t.exports=function(){var t,e,r,s=function(){var n,o;for(c&&(n=a.domain)&&n.exit();t;){o=t.fn,t=t.next;try{o()}catch(n){throw t?r():e=void 0,n}}e=void 0,n&&n.enter()};if(c)r=function(){a.nextTick(s)};else if(!i||n.navigator&&n.navigator.standalone)if(u&&u.resolve){var f=u.resolve(void 0);r=function(){f.then(s)}}else r=function(){o.call(n,s)};else{var l=!0,p=document.createTextNode("");new i(s).observe(p,{characterData:!0}),r=function(){p.data=l=!l}}return function(n){var o={fn:n,next:void 0};e&&(e.next=o),t||(t=o,r()),e=o}}},99:function(t,e,r){var n=r(0),o=n.navigator;t.exports=o&&o.userAgent||""}})});